diff libpurple/protocols/bonjour/jabber.c @ 17541:a62a695ccfb5

Improve Bonjour error handling when there are errors "connecting".
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 06 Jun 2007 03:22:06 +0000
parents bca2780f7669
children 496d007a8912
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/jabber.c	Wed Jun 06 03:21:04 2007 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Wed Jun 06 03:22:06 2007 +0000
@@ -668,8 +668,10 @@
 	GSList *l;
 
 	/* Close the server socket and remove all the watcher */
-	close(data->socket);
-	purple_input_remove(data->watcher_id);
+	if (data->socket >= 0)
+		close(data->socket);
+	if (data->watcher_id > 0)
+		purple_input_remove(data->watcher_id);
 
 	/* Close all the sockets and remove all the watchers after sending end streams */
 	if (data->account->gc != NULL)