pidgin: d0626293: For some reason the slpmsg and slplink f...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Nov 13 03:38:30 EST 2008


-----------------------------------------------------------------
Revision: d062629380817014178252b6476fb68091dd12ca
Ancestor: 27f670837b791c4dcff7c48de033b9260b4dc281
Author: markdoliner at pidgin.im
Date: 2008-11-13T08:01:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d062629380817014178252b6476fb68091dd12ca

Modified files:
        libpurple/protocols/msn/slp.c
        libpurple/protocols/msn/slpcall.c
        libpurple/protocols/msn/slpcall.h
        libpurple/protocols/msn/slplink.c

ChangeLog: 

For some reason the slpmsg and slplink functions don't have underscores
in the names, but the slpcall functions do.  So rename msn_slp_call_blah
to msn_slpcall_blah

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c	f42a336ba4d0a95efe0af622e84b65a7a96b260a
+++ libpurple/protocols/msn/slp.c	87478502eaff198683ace4f38e3065f654af820d
@@ -115,7 +115,7 @@ msn_xfer_cancel(PurpleXfer *xfer)
 	{
 		if (slpcall->started)
 		{
-			msn_slp_call_close(slpcall);
+			msn_slpcall_close(slpcall);
 		}
 		else
 		{
@@ -128,7 +128,7 @@ msn_xfer_cancel(PurpleXfer *xfer)
 			g_free(content);
 			msn_slplink_unleash(slpcall->slplink);
 
-			msn_slp_call_destroy(slpcall);
+			msn_slpcall_destroy(slpcall);
 		}
 	}
 }
@@ -219,7 +219,7 @@ send_ok(MsnSlpCall *slpcall, const char 
 
 	msn_slplink_queue_slpmsg(slplink, slpmsg);
 
-	msn_slp_call_session_init(slpcall);
+	msn_slpcall_session_init(slpcall);
 }
 
 static void
@@ -588,10 +588,10 @@ got_ok(MsnSlpCall *slpcall,
 		}
 		else
 		{
-			msn_slp_call_session_init(slpcall);
+			msn_slpcall_session_init(slpcall);
 		}
 #else
-		msn_slp_call_session_init(slpcall);
+		msn_slpcall_session_init(slpcall);
 #endif
 	}
 	else if (!strcmp(type, "application/x-msnmsgr-transreqbody"))
@@ -646,7 +646,7 @@ msn_slp_sip_recv(MsnSlpLink *slplink, co
 		char *content;
 		char *content_type;
 
-		slpcall = msn_slp_call_new(slplink);
+		slpcall = msn_slpcall_new(slplink);
 
 		/* From: <msnmsgr:buddy at hotmail.com> */
 #if 0
@@ -711,7 +711,7 @@ msn_slp_sip_recv(MsnSlpLink *slplink, co
 
 			slpcall->wasted = TRUE;
 
-			/* msn_slp_call_destroy(slpcall); */
+			/* msn_slpcall_destroy(slpcall); */
 			return slpcall;
 		}
 
@@ -735,7 +735,7 @@ msn_slp_sip_recv(MsnSlpLink *slplink, co
 		if (slpcall != NULL)
 			slpcall->wasted = TRUE;
 
-		/* msn_slp_call_destroy(slpcall); */
+		/* msn_slpcall_destroy(slpcall); */
 	}
 	else
 		slpcall = NULL;
============================================================
--- libpurple/protocols/msn/slpcall.c	9f217b13a84711e5591964b2789d6b75f309b030
+++ libpurple/protocols/msn/slpcall.c	46b8614abafb5c3e22efce82824b007b010f0bd6
@@ -34,7 +34,7 @@ static gboolean
  **************************************************************************/
 
 static gboolean
-msn_slp_call_timeout(gpointer data)
+msn_slpcall_timeout(gpointer data)
 {
 	MsnSlpCall *slpcall;
 
@@ -46,7 +46,7 @@ msn_slp_call_timeout(gpointer data)
 
 	if (!slpcall->pending && !slpcall->progress)
 	{
-		msn_slp_call_destroy(slpcall);
+		msn_slpcall_destroy(slpcall);
 		return FALSE;
 	}
 
@@ -56,7 +56,7 @@ MsnSlpCall *
 }
 
 MsnSlpCall *
-msn_slp_call_new(MsnSlpLink *slplink)
+msn_slpcall_new(MsnSlpLink *slplink)
 {
 	MsnSlpCall *slpcall;
 
@@ -72,13 +72,13 @@ msn_slp_call_new(MsnSlpLink *slplink)
 
 	msn_slplink_add_slpcall(slplink, slpcall);
 
-	slpcall->timer = purple_timeout_add(MSN_SLPCALL_TIMEOUT, msn_slp_call_timeout, slpcall);
+	slpcall->timer = purple_timeout_add(MSN_SLPCALL_TIMEOUT, msn_slpcall_timeout, slpcall);
 
 	return slpcall;
 }
 
 void
-msn_slp_call_destroy(MsnSlpCall *slpcall)
+msn_slpcall_destroy(MsnSlpCall *slpcall)
 {
 	GList *e;
 
@@ -125,7 +125,7 @@ void
 }
 
 void
-msn_slp_call_init(MsnSlpCall *slpcall, MsnSlpCallType type)
+msn_slpcall_init(MsnSlpCall *slpcall, MsnSlpCallType type)
 {
 	slpcall->session_id = rand() % 0xFFFFFF00 + 4;
 	slpcall->id = rand_guid();
@@ -133,7 +133,7 @@ void
 }
 
 void
-msn_slp_call_session_init(MsnSlpCall *slpcall)
+msn_slpcall_session_init(MsnSlpCall *slpcall)
 {
 	if (slpcall->session_init_cb)
 		slpcall->session_init_cb(slpcall);
@@ -142,7 +142,7 @@ void
 }
 
 void
-msn_slp_call_invite(MsnSlpCall *slpcall, const char *euf_guid,
+msn_slpcall_invite(MsnSlpCall *slpcall, const char *euf_guid,
 					int app_id, const char *context)
 {
 	MsnSlpLink *slplink;
@@ -185,14 +185,14 @@ void
 }
 
 void
-msn_slp_call_close(MsnSlpCall *slpcall)
+msn_slpcall_close(MsnSlpCall *slpcall)
 {
 	g_return_if_fail(slpcall != NULL);
 	g_return_if_fail(slpcall->slplink != NULL);
 
 	send_bye(slpcall, "application/x-msnmsgr-sessionclosebody");
 	msn_slplink_unleash(slpcall->slplink);
-	msn_slp_call_destroy(slpcall);
+	msn_slpcall_destroy(slpcall);
 }
 
 MsnSlpCall *
@@ -234,7 +234,7 @@ msn_slp_process_msg(MsnSlpLink *slplink,
 		slpcall = slplink->directconn->initial_call;
 
 		if (slpcall != NULL)
-			msn_slp_call_session_init(slpcall);
+			msn_slpcall_session_init(slpcall);
 	}
 #endif
 
============================================================
--- libpurple/protocols/msn/slpcall.h	298d3e4f09c57a5c0fcd74139ccc04b0c904b2e1
+++ libpurple/protocols/msn/slpcall.h	365949c0302f0e030926d62a950df1eaba42c387
@@ -43,6 +43,7 @@ struct _MsnSlpCall
 
 struct _MsnSlpCall
 {
+	/* Our parent slplink */
 	MsnSlpLink *slplink;
 
 	MsnSlpCallType type;
@@ -78,12 +79,12 @@ struct _MsnSlpCall
 	guint timer;
 };
 
-MsnSlpCall *msn_slp_call_new(MsnSlpLink *slplink);
-void msn_slp_call_init(MsnSlpCall *slpcall, MsnSlpCallType type);
-void msn_slp_call_session_init(MsnSlpCall *slpcall);
-void msn_slp_call_destroy(MsnSlpCall *slpcall);
-void msn_slp_call_invite(MsnSlpCall *slpcall, const char *euf_guid,
+MsnSlpCall *msn_slpcall_new(MsnSlpLink *slplink);
+void msn_slpcall_init(MsnSlpCall *slpcall, MsnSlpCallType type);
+void msn_slpcall_session_init(MsnSlpCall *slpcall);
+void msn_slpcall_destroy(MsnSlpCall *slpcall);
+void msn_slpcall_invite(MsnSlpCall *slpcall, const char *euf_guid,
 						 int app_id, const char *context);
-void msn_slp_call_close(MsnSlpCall *slpcall);
+void msn_slpcall_close(MsnSlpCall *slpcall);
 
 #endif /* _MSN_SLPCALL_H_ */
============================================================
--- libpurple/protocols/msn/slplink.c	91236c44b19660bce79196e2429cf4791e7af768
+++ libpurple/protocols/msn/slplink.c	4dc11acc33b0fc0859455561f0f1714edf315bba
@@ -104,7 +104,7 @@ msn_slplink_destroy(MsnSlpLink *slplink)
 #endif
 
 	while (slplink->slp_calls != NULL)
-		msn_slp_call_destroy(slplink->slp_calls->data);
+		msn_slpcall_destroy(slplink->slp_calls->data);
 
 	g_queue_free(slplink->slp_msg_queue);
 
@@ -641,7 +641,7 @@ msn_slplink_process_msg(MsnSlpLink *slpl
 		msn_slpmsg_destroy(slpmsg);
 
 		if (slpcall != NULL && slpcall->wasted)
-			msn_slp_call_destroy(slpcall);
+			msn_slpcall_destroy(slpcall);
 	}
 }
 
@@ -730,8 +730,8 @@ msn_slplink_request_ft(MsnSlpLink *slpli
 	g_return_if_fail(slplink != NULL);
 	g_return_if_fail(fp != NULL);
 
-	slpcall = msn_slp_call_new(slplink);
-	msn_slp_call_init(slpcall, MSN_SLPCALL_DC);
+	slpcall = msn_slpcall_new(slplink);
+	msn_slpcall_init(slpcall, MSN_SLPCALL_DC);
 
 	slpcall->session_init_cb = send_file_cb;
 	slpcall->end_cb = msn_xfer_end_cb;
@@ -748,7 +748,7 @@ msn_slplink_request_ft(MsnSlpLink *slpli
 
 	context = gen_context(fn, fp);
 
-	msn_slp_call_invite(slpcall, MSN_FT_GUID, 2, context);
+	msn_slpcall_invite(slpcall, MSN_FT_GUID, 2, context);
 
 	g_free(context);
 }
@@ -771,14 +771,14 @@ msn_slplink_request_object(MsnSlpLink *s
 	msnobj_base64 = purple_base64_encode((const guchar *)msnobj_data, strlen(msnobj_data));
 	g_free(msnobj_data);
 
-	slpcall = msn_slp_call_new(slplink);
-	msn_slp_call_init(slpcall, MSN_SLPCALL_ANY);
+	slpcall = msn_slpcall_new(slplink);
+	msn_slpcall_init(slpcall, MSN_SLPCALL_ANY);
 
 	slpcall->data_info = g_strdup(info);
 	slpcall->cb = cb;
 	slpcall->end_cb = end_cb;
 
-	msn_slp_call_invite(slpcall, MSN_OBJ_GUID, 1, msnobj_base64);
+	msn_slpcall_invite(slpcall, MSN_OBJ_GUID, 1, msnobj_base64);
 
 	g_free(msnobj_base64);
 }


More information about the Commits mailing list