src/protocols/yahoo/yahoo.c

changeset 8243
e40bd494b78e
parent 8235
00045afab151
child 8349
0319a2f4d61d
equal deleted inserted replaced
8242:e90619756c91 8243:e40bd494b78e
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

mercurial