Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 31534:a8cc50c2279f
Remove trailing whitespace
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 04 Jan 2011 06:55:30 +0000 |
parents | 86598f5d7ebd |
children | fa88dc1dcabb d88f3153170b ea2a155b4439 |
comparison
equal
deleted
inserted
replaced
31533:44f53d3fc54f | 31534:a8cc50c2279f |
---|---|
847 else | 847 else |
848 serv_got_typing_stopped(gc, fed_from); | 848 serv_got_typing_stopped(gc, fed_from); |
849 | 849 |
850 if (fed_from != from) | 850 if (fed_from != from) |
851 g_free(fed_from); | 851 g_free(fed_from); |
852 | 852 |
853 } else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) { | 853 } else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) { |
854 PurpleBuddy *bud = purple_find_buddy(account, from); | 854 PurpleBuddy *bud = purple_find_buddy(account, from); |
855 | 855 |
856 if (!bud) { | 856 if (!bud) { |
857 purple_debug_warning("yahoo", | 857 purple_debug_warning("yahoo", |
1010 default: | 1010 default: |
1011 im->fed_from = g_strdup(im->from); | 1011 im->fed_from = g_strdup(im->from); |
1012 break; | 1012 break; |
1013 } | 1013 } |
1014 purple_debug_info("yahoo", "Message from federated (%d) buddy %s.\n", im->fed, im->fed_from); | 1014 purple_debug_info("yahoo", "Message from federated (%d) buddy %s.\n", im->fed, im->fed_from); |
1015 | 1015 |
1016 } | 1016 } |
1017 /* peer session id */ | 1017 /* peer session id */ |
1018 if (im && (pair->key == 11)) { | 1018 if (im && (pair->key == 11)) { |
1019 /* disconnect the peer if connected through p2p and sends wrong value for session id */ | 1019 /* disconnect the peer if connected through p2p and sends wrong value for session id */ |
1020 if( (im->fed == YAHOO_FEDERATION_NONE) && (pkt_type == YAHOO_PKT_TYPE_P2P) | 1020 if( (im->fed == YAHOO_FEDERATION_NONE) && (pkt_type == YAHOO_PKT_TYPE_P2P) |
1215 1, add_req->id, | 1215 1, add_req->id, |
1216 5, who, | 1216 5, who, |
1217 13, 1, | 1217 13, 1, |
1218 334, 0); | 1218 334, 0); |
1219 } | 1219 } |
1220 | 1220 |
1221 yahoo_packet_send_and_free(pkt, yd); | 1221 yahoo_packet_send_and_free(pkt, yd); |
1222 | 1222 |
1223 g_free(add_req->id); | 1223 g_free(add_req->id); |
1224 g_free(add_req->who); | 1224 g_free(add_req->who); |
1225 g_free(add_req); | 1225 g_free(add_req); |
1312 | 1312 |
1313 static void yahoo_buddy_auth_req_15(PurpleConnection *gc, struct yahoo_packet *pkt) { | 1313 static void yahoo_buddy_auth_req_15(PurpleConnection *gc, struct yahoo_packet *pkt) { |
1314 PurpleAccount *account; | 1314 PurpleAccount *account; |
1315 GSList *l = pkt->hash; | 1315 GSList *l = pkt->hash; |
1316 const char *msg = NULL; | 1316 const char *msg = NULL; |
1317 | 1317 |
1318 account = purple_connection_get_account(gc); | 1318 account = purple_connection_get_account(gc); |
1319 | 1319 |
1320 /* Buddy authorized/declined our addition */ | 1320 /* Buddy authorized/declined our addition */ |
1321 if (pkt->status == 1) { | 1321 if (pkt->status == 1) { |
1322 char *temp = NULL; | 1322 char *temp = NULL; |
1722 | 1722 |
1723 to_y64(base64_string, md5_digest, 16); | 1723 to_y64(base64_string, md5_digest, 16); |
1724 | 1724 |
1725 purple_debug_info("yahoo", "yahoo status: %d\n", yd->current_status); | 1725 purple_debug_info("yahoo", "yahoo status: %d\n", yd->current_status); |
1726 pkt = yahoo_packet_new(YAHOO_SERVICE_AUTHRESP, yd->current_status, yd->session_id); | 1726 pkt = yahoo_packet_new(YAHOO_SERVICE_AUTHRESP, yd->current_status, yd->session_id); |
1727 | 1727 |
1728 if(yd->cookie_b) { /* send B cookie if we have it */ | 1728 if(yd->cookie_b) { /* send B cookie if we have it */ |
1729 yahoo_packet_hash(pkt, "ssssssssss", | 1729 yahoo_packet_hash(pkt, "ssssssssss", |
1730 1, name, | 1730 1, name, |
1731 0, name, | 1731 0, name, |
1732 277, yd->cookie_y, | 1732 277, yd->cookie_y, |
1793 gboolean try_login_on_error = FALSE; | 1793 gboolean try_login_on_error = FALSE; |
1794 | 1794 |
1795 purple_debug_info("yahoo","Authentication: In yahoo_auth16_stage2\n"); | 1795 purple_debug_info("yahoo","Authentication: In yahoo_auth16_stage2\n"); |
1796 | 1796 |
1797 yd->url_datas = g_slist_remove(yd->url_datas, url_data); | 1797 yd->url_datas = g_slist_remove(yd->url_datas, url_data); |
1798 | 1798 |
1799 if (error_message != NULL) { | 1799 if (error_message != NULL) { |
1800 purple_debug_error("yahoo", "Login Failed, unable to retrieve stage 2 url: %s\n", error_message); | 1800 purple_debug_error("yahoo", "Login Failed, unable to retrieve stage 2 url: %s\n", error_message); |
1801 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_message); | 1801 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_message); |
1802 g_free(auth_data->seed); | 1802 g_free(auth_data->seed); |
1803 g_free(auth_data); | 1803 g_free(auth_data); |
1807 gchar **splits = g_strsplit(ret_data, "\r\n\r\n", -1), **split_data = NULL; | 1807 gchar **splits = g_strsplit(ret_data, "\r\n\r\n", -1), **split_data = NULL; |
1808 int totalelements = 0; | 1808 int totalelements = 0; |
1809 int response_no = -1; | 1809 int response_no = -1; |
1810 char *crumb = NULL; | 1810 char *crumb = NULL; |
1811 char *crypt = NULL; | 1811 char *crypt = NULL; |
1812 | 1812 |
1813 if(g_strv_length(splits) > 1) { | 1813 if(g_strv_length(splits) > 1) { |
1814 yd->cookie_b = yahoo_auth16_get_cookie_b(splits[0]); | 1814 yd->cookie_b = yahoo_auth16_get_cookie_b(splits[0]); |
1815 split_data = g_strsplit(splits[1], "\r\n", -1); | 1815 split_data = g_strsplit(splits[1], "\r\n", -1); |
1816 totalelements = g_strv_length(split_data); | 1816 totalelements = g_strv_length(split_data); |
1817 } | 1817 } |
4699 break; | 4699 break; |
4700 case YAHOO_FEDERATION_NONE: | 4700 case YAHOO_FEDERATION_NONE: |
4701 default: | 4701 default: |
4702 break; | 4702 break; |
4703 } | 4703 } |
4704 | 4704 |
4705 yahoo_packet_hash(pkt, "ssssss", 49, "TYPING", 1, purple_connection_get_display_name(gc), | 4705 yahoo_packet_hash(pkt, "ssssss", 49, "TYPING", 1, purple_connection_get_display_name(gc), |
4706 14, " ", 13, state == PURPLE_TYPING ? "1" : "0", | 4706 14, " ", 13, state == PURPLE_TYPING ? "1" : "0", |
4707 5, fed_who, 1002, "1"); | 4707 5, fed_who, 1002, "1"); |
4708 if (fed) | 4708 if (fed) |
4709 yahoo_packet_hash_int(pkt, 241, fed); | 4709 yahoo_packet_hash_int(pkt, 241, fed); |
5104 | 5104 |
5105 if(fed) | 5105 if(fed) |
5106 yahoo_packet_hash(pkt, "ssis", 1, purple_connection_get_display_name(gc), 7, who+4, 241, fed, 13, "2"); | 5106 yahoo_packet_hash(pkt, "ssis", 1, purple_connection_get_display_name(gc), 7, who+4, 241, fed, 13, "2"); |
5107 else | 5107 else |
5108 yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "2"); | 5108 yahoo_packet_hash(pkt, "sss", 1, purple_connection_get_display_name(gc), 7, who, 13, "2"); |
5109 | 5109 |
5110 yahoo_packet_send_and_free(pkt, yd); | 5110 yahoo_packet_send_and_free(pkt, yd); |
5111 } | 5111 } |
5112 | 5112 |
5113 void yahoo_set_permit_deny(PurpleConnection *gc) | 5113 void yahoo_set_permit_deny(PurpleConnection *gc) |
5114 { | 5114 { |