Changeset d7edadf
- Timestamp:
- 2011-12-06T00:53:34Z (13 years ago)
- Branches:
- master
- Children:
- b041b52
- Parents:
- d18db32f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/libyahoo2.c
rd18db32f rd7edadf 1809 1809 struct yahoo_input_data *yid = had->yid; 1810 1810 struct yahoo_data *yd = yid->yd; 1811 struct http_request *req;1812 1811 char *login, *passwd, *chal; 1813 1812 char *url; … … 1823 1822 (int) time(NULL), login, passwd, chal); 1824 1823 1825 req =http_dorequest_url(url, yahoo_https_auth_token_finish, had);1824 http_dorequest_url(url, yahoo_https_auth_token_finish, had); 1826 1825 1827 1826 g_free(url); … … 1870 1869 static void yahoo_https_auth_init(struct yahoo_https_auth_data *had) 1871 1870 { 1872 struct http_request *req;1873 1871 char *url; 1874 1872 … … 1876 1874 (int) time(NULL), had->token); 1877 1875 1878 req =http_dorequest_url(url, yahoo_https_auth_finish, had);1876 http_dorequest_url(url, yahoo_https_auth_finish, had); 1879 1877 1880 1878 g_free(url); … … 1990 1988 { 1991 1989 struct yahoo_data *yd = yid->yd; 1992 char *login_id;1993 char *handle;1994 1990 char *url = NULL; 1995 1991 int login_status = -1; … … 2000 1996 struct yahoo_pair *pair = l->data; 2001 1997 if (pair->key == 0) 2002 login_id = pair->value;1998 ; /* login_id */ 2003 1999 else if (pair->key == 1) 2004 handle = pair->value;2000 ; /* handle */ 2005 2001 else if (pair->key == 20) 2006 2002 url = pair->value; … … 2089 2085 char *msg = NULL; 2090 2086 char *name = NULL; 2091 long tm = 0L;2092 2087 int state = YAHOO_STATUS_AVAILABLE; 2093 int online = 0;2094 2088 int away = 0; 2095 2089 int idle = 0; … … 2111 2105 state = strtol(pair->value, NULL, 10); 2112 2106 else if (pair->key == 15) 2113 tm = strtol(pair->value, NULL, 10);2107 ; /* tm */ 2114 2108 else if (pair->key == 13) 2115 online = strtol(pair->value, NULL, 10);2109 ; /* online */ 2116 2110 else if (pair->key == 47) 2117 2111 away = strtol(pair->value, NULL, 10); … … 2140 2134 char *where = NULL; 2141 2135 int status = 0; 2142 char *me = NULL;2143 2136 2144 2137 struct yahoo_buddy *bud = NULL; … … 2148 2141 struct yahoo_pair *pair = l->data; 2149 2142 if (pair->key == 1) 2150 me = pair->value;2143 ; /* Me... don't care */ 2151 2144 if (pair->key == 7) 2152 2145 who = pair->value; … … 2204 2197 char *who = NULL; 2205 2198 char *where = NULL; 2206 int unk_66 = 0;2207 char *me = NULL;2208 2199 struct yahoo_buddy *bud; 2209 2200 … … 2214 2205 struct yahoo_pair *pair = l->data; 2215 2206 if (pair->key == 1) 2216 me = pair->value;2207 ; /* Me... don't care */ 2217 2208 else if (pair->key == 7) 2218 2209 who = pair->value; … … 2220 2211 where = pair->value; 2221 2212 else if (pair->key == 66) 2222 unk_66 = strtol(pair->value, NULL, 10);2213 ; /* unk_66 */ 2223 2214 else 2224 2215 DEBUG_MSG(("unknown key: %d = %s", pair->key, … … 2256 2247 struct yahoo_packet *pkt) 2257 2248 { 2258 char *who = NULL;2259 int status = 0;2260 char *me = NULL;2261 int un_ignore = 0;2262 2263 2249 YList *l; 2264 2250 for (l = pkt->hash; l; l = l->next) { 2265 2251 struct yahoo_pair *pair = l->data; 2266 2252 if (pair->key == 0) 2267 who = pair->value;2253 ; /* who */ 2268 2254 if (pair->key == 1) 2269 me = pair->value;2255 ; /* Me... don't care */ 2270 2256 if (pair->key == 13) /* 1 == ignore, 2 == unignore */ 2271 un_ignore = strtol(pair->value, NULL, 10);2257 ; 2272 2258 if (pair->key == 66) 2273 status = strtol(pair->value, NULL, 10);2259 ; /* status */ 2274 2260 } 2275 2261 … … 2293 2279 char *me = NULL; 2294 2280 char *room = NULL; 2295 char *voice_room = NULL;2296 2281 2297 2282 YList *l; … … 2303 2288 me = pair->value; 2304 2289 if (pair->key == 13) 2305 voice_room = pair->value;2290 ; /* voice room */ 2306 2291 if (pair->key == 57) 2307 2292 room = pair->value; … … 2438 2423 struct yahoo_packet *pkt) 2439 2424 { 2440 char *me = NULL;2441 2425 char *key = NULL; 2442 2426 char *who = NULL; … … 2447 2431 struct yahoo_pair *pair = l->data; 2448 2432 if (pair->key == 5) 2449 me = pair->value;2433 ; /* me */ 2450 2434 if (pair->key == 61) 2451 2435 key = pair->value; … … 3369 3353 struct yahoo_webcam *wcm = y->wcm; 3370 3354 struct yahoo_input_data *yid; 3371 struct yahoo_server_settings *yss;3372 3355 3373 3356 if (!wcm || !wcm->server || !wcm->key) … … 3381 3364 yid->wcm = y->wcm; 3382 3365 y->wcm = NULL; 3383 3384 yss = y->yd->server_settings;3385 3366 3386 3367 yid->wcd = y_new0(struct yahoo_webcam_data, 1); … … 4975 4956 YList *l; 4976 4957 struct send_file_data *sfd; 4977 char *who = NULL;4978 char *filename = NULL;4979 4958 char *id = NULL; 4980 4959 char *token = NULL; … … 4984 4963 switch (pair->key) { 4985 4964 case 4: 4986 who = pair->value;4965 /* who */ 4987 4966 break; 4988 4967 case 5: … … 4998 4977 break; 4999 4978 case 27: 5000 filename = pair->value;4979 /* filename */ 5001 4980 break; 5002 4981 } … … 5023 5002 { 5024 5003 YList *l; 5025 char *who = NULL;5026 char *filename = NULL;5027 5004 char *id = NULL; 5028 5005 char *token = NULL; … … 5036 5013 case 1: 5037 5014 case 4: 5038 who = pair->value;5015 /* who */ 5039 5016 break; 5040 5017 case 5: … … 5053 5030 break; 5054 5031 case 27: 5055 filename = pair->value;5032 /* filename */ 5056 5033 break; 5057 5034 }
Note: See TracChangeset
for help on using the changeset viewer.