Changeset b054fad
- Timestamp:
- 2008-04-02T22:57:17Z (17 years ago)
- Branches:
- master
- Children:
- 76eb071
- Parents:
- 51dc72d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
r51dc72d rb054fad 109 109 char *info_homepage; 110 110 char *info_about; 111 /* When a call fails, we get the reason and later we get the failure 112 * event, so store the failure code here till then */ 113 int failurereason; 111 114 }; 112 115 … … 234 237 235 238 return ret; 239 } 240 241 static char *skype_call_strerror(int err) 242 { 243 switch(err) { 244 case 1: 245 return "Miscellaneous error"; 246 case 2: 247 return "User or phone number does not exist."; 248 case 3: 249 return "User is offline"; 250 case 4: 251 return "No proxy found"; 252 case 5: 253 return "Session terminated."; 254 case 6: 255 return "No common codec found."; 256 case 7: 257 return "Sound I/O error."; 258 case 8: 259 return "Problem with remote sound device."; 260 case 9: 261 return "Call blocked by recipient."; 262 case 10: 263 return "Recipient not a friend."; 264 case 11: 265 return "Current user not authorized by recipient."; 266 case 12: 267 return "Sound recording error."; 268 default: 269 return "Unknown error"; 270 } 236 271 } 237 272 … … 593 628 *info = '\0'; 594 629 info++; 595 if(!strcmp(info, "STATUS RINGING")) 630 if(!strncmp(info, "FAILUREREASON ", 14)) 631 sd->failurereason = atoi(strchr(info, ' ')); 632 else if(!strcmp(info, "STATUS RINGING")) 596 633 { 597 634 if(sd->call_id) … … 633 670 sd->call_id = g_strdup(id); 634 671 sd->call_out = TRUE; 672 } 673 else if(!strcmp(info, "STATUS FAILED")) 674 { 675 imcb_error(ic, "Call failed: %s", skype_call_strerror(sd->failurereason)); 635 676 } 636 677 else if(!strncmp(info, "DURATION ", 9))
Note: See TracChangeset
for help on using the changeset viewer.