diff src/protocols/gg/libgg.c @ 9663:318d14658f95

[gaim-migrate @ 10513] gg fix from proton committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 04 Aug 2004 18:27:09 +0000
parents 1c4092217e4a
children db62420a53a2
line wrap: on
line diff
--- a/src/protocols/gg/libgg.c	Wed Aug 04 02:57:45 2004 +0000
+++ b/src/protocols/gg/libgg.c	Wed Aug 04 18:27:09 2004 +0000
@@ -1,4 +1,4 @@
-/* $Id: libgg.c 10230 2004-06-27 18:19:09Z lschiere $ */
+/* $Id: libgg.c 10513 2004-08-04 18:27:09Z lschiere $ */
 
 /*
  *  (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl>,
@@ -73,7 +73,7 @@
 #ifdef __GNUC__
 __attribute__ ((unused))
 #endif
-= "$Id: libgg.c 10230 2004-06-27 18:19:09Z lschiere $";
+= "$Id: libgg.c 10513 2004-08-04 18:27:09Z lschiere $";
 
 #endif 
 
@@ -1326,18 +1326,18 @@
 
 			if (gg_http_use_proxy) {
 				g_snprintf(buf, sizeof(buf) - 1,
-					"GET http://" GG_APPMSG_HOST "/appsvc/appmsg.asp?fmnumber=%lu HTTP/1.0\r\n"
+					"GET http://" GG_APPMSG_HOST "/appsvc/appmsg2.asp?fmnumber=%lu&version=%s&lastmsg=0 HTTP/1.0\r\n"
 					"Host: " GG_APPMSG_HOST "\r\n"
 					"User-Agent: " GG_HTTP_USERAGENT "\r\n"
 					"Pragma: no-cache\r\n"
-					"\r\n", sess->uin);
+					"\r\n", sess->uin, gg_urlencode(GG_DEFAULT_CLIENT_VERSION));
 			} else {
 				g_snprintf(buf, sizeof(buf) - 1,
-					"GET /appsvc/appmsg.asp?fmnumber=%lu HTTP/1.0\r\n"
+					"GET /appsvc/appmsg2.asp?fmnumber=%lu&version=%s&lastmsg=0 HTTP/1.0\r\n"
 					"Host: " GG_APPMSG_HOST "\r\n"
 					"User-Agent: " GG_HTTP_USERAGENT "\r\n"
 					"Pragma: no-cache\r\n"
-					"\r\n", sess->uin);
+					"\r\n", sess->uin, gg_urlencode(GG_DEFAULT_CLIENT_VERSION));
 			};
 
     			gg_debug(GG_DEBUG_MISC, "=> -----BEGIN-HTTP-QUERY-----\n%s\n=> -----END-HTTP-QUERY-----\n", buf);
@@ -1392,21 +1392,13 @@
 			tmp = buf;
 			
 			while (*tmp && *tmp != ' ')
-				tmp++;
-			while (*tmp && *tmp == ' ')
-				tmp++;
-			while (*tmp && *tmp != ' ')
-				tmp++;
-			while (*tmp && *tmp == ' ')
-				tmp++;
-			while (*tmp && *tmp != ' ')
-				tmp++;
-			while (*tmp && *tmp == ' ')
-				tmp++;
-			host = tmp;
-			while (*tmp && *tmp != ' ')
-				tmp++;
-			*tmp = 0;
+                                tmp++;
+                        while (*tmp && *tmp == ' ')
+                                tmp++;
+                        host = tmp;
+                        while (*tmp && *tmp != ' ')
+                                tmp++;
+                        *tmp = 0;
 
 			if ((tmp = strchr(host, ':'))) {
 				*tmp = 0;