comparison src/protocols/yahoo/yahoo.c @ 7191:4bd3892cded3

[gaim-migrate @ 7760] Current win32 build system does not support willy nilly C99 variable declarations committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Wed, 08 Oct 2003 17:13:49 +0000
parents 3471c3b1e85c
children 43b76be7796a
comparison
equal deleted inserted replaced
7190:13c725566078 7191:4bd3892cded3
1860 GaimConnection *gc = (GaimConnection *)user_data; 1860 GaimConnection *gc = (GaimConnection *)user_data;
1861 GaimAccount *account = gaim_connection_get_account(gc); 1861 GaimAccount *account = gaim_connection_get_account(gc);
1862 struct yahoo_data *yd = gc->proto_data; 1862 struct yahoo_data *yd = gc->proto_data;
1863 const char *sn = gaim_account_get_username(account); 1863 const char *sn = gaim_account_get_username(account);
1864 const char *pass = gaim_account_get_password(account); 1864 const char *pass = gaim_account_get_password(account);
1865
1866 GHashTable *hash = yahoo_login_page_hash(buf, len); 1865 GHashTable *hash = yahoo_login_page_hash(buf, len);
1867 GString *url = g_string_new("GET /config/login?login="); 1866 GString *url = g_string_new("GET /config/login?login=");
1868 url = g_string_append(url, sn);
1869 url = g_string_append(url, "&passwd=");
1870
1871 char md5[33], *hashp = md5, *chal; 1867 char md5[33], *hashp = md5, *chal;
1872 int i; 1868 int i;
1873 md5_byte_t result[16]; 1869 md5_byte_t result[16];
1874 md5_state_t ctx; 1870 md5_state_t ctx;
1871
1872 url = g_string_append(url, sn);
1873 url = g_string_append(url, "&passwd=");
1874
1875 md5_init(&ctx); 1875 md5_init(&ctx);
1876 md5_append(&ctx, pass, strlen(pass)); 1876 md5_append(&ctx, pass, strlen(pass));
1877 md5_finish(&ctx, result); 1877 md5_finish(&ctx, result);
1878 for (i = 0; i < 16; ++i) { 1878 for (i = 0; i < 16; ++i) {
1879 g_snprintf(hashp, 3, "%02x", result[i]); 1879 g_snprintf(hashp, 3, "%02x", result[i]);