Changeset 4ff0966 for protocols/msn
- Timestamp:
- 2006-05-28T23:13:47Z (19 years ago)
- Branches:
- master
- Children:
- df417ca
- Parents:
- cdca30b (diff), 79b6213 (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. - Location:
- protocols/msn
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
rcdca30b r4ff0966 656 656 if( key == NULL ) 657 657 { 658 hide_login_progress( gc, "Error during Passport authentication" ); 658 char *err; 659 660 err = g_strdup_printf( "Error during Passport authentication (%s)", 661 rep->error_string ? rep->error_string : "Unknown error" ); 662 663 hide_login_progress( gc, err ); 659 664 signoff( gc ); 665 666 g_free( err ); 660 667 } 661 668 else -
protocols/msn/passport.c
rcdca30b r4ff0966 69 69 } 70 70 71 reqs = g_malloc( strlen( header ) + strlen( dummy ) + 128 ); 72 sprintf( reqs, "GET %s HTTP/1.0\r\n%s\r\n\r\n", dummy, header ); 71 reqs = g_strdup_printf( "GET %s HTTP/1.0\r\n%s\r\n\r\n", dummy, header ); 73 72 74 73 *dummy = 0; … … 88 87 struct passport_reply *rep = req->data; 89 88 90 if( !g_slist_find( msn_connections, rep->data ) || !req->finished || !req->reply_headers)89 if( !g_slist_find( msn_connections, rep->data ) ) 91 90 { 92 91 destroy_reply( rep ); … … 94 93 } 95 94 96 if( req-> status_code == 200 )95 if( req->finished && req->reply_headers && req->status_code == 200 ) 97 96 { 98 97 char *dummy; … … 109 108 rep->result = g_strdup( dummy ); 110 109 } 110 else 111 { 112 rep->error_string = g_strdup( "Could not parse Passport server response" ); 113 } 114 } 115 else 116 { 117 rep->error_string = g_strdup_printf( "HTTP error: %s", 118 req->status_string ? req->status_string : "Unknown error" ); 111 119 } 112 120 … … 145 153 } 146 154 147 #define PPR_REQUEST "GET /rdr/pprdr.asp HTTP/1.0\r\n\r\n"148 155 static int passport_retrieve_dalogin( gpointer func, gpointer data, char *header ) 149 156 { … … 155 162 rep->header = header; 156 163 157 req = http_dorequest ( "nexus.passport.com", 443, 1, PPR_REQUEST, passport_retrieve_dalogin_ready, rep );164 req = http_dorequest_url( "https://nexus.passport.com/rdr/pprdr.asp", passport_retrieve_dalogin_ready, rep ); 158 165 159 166 if( !req ) … … 169 176 char *urlend; 170 177 171 if( !g_slist_find( msn_connections, rep->data ) || !req->finished || !req->reply_headers)178 if( !g_slist_find( msn_connections, rep->data ) ) 172 179 { 173 180 destroy_reply( rep ); … … 175 182 } 176 183 184 if( !req->finished || !req->reply_headers || req->status_code != 200 ) 185 { 186 rep->error_string = g_strdup_printf( "HTTP error while fetching DALogin: %s", 187 req->status_string ? req->status_string : "Unknown error" ); 188 goto failure; 189 } 190 177 191 dalogin = strstr( req->reply_headers, "DALogin=" ); 178 192 179 193 if( !dalogin ) 194 { 195 rep->error_string = g_strdup( "Parse error while fetching DALogin" ); 180 196 goto failure; 197 } 181 198 182 199 dalogin += strlen( "DALogin=" ); … … 208 225 g_free( rep->result ); 209 226 g_free( rep->header ); 227 g_free( rep->error_string ); 210 228 g_free( rep ); 211 229 } -
protocols/msn/passport.h
rcdca30b r4ff0966 39 39 char *result; 40 40 char *header; 41 char *error_string; 41 42 }; 42 43 -
protocols/msn/sb.c
rcdca30b r4ff0966 529 529 { 530 530 msn_sb_destroy( sb ); 531 return ( 0 );532 } 533 if( err->flags & STATUS_FATAL )531 return 0; 532 } 533 else if( err->flags & STATUS_FATAL ) 534 534 { 535 535 signoff( gc ); 536 return ( 0 );537 } 538 if( err->flags & STATUS_SB_IM_SPARE )536 return 0; 537 } 538 else if( err->flags & STATUS_SB_IM_SPARE ) 539 539 { 540 540 if( sb->who ) … … 559 559 sb->msgq = NULL; 560 560 } 561 562 /* Do NOT return 0 here, we want to keep this sb. */ 561 563 } 562 564 } -
protocols/msn/tables.c
rcdca30b r4ff0966 127 127 128 128 { 910, "Server is busy", STATUS_FATAL }, 129 { 911, "Authentication failed", STATUS_ FATAL },129 { 911, "Authentication failed", STATUS_SB_FATAL | STATUS_FATAL }, 130 130 { 912, "Server is busy", STATUS_FATAL }, 131 131 { 913, "Not allowed when hiding", 0 },
Note: See TracChangeset
for help on using the changeset viewer.