diff src/protocols/msn/slplink.c @ 9231:ac8790437abe

[gaim-migrate @ 10027] Patch from Felipe Contreras that fixes the sent bytes being reset to 0 after sending a file, and a small check to hopefully avoid a potential crash. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 07 Jun 2004 07:49:36 +0000
parents 7a00289f2ef1
children e20af87d8721
line wrap: on
line diff
--- a/src/protocols/msn/slplink.c	Mon Jun 07 05:29:36 2004 +0000
+++ b/src/protocols/msn/slplink.c	Mon Jun 07 07:49:36 2004 +0000
@@ -298,8 +298,8 @@
 		if ((slpmsg->slpcall != NULL) &&
 			(slpmsg->slpcall->progress_cb != NULL))
 		{
-			slpmsg->slpcall->progress_cb(slpmsg->slpcall, slpmsg->size, len,
-										slpmsg->offset);
+			slpmsg->slpcall->progress_cb(slpmsg->slpcall, slpmsg->size,
+										 len, slpmsg->offset);
 		}
 	}
 
@@ -509,10 +509,14 @@
 		g_return_if_reached();
 	}
 
-	if ((slpmsg->slpcall != NULL) &&
-		(slpmsg->slpcall->progress_cb != NULL))
+	if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
 	{
-		slpmsg->slpcall->progress_cb(slpmsg->slpcall, slpmsg->size, len, offset);
+		if ((slpmsg->slpcall != NULL) &&
+			(slpmsg->slpcall->progress_cb != NULL))
+		{
+			slpmsg->slpcall->progress_cb(slpmsg->slpcall, slpmsg->size,
+										 len, offset);
+		}
 	}
 
 #if 0