pidgin: 1878471e: Handle read of length 0 in upnp code.

elb at pidgin.im elb at pidgin.im
Thu Mar 4 10:36:06 EST 2010


-----------------------------------------------------------------
Revision: 1878471e50f9b85a1a87c962ae6c9eb1866be775
Ancestor: 4e796a513d5ffdab72249b7e88425b41d820a05f
Author: elb at pidgin.im
Date: 2010-03-04T15:31:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1878471e50f9b85a1a87c962ae6c9eb1866be775

Modified files:
        libpurple/upnp.c

ChangeLog: 

Handle read of length 0 in upnp code.

This indicates EOF, which may need farther handling.

-------------- next part --------------
============================================================
--- libpurple/upnp.c	078d8ce871c253ca4e304ee8049fa3fb17f5a66b
+++ libpurple/upnp.c	5204ad052630d88ca3c9f489ab04ec2eeb7768c3
@@ -542,7 +542,7 @@ purple_upnp_discover_udp_read(gpointer d
 		len = recv(dd->fd, buf,
 			sizeof(buf) - 1, 0);
 
-		if(len > 0) {
+		if(len >= 0) {
 			buf[len] = '\0';
 			break;
 		} else if(errno != EINTR) {


More information about the Commits mailing list