comparison src/protocols/yahoo/yahoo.c @ 8243:217643616a74

[gaim-migrate @ 8966] a yahoo patch from Daniel (datallah) Atallah that i wish we didn't need, and another: "When the auto-reconnect plugin is unloaded, it doesn't unregister the "signed-off" account event listener, causing it to continue to try to reconnect you even if it isn't loaded. This unregisters the listener when the plugin is unloaded and also prevents any pending reconnect events from being attempted when the timeout fires." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 12 Feb 2004 19:17:54 +0000
parents 63c7a16a2c09
children f1ca7e06e8de
comparison
equal deleted inserted replaced
8242:1c06cadec61a 8243:217643616a74
1915 static void yahoo_web_pending(gpointer data, gint source, GaimInputCondition cond) 1915 static void yahoo_web_pending(gpointer data, gint source, GaimInputCondition cond)
1916 { 1916 {
1917 GaimConnection *gc = data; 1917 GaimConnection *gc = data;
1918 GaimAccount *account = gaim_connection_get_account(gc); 1918 GaimAccount *account = gaim_connection_get_account(gc);
1919 struct yahoo_data *yd = gc->proto_data; 1919 struct yahoo_data *yd = gc->proto_data;
1920 char buf[1024], *i = buf; 1920 char buf[2048], *i = buf;
1921 int len; 1921 int len;
1922 GString *s; 1922 GString *s;
1923 1923
1924 len = read(source, buf, sizeof(buf)-1); 1924 len = read(source, buf, sizeof(buf)-1);
1925 if (len <= 0 || (strncmp(buf, "HTTP/1.0 302", strlen("HTTP/1.0 302")) && 1925 if (len <= 0 || (strncmp(buf, "HTTP/1.0 302", strlen("HTTP/1.0 302")) &&
1931 s = g_string_sized_new(len); 1931 s = g_string_sized_new(len);
1932 buf[sizeof(buf)-1] = '\0'; 1932 buf[sizeof(buf)-1] = '\0';
1933 1933
1934 while ((i = strstr(i, "Set-Cookie: "))) { 1934 while ((i = strstr(i, "Set-Cookie: "))) {
1935 i += strlen("Set-Cookie: "); 1935 i += strlen("Set-Cookie: ");
1936 for (;*i != ';'; i++) 1936 for (;*i != ';' && *i != '\0'; i++)
1937 g_string_append_c(s, *i); 1937 g_string_append_c(s, *i);
1938 1938
1939 g_string_append(s, "; "); 1939 g_string_append(s, "; ");
1940 } 1940 }
1941 1941