cpw.qulogic.msn: a5541629: Clean up some #define's in msn.h and var...

qulogic at pidgin.im qulogic at pidgin.im
Mon Jun 23 01:56:36 EDT 2008


-----------------------------------------------------------------
Revision: a55416290c960231dcdcf3632a0e9262906c9a6a
Ancestor: 06c99221eea58f02d027ad50a5439987d725997b
Author: qulogic at pidgin.im
Date: 2008-06-23T05:36:52
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/a55416290c960231dcdcf3632a0e9262906c9a6a

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

ChangeLog: 

Clean up some #define's in msn.h and various supporting changes.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/httpconn.c	5f34edae8977e7556bc312fdd5b7dc77fc91f57a
+++ libpurple/protocols/msn/httpconn.c	b69f0947f08da7d3b211f5ed1f665e1ededdfaa9
@@ -588,7 +588,8 @@ msn_httpconn_write(MsnHttpConn *httpconn
 
 	if (httpconn->virgin)
 	{
-		host = "gateway.messenger.hotmail.com";
+		/* QuLogic: This doesn't look right to me, but it still seems to work */
+		host = MSN_HTTPCONN_SERVER;
 
 		/* The first time servconn->host is the host we should connect to. */
 		params = g_strdup_printf("Action=open&Server=%s&IP=%s",
============================================================
--- libpurple/protocols/msn/msn.c	9f94b0e511809d19bd8d219bc597e9cd2e2b31d9
+++ libpurple/protocols/msn/msn.c	3091971379089842fb9c279daf84a2796f36c720
@@ -2551,11 +2551,11 @@ init_plugin(PurplePlugin *plugin)
 	PurpleAccountOption *option;
 
 	option = purple_account_option_string_new(_("Server"), "server",
-											WLM_SERVER);
+											MSN_SERVER);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 											   option);
 
-	option = purple_account_option_int_new(_("Port"), "port", WLM_PORT);
+	option = purple_account_option_int_new(_("Port"), "port", MSN_PORT);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 											   option);
 
============================================================
--- libpurple/protocols/msn/msn.h	c0faa85e58b26fb5c404e1697a11550abb944b32
+++ libpurple/protocols/msn/msn.h	d1f76a8fa8a3bdcb99f5aeb19fa9643a73d84d35
@@ -57,15 +57,10 @@
 
 #define MSN_BUF_LEN 8192
 
-#define USEROPT_MSNSERVER 3
+/* Windows Live Messenger Server*/
 #define MSN_SERVER "messenger.hotmail.com"
 #define MSN_HTTPCONN_SERVER "gateway.messenger.hotmail.com"
-#define USEROPT_MSNPORT 4
 #define MSN_PORT 1863
-
-/* Windows Live Messenger Server*/
-#define WLM_SERVER			"muser.messenger.hotmail.com"
-#define WLM_PORT			1863
 #define WLM_PROT_VER		15
 
 #define WLM_MAX_PROTOCOL	15
@@ -74,16 +69,13 @@
 #define MSN_TYPING_RECV_TIMEOUT 6
 #define MSN_TYPING_SEND_TIMEOUT	4
 
-#define HOTMAIL_URL "http://www.hotmail.com/cgi-bin/folders"w3
-#define PASSPORT_URL "http://lc1.law13.hotmail.passport.com/cgi-bin/dologin?login="
 #define PROFILE_URL "http://spaces.live.com/profile.aspx?mem="
 #define PHOTO_URL	" contactparams:photopreauthurl=\""
 
-#define USEROPT_HOTMAIL 0
-
 #define BUDDY_ALIAS_MAXLEN 387
 
-#define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}"
+#define MSN_FT_GUID "5D3E02AB-6190-11D3-BBBB-00C04F795683"
+#define MSN_OBJ_GUID "A4268EEC-FEC5-49E5-95C3-F126696BDBF6"
 
 #define MSN_CLIENTINFO \
 	"Client-Name: Purple/" VERSION "\r\n" \
============================================================
--- libpurple/protocols/msn/slp.c	bf3995143d8f9f3306c8a844a3ee77a5a17fc41d
+++ libpurple/protocols/msn/slp.c	ea48d02a103d8b69b43a07c444b9fc9fb1cfdfe4
@@ -251,7 +251,7 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 got_sessionreq(MsnSlpCall *slpcall, const char *branch,
 			   const char *euf_guid, const char *context)
 {
-	if (!strcmp(euf_guid, "A4268EEC-FEC5-49E5-95C3-F126696BDBF6"))
+	if (!strcmp(euf_guid, MSN_OBJ_GUID))
 	{
 		/* Emoticon or UserDisplay */
 		char *content;
@@ -332,7 +332,7 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 		msn_slplink_queue_slpmsg(slplink, slpmsg);
 		purple_imgstore_unref(img);
 	}
-	else if (!strcmp(euf_guid, "5D3E02AB-6190-11D3-BBBB-00C04F795683"))
+	else if (!strcmp(euf_guid, MSN_FT_GUID))
 	{
 		/* File Transfer */
 		PurpleAccount *account;
@@ -384,7 +384,8 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 
 			purple_xfer_request(xfer);
 		}
-	}
+	} else
+		purple_debug_warning("msn", "SLP SessionReq with unknown EUF-GUID: %s\n", euf_guid);
 }
 
 void
============================================================
--- libpurple/protocols/msn/slplink.c	eac0644b512d5c205b97c7a3c2d7565b6900411e
+++ libpurple/protocols/msn/slplink.c	d35e193efad08e04bdf027116afcc2840558f5c3
@@ -774,8 +774,7 @@ msn_slplink_request_ft(MsnSlpLink *slpli
 
 	context = gen_context(fn, fp);
 
-	msn_slp_call_invite(slpcall, "5D3E02AB-6190-11D3-BBBB-00C04F795683", 2,
-						context);
+	msn_slp_call_invite(slpcall, MSN_FT_GUID, 2, context);
 
 	g_free(context);
 }
@@ -805,8 +804,7 @@ msn_slplink_request_object(MsnSlpLink *s
 	slpcall->cb = cb;
 	slpcall->end_cb = end_cb;
 
-	msn_slp_call_invite(slpcall, "A4268EEC-FEC5-49E5-95C3-F126696BDBF6", 1,
-						msnobj_base64);
+	msn_slp_call_invite(slpcall, MSN_OBJ_GUID, 1, msnobj_base64);
 
 	g_free(msnobj_base64);
 }


More information about the Commits mailing list