changeset 29925:418659eedf88

Handle read of length 0 in upnp code. This indicates EOF, which may need farther handling.
author Ethan Blanton <elb@pidgin.im>
date Thu, 04 Mar 2010 15:31:11 +0000
parents 0dcdccb03ea0
children fbefcfbb5377
files libpurple/upnp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/upnp.c	Thu Mar 04 09:23:19 2010 +0000
+++ b/libpurple/upnp.c	Thu Mar 04 15:31:11 2010 +0000
@@ -542,7 +542,7 @@
 		len = recv(dd->fd, buf,
 			sizeof(buf) - 1, 0);
 
-		if(len > 0) {
+		if(len >= 0) {
 			buf[len] = '\0';
 			break;
 		} else if(errno != EINTR) {