mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
gst-libs/gst/rtsp/gstrtspdefs.c: Use WSAGetLastError() rather than errno/h_errno on win32.
Original commit message from CVS: * gst-libs/gst/rtsp/gstrtspdefs.c: Use WSAGetLastError() rather than errno/h_errno on win32.
This commit is contained in:
parent
eabff64640
commit
4f04294e45
2 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-11-20 Michael Smith <msmith@songbirdnest.com>
|
||||
|
||||
* gst-libs/gst/rtsp/gstrtspdefs.c:
|
||||
Use WSAGetLastError() rather than errno/h_errno on win32.
|
||||
|
||||
2008-11-20 Michael Smith <msmith@songbirdnest.com>
|
||||
|
||||
* gst-libs/gst/riff/riff-media.c:
|
||||
|
|
|
@ -60,7 +60,9 @@ extern int h_errno;
|
|||
|
||||
#include "gstrtspdefs.h"
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#ifdef G_OS_WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
|
@ -243,16 +245,18 @@ gst_rtsp_strresult (GstRTSPResult result)
|
|||
idx = CLAMP (idx, 0, -GST_RTSP_ELAST);
|
||||
|
||||
switch (idx) {
|
||||
#ifdef G_OS_WIN32
|
||||
case -GST_RTSP_ESYS:
|
||||
case -GST_RTSP_ENET:
|
||||
gchar * msg = g_win32_error_message (WSAGetLastError ());
|
||||
res = g_strdup_printf (rtsp_results[idx], msg);
|
||||
g_free (msg);
|
||||
#else
|
||||
case -GST_RTSP_ESYS:
|
||||
res = g_strdup_printf (rtsp_results[idx], g_strerror (errno));
|
||||
break;
|
||||
case -GST_RTSP_ENET:
|
||||
#ifndef G_OS_WIN32
|
||||
res = g_strdup_printf (rtsp_results[idx], hstrerror (h_errno));
|
||||
#else
|
||||
res =
|
||||
g_strdup
|
||||
("not supported on win32, implement me in a different way ??");
|
||||
#endif
|
||||
break;
|
||||
case -GST_RTSP_ELAST:
|
||||
|
|
Loading…
Reference in a new issue