[gaim-migrate @ 16654] soc.2006.msnp13

Sun, 06 Aug 2006 16:20:39 +0000

author
Ma Yuan <mayuan2006@gmail.com>
date
Sun, 06 Aug 2006 16:20:39 +0000
branch
soc.2006.msnp13
changeset 13862
9d790ad9fc7a
parent 13861
dc0021ad2b73
child 13863
cc43d16e7466

[gaim-migrate @ 16654]
can show the Photo info sucessfully!
committed by MaYuan<mayuan2006@gmail.com>


committer: Ethan Blanton <elb@pidgin.im>

src/protocols/msn/msn.c file | annotate | diff | comparison | revisions
src/protocols/msn/msn.h file | annotate | diff | comparison | revisions
--- a/src/protocols/msn/msn.c	Sun Aug 06 15:16:46 2006 +0000
+++ b/src/protocols/msn/msn.c	Sun Aug 06 16:20:39 2006 +0000
@@ -1390,12 +1390,10 @@
 {
 	char *p, *q;
 
-	if ((p = strstr(url_text, " contactparams:photopreauthurl=\"")) != NULL)
-	{
-		p += strlen(" contactparams:photopreauthurl=\"");
+	if ((p = strstr(url_text, PHOTO_URL)) != NULL){
+		p += strlen(PHOTO_URL);
 	}
-
-	if (p && (strncmp(p, "http://", 8) == 0) && ((q = strchr(p, '"')) != NULL))
+	if (p && (strncmp(p, "http://",strlen("http://")) == 0) && ((q = strchr(p, '"')) != NULL))
 			return g_strndup(p, q - p);
 
 	return NULL;
@@ -1809,6 +1807,7 @@
 #if PHOTO_SUPPORT
 	/* Find the URL to the photo; must be before the marshalling [Bug 994207] */
 	photo_url_text = msn_get_photo_url(url_text);
+	gaim_debug_info("Ma Yuan","photo url:{%s}\n",photo_url_text);
 
 	/* Marshall the existing state */
 	info2_data = g_malloc0(sizeof(MsnGetInfoStepTwoData));
--- a/src/protocols/msn/msn.h	Sun Aug 06 15:16:46 2006 +0000
+++ b/src/protocols/msn/msn.h	Sun Aug 06 16:20:39 2006 +0000
@@ -79,6 +79,7 @@
 #define PASSPORT_URL "http://lc1.law13.hotmail.passport.com/cgi-bin/dologin?login="
 /*#define PROFILE_URL "http://spaces.msn.com/profile.aspx?mem="*/
 #define PROFILE_URL "http://spaces.live.com/profile.aspx?mem="
+#define PHOTO_URL	" contactparams:photopreauthurl=\""
 
 #define USEROPT_HOTMAIL 0
 

mercurial