Changeset be609ff for protocols/yahoo/libyahoo2.c
- Timestamp:
- 2010-03-12T19:10:16Z (15 years ago)
- Branches:
- master
- Children:
- dde9d571
- Parents:
- 08e5bb2 (diff), 8b6b740 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/libyahoo2.c
r08e5bb2 rbe609ff 1530 1530 newbud = y_new0(struct yahoo_buddy, 1); 1531 1531 newbud->id = strdup(pair->value); 1532 if (cur_group)1532 if (cur_group) { 1533 1533 newbud->group = strdup(cur_group); 1534 else { 1535 struct yahoo_buddy *lastbud = (struct yahoo_buddy *)y_list_nth( 1536 yd->buddies, y_list_length(yd->buddies)-1)->data; 1537 newbud->group = strdup(lastbud->group); 1534 } else { 1535 YList *last; 1536 struct yahoo_buddy *lastbud; 1537 1538 for (last = yd->buddies; last && last->next; last = last->next); 1539 if (last) { 1540 lastbud = last->data; 1541 newbud->group = strdup(lastbud->group); 1542 } else { 1543 newbud->group = strdup("Buddies"); 1544 } 1538 1545 } 1539 1546 … … 2393 2400 { 2394 2401 struct yahoo_https_auth_data *had = req->data; 2395 struct yahoo_input_data *yid = had->yid;2396 struct yahoo_data *yd = yid->yd;2402 struct yahoo_input_data *yid; 2403 struct yahoo_data *yd; 2397 2404 int st; 2405 2406 if (y_list_find(inputs, had->yid) == NULL) 2407 return; 2408 2409 yid = had->yid; 2410 yd = yid->yd; 2398 2411 2399 2412 if (req->status_code != 200) { … … 2436 2449 { 2437 2450 struct yahoo_https_auth_data *had = req->data; 2438 struct yahoo_input_data *yid = had->yid;2439 struct yahoo_data *yd = yid->yd;2451 struct yahoo_input_data *yid; 2452 struct yahoo_data *yd; 2440 2453 struct yahoo_packet *pack; 2441 char *crumb ;2454 char *crumb = NULL; 2442 2455 int st; 2456 2457 if (y_list_find(inputs, had->yid) == NULL) 2458 return; 2459 2460 yid = had->yid; 2461 yd = yid->yd; 2443 2462 2444 2463 md5_byte_t result[16]; … … 4080 4099 4081 4100 yd = yid->yd; 4082 4083 4101 old_status = yd->current_status; 4084 4085 if (msg && strncmp(msg,"Invisible",9)) { 4086 yd->current_status = YAHOO_STATUS_CUSTOM; 4087 } else { 4088 yd->current_status = state; 4089 } 4102 yd->current_status = state; 4090 4103 4091 4104 /* Thank you libpurple :) */ … … 4102 4115 snprintf(s, sizeof(s), "%d", yd->current_status); 4103 4116 yahoo_packet_hash(pkt, 10, s); 4104 4105 if (yd->current_status == YAHOO_STATUS_CUSTOM) { 4106 yahoo_packet_hash(pkt, 19, msg); 4107 } else { 4108 yahoo_packet_hash(pkt, 19, ""); 4109 } 4110 4117 yahoo_packet_hash(pkt, 19, msg && state == YAHOO_STATUS_CUSTOM ? msg : ""); 4111 4118 yahoo_packet_hash(pkt, 47, (away == 2)? "2": (away) ?"1":"0"); 4112 4113 4119 yahoo_send_packet(yid, pkt, 0); 4114 4120 yahoo_packet_free(pkt);
Note: See TracChangeset
for help on using the changeset viewer.