From: <wt...@ke...> - 2006-06-20 12:10:41
|
CVS Root: /cvs/gstreamer Module: gst-plugins-good Changes by: wtay Date: Tue Jun 20 2006 12:10:41 UTC Log message: * gst/rtsp/rtspconnection.c: (inet_aton), (rtsp_connection_send), (rtsp_connection_close), (rtsp_connection_free): Use better G_OS_* macros. Fixes #345301 some more. Modified files: . : ChangeLog gst/rtsp : rtspconnection.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.2399&r2=1.2400 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/rtsp/rtspconnection.c.diff?r1=1.11&r2=1.12 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v retrieving revision 1.2399 retrieving revision 1.2400 diff -u -d -r1.2399 -r1.2400 --- ChangeLog 20 Jun 2006 10:35:48 -0000 1.2399 +++ ChangeLog 20 Jun 2006 12:10:28 -0000 1.2400 @@ -1,5 +1,11 @@ 2006-06-20 Wim Taymans <wi...@fl...> + * gst/rtsp/rtspconnection.c: (inet_aton), (rtsp_connection_send), + (rtsp_connection_close), (rtsp_connection_free): + Use better G_OS_* macros. Fixes #345301 some more. + +2006-06-20 Wim Taymans <wi...@fl...> Patch by: Brian Cameron <brian dot cameron at sun dot com> * sys/sunaudio/Makefile.am: Index: rtspconnection.c RCS file: /cvs/gstreamer/gst-plugins-good/gst/rtsp/rtspconnection.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- rtspconnection.c 20 Jun 2006 10:31:41 -0000 1.11 +++ rtspconnection.c 20 Jun 2006 12:10:29 -0000 1.12 @@ -23,18 +23,23 @@ #include <stdlib.h> #include <string.h> -#ifdef WIN32 -#include <winsock2.h> -#else +/* we include this here to get the G_OS_* defines */ +#include <glib.h> +#ifdef G_OS_UNIX #include <netdb.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #endif +#ifdef G_OS_WIN32 +#include <winsock2.h> +#endif #include "rtspconnection.h" /* note that inet_aton is deprecated on unix because * inet_addr returns -1 (INADDR_NONE) for the valid 255.255.255.255 * address. */ @@ -150,7 +155,7 @@ if (conn == NULL || message == NULL) return RTSP_EINVAL; WSADATA w; int error = WSAStartup (0x0202, &w); @@ -215,7 +220,7 @@ return RTSP_OK; startup_error: { GST_DEBUG_OBJECT (self, "Error %d on WSAStartup", error); @@ -580,12 +585,14 @@ if (conn == NULL) res = socketclose (conn->fd); WSACleanup (); #else res = close (conn->fd); conn->fd = -1; if (res != 0) goto sys_error; @@ -604,6 +611,10 @@ + WSACleanup (); g_free (conn); |