Ignore:
Timestamp:
Jun 25, 2009 11:17:17 AM (15 years ago)
Author:
bennylp
Message:

Ticket #799: UAC disconnect call when receiving BYE in early state (thanks Gang Liu for the suggestion)

  • backported changes from #798
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.0/pjsip-apps/src/pjsua/pjsua_app.c

    r2544 r2800  
    37603760            if (result.nb_result != NO_NB) { 
    37613761 
    3762                 if (result.nb_result == -1 || result.nb_result == 0) { 
     3762                if (result.nb_result == -1) { 
    37633763                    puts("Sorry you can't do that!"); 
    37643764                    continue; 
     3765                } else if (result.nb_result == 0) { 
     3766                    uri = NULL; 
     3767                    if (current_call == PJSUA_INVALID_ID) { 
     3768                        puts("No current call"); 
     3769                        continue; 
     3770                    } 
    37653771                } else { 
    37663772                    pjsua_buddy_info binfo; 
     
    37733779            } 
    37743780             
    3775             tmp = pj_str(uri); 
    3776  
    3777             send_request(text, &tmp); 
     3781            if (uri) { 
     3782                tmp = pj_str(uri); 
     3783                send_request(text, &tmp); 
     3784            } else { 
     3785                /* If you send call control request using this method 
     3786                 * (such requests includes BYE, CANCEL, etc.), it will 
     3787                 * not go well with the call state, so don't do it 
     3788                 * unless it's for testing. 
     3789                 */ 
     3790                pj_str_t method = pj_str(text); 
     3791                pjsua_call_send_request(current_call, &method, NULL); 
     3792            } 
    37783793            break; 
    37793794 
Note: See TracChangeset for help on using the changeset viewer.