changeset 19746:d55d8050f54d

[gaim-migrate @ 16654] can show the Photo info sucessfully! committed by MaYuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Sun, 06 Aug 2006 16:20:39 +0000
parents bddd32f36bde
children 1b48fbbd0e61
files src/protocols/msn/msn.c src/protocols/msn/msn.h
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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