Changes in protocols/yahoo/libyahoo2.c [be915f5:99c8f13]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/libyahoo2.c
rbe915f5 r99c8f13 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 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 } 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); 1545 1538 } 1546 1539 … … 2400 2393 { 2401 2394 struct yahoo_https_auth_data *had = req->data; 2402 struct yahoo_input_data *yid ;2403 struct yahoo_data *yd ;2395 struct yahoo_input_data *yid = had->yid; 2396 struct yahoo_data *yd = yid->yd; 2404 2397 int st; 2405 2406 if (y_list_find(inputs, had->yid) == NULL)2407 return;2408 2409 yid = had->yid;2410 yd = yid->yd;2411 2398 2412 2399 if (req->status_code != 200) { … … 2449 2436 { 2450 2437 struct yahoo_https_auth_data *had = req->data; 2451 struct yahoo_input_data *yid ;2452 struct yahoo_data *yd ;2438 struct yahoo_input_data *yid = had->yid; 2439 struct yahoo_data *yd = yid->yd; 2453 2440 struct yahoo_packet *pack; 2454 char *crumb = NULL;2441 char *crumb; 2455 2442 int st; 2456 2457 if (y_list_find(inputs, had->yid) == NULL)2458 return;2459 2460 yid = had->yid;2461 yd = yid->yd;2462 2443 2463 2444 md5_byte_t result[16]; … … 4099 4080 4100 4081 yd = yid->yd; 4082 4101 4083 old_status = yd->current_status; 4102 yd->current_status = state; 4084 4085 if (msg && strncmp(msg,"Invisible",9)) { 4086 yd->current_status = YAHOO_STATUS_CUSTOM; 4087 } else { 4088 yd->current_status = state; 4089 } 4103 4090 4104 4091 /* Thank you libpurple :) */ … … 4115 4102 snprintf(s, sizeof(s), "%d", yd->current_status); 4116 4103 yahoo_packet_hash(pkt, 10, s); 4117 yahoo_packet_hash(pkt, 19, msg && state == YAHOO_STATUS_CUSTOM ? msg : ""); 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 4118 4111 yahoo_packet_hash(pkt, 47, (away == 2)? "2": (away) ?"1":"0"); 4112 4119 4113 yahoo_send_packet(yid, pkt, 0); 4120 4114 yahoo_packet_free(pkt);
Note: See TracChangeset
for help on using the changeset viewer.