Ignore:
Timestamp:
Oct 12, 2009 7:44:14 AM (15 years ago)
Author:
bennylp
Message:

Ticket #411: Cannot update account presence's status while previous PUBLISH is in progress (thanks Olivier Beytrison for the report)

  • enable request queueing. If PUBLISH is to be sent while another one is still in progress, queue the request and send it later when the ongoing request completes
  • this behavior is controlled by new pjsip_publishc_opt structure to control session's options
  • default behavior is to queue the request
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c

    r2824 r2940  
    10741074    /* Send the PUBLISH request */ 
    10751075    status = pjsip_publishc_send(acc->publish_sess, tdata); 
    1076     if (status != PJ_SUCCESS) { 
     1076    if (status == PJ_EPENDING) { 
     1077        PJ_LOG(3,(THIS_FILE, "Previous request is in progress, " 
     1078                  "PUBLISH request is queued")); 
     1079    } else if (status != PJ_SUCCESS) { 
    10771080        pjsua_perror(THIS_FILE, "Error sending PUBLISH request", status); 
    10781081        goto on_error; 
     
    11031106 
    11041107        /* Create client publication */ 
    1105         status = pjsip_publishc_create(pjsua_var.endpt, 0, acc, &publish_cb, 
     1108        status = pjsip_publishc_create(pjsua_var.endpt, &acc_cfg->publish_opt,  
     1109                                       acc, &publish_cb, 
    11061110                                       &acc->publish_sess); 
    11071111        if (status != PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.