glib r7383 - in trunk: . glib
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7383 - in trunk: . glib
- Date: Thu, 21 Aug 2008 11:35:52 +0000 (UTC)
Author: tml
Date: Thu Aug 21 11:35:51 2008
New Revision: 7383
URL: http://svn.gnome.org/viewvc/glib?rev=7383&view=rev
Log:
2008-08-21 Tor Lillqvist <tml novell com>
* glib/giowin32.c: Improve run-time warning messages. Drop
some #if 0 code.
Modified:
trunk/ChangeLog
trunk/glib/giowin32.c
Modified: trunk/glib/giowin32.c
==============================================================================
--- trunk/glib/giowin32.c (original)
+++ trunk/glib/giowin32.c Thu Aug 21 11:35:51 2008
@@ -544,10 +544,10 @@
thread_handle = (HANDLE) _beginthreadex (NULL, 0, thread, channel, 0,
&channel->thread_id);
if (thread_handle == 0)
- g_warning (G_STRLOC ": Error creating reader thread: %s",
+ g_warning ("Error creating thread: %s.",
g_strerror (errno));
else if (!CloseHandle (thread_handle))
- g_warning (G_STRLOC ": Error closing thread handle: %s\n",
+ g_warning ("Error closing thread handle: %s.\n",
g_win32_error_message (GetLastError ()));
WaitForSingleObject (channel->space_avail_event, INFINITE);
@@ -763,7 +763,7 @@
event_mask |= (FD_WRITE | FD_CONNECT);
event_mask |= FD_CLOSE;
- if (channel->event_mask != event_mask /* || channel->event != watch->pollfd.fd*/)
+ if (channel->event_mask != event_mask)
{
if (channel->debug)
g_print ("\n WSAEventSelect(%d,%p,{%s})",
@@ -956,7 +956,7 @@
if (!func)
{
- g_warning (G_STRLOC ": GIOWin32Watch dispatched without callback\n"
+ g_warning ("IO Watch dispatched without callback\n"
"You must call g_source_connect().");
return FALSE;
}
@@ -1001,11 +1001,6 @@
case G_IO_WIN32_SOCKET:
if (channel->debug)
g_print (" SOCK sock=%d", channel->fd);
-#if 0
- CloseHandle ((HANDLE) watch->pollfd.fd);
- channel->event = 0;
- channel->event_mask = 0;
-#endif
break;
default:
@@ -1994,7 +1989,7 @@
if (fstat (fd, &st) == -1)
{
- g_warning (G_STRLOC ": %d isn't a C library file descriptor", fd);
+ g_warning ("g_io_channel_win32_new_fd: %d isn't an open file descriptor in the C library GLib uses.", fd);
return NULL;
}
@@ -2044,7 +2039,7 @@
is_socket = (getsockopt (fd, SOL_SOCKET, SO_TYPE, (char *) &optval, &optlen) != SOCKET_ERROR);
if (is_fd && is_socket)
- g_warning (G_STRLOC ": %d is both a file descriptor and a socket, file descriptor interpretation assumed.", fd);
+ g_warning ("g_io_channel_unix_new: %d is both a file descriptor and a socket. File descriptor interpretation assumed. To avoid ambiguity, call either g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket() instead.", fd);
if (is_fd)
return g_io_channel_win32_new_fd_internal (fd, &st);
@@ -2052,7 +2047,7 @@
if (is_socket)
return g_io_channel_win32_new_socket(fd);
- g_warning (G_STRLOC ": %d is neither a file descriptor or a socket", fd);
+ g_warning ("g_io_channel_unix_new: %d is neither a file descriptor or a socket.", fd);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]