diff src/protocols/msn/slp.c @ 9259:f5f7482678d2

[gaim-migrate @ 10058] Patch by Felipe Contreras. He says, "This patch creates a different callback for the end of a slpcall, so there is no mistake with the current callback for a sucessful slpcall ... when we reach the end of a slpcall the slpcall data has been destroyed, the got_userdisplay cb should be called only as the sucessfull slpcall callback." Essentially, it fixes the corrupt buddy icon checksum issue, though it needs another patch that has to be reworked first, if I understood right. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 10 Jun 2004 20:57:52 +0000
parents ac8790437abe
children 70153c759016
line wrap: on
line diff
--- a/src/protocols/msn/slp.c	Thu Jun 10 07:07:10 2004 +0000
+++ b/src/protocols/msn/slp.c	Thu Jun 10 20:57:52 2004 +0000
@@ -138,18 +138,21 @@
 }
 
 void
-msn_xfer_finish_cb(MsnSlpCall *slpcall,
-				   const char *body, long long size)
+msn_xfer_end_cb(MsnSlpCall *slpcall)
 {
 	if (gaim_xfer_get_status(slpcall->xfer) != GAIM_XFER_STATUS_DONE)
 	{
-		if (size < 0)
-			gaim_xfer_cancel_remote(slpcall->xfer);
-		else
-			gaim_xfer_set_completed(slpcall->xfer, TRUE);
+		gaim_xfer_cancel_remote(slpcall->xfer);
 	}
 }
 
+void
+msn_xfer_completed_cb(MsnSlpCall *slpcall, const char *body,
+					  long long size)
+{
+	gaim_xfer_set_completed(slpcall->xfer, TRUE);
+}
+
 /**************************************************************************
  * SLP Control
  **************************************************************************/
@@ -307,7 +310,8 @@
 
 		account = slpcall->slplink->session->account;
 
-		slpcall->cb = msn_xfer_finish_cb;
+		slpcall->cb = msn_xfer_completed_cb;
+		slpcall->end_cb = msn_xfer_end_cb;
 		slpcall->progress_cb = msn_xfer_progress_cb;
 		slpcall->branch = g_strdup(branch);