changeset 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 cedb8474b255
children ce26d84eed8f
files ChangeLog src/protocols/gg/libgg.c src/protocols/gg/libgg.h
diffstat 3 files changed, 19 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 04 02:57:45 2004 +0000
+++ b/ChangeLog	Wed Aug 04 18:27:09 2004 +0000
@@ -12,6 +12,7 @@
 	* Yahoo! away messages can be 255 characters long now
 
 	Bug Fixes:
+	* Gadu-Gadu should connect again (Andrew Wellington)
 	* Novell fixes (Mike Stoddard of Novell):
 		* Fixed reconnect crash
 		* Fixed duplicate root folder bug
--- 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;
--- a/src/protocols/gg/libgg.h	Wed Aug 04 02:57:45 2004 +0000
+++ b/src/protocols/gg/libgg.h	Wed Aug 04 18:27:09 2004 +0000
@@ -1,4 +1,4 @@
-/* $Id: libgg.h 10230 2004-06-27 18:19:09Z lschiere $ */
+/* $Id: libgg.h 10513 2004-08-04 18:27:09Z lschiere $ */
 
 /*
  *  (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl>,
@@ -449,16 +449,17 @@
 char *gg_urlencode(const char *str);
 int gg_http_hash(const unsigned char *email, const unsigned char *password);
 
-#define GG_APPMSG_HOST "appmsg.gadugadu.pl"
+#define GG_APPMSG_HOST "appmsg.gadu-gadu.pl"
 #define GG_APPMSG_PORT 80
-#define GG_PUBDIR_HOST "pubdir.gadugadu.pl"
+#define GG_PUBDIR_HOST "pubdir.gadu-gadu.pl"
 #define GG_PUBDIR_PORT 80
-#define GG_REGISTER_HOST "register.gadugadu.pl"
+#define GG_REGISTER_HOST "register.gadu-gadu.pl"
 #define GG_REGISTER_PORT 80
 #define GG_DEFAULT_PORT 8074
 #define GG_HTTPS_PORT 443
 #define GG_HTTP_USERAGENT "Mozilla/4.0 (compatible MSIE 5.0; Windows 98; I)"
 #define GG_HAS_AUDIO_MASK 0x40000000
+#define GG_DEFAULT_CLIENT_VERSION "6, 0, 0, 132"
 
 struct gg_header {
 	unsigned long type;		/* typ pakietu */