diff options
-rw-r--r-- | pjsip/src/pjsip-simple/publishc.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/pjsip/src/pjsip-simple/publishc.c b/pjsip/src/pjsip-simple/publishc.c index 3f11ad13..042a16a0 100644 --- a/pjsip/src/pjsip-simple/publishc.c +++ b/pjsip/src/pjsip-simple/publishc.c @@ -439,11 +439,15 @@ static void pubc_refresh_timer_cb( pj_timer_heap_t *timer_heap, status = pjsip_publishc_send(pubc, tdata); } - if (status != PJ_SUCCESS) { - char errmsg[PJ_ERR_MSG_SIZE]; - pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg)); - call_callback(pubc, status, 400, &reason, NULL, -1); - } + // Callback should have been called. + // Calling it here will crash the system since pubc might have been + // destroyed + // + //if (status != PJ_SUCCESS) { + // char errmsg[PJ_ERR_MSG_SIZE]; + // pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg)); + // call_callback(pubc, status, 400, &reason, NULL, -1); + //} } static void tsx_callback(void *token, pjsip_event *event) @@ -479,11 +483,15 @@ static void tsx_callback(void *token, pjsip_event *event) status = pjsip_publishc_send(pubc, tdata); } - if (status != PJ_SUCCESS) { - call_callback(pubc, status, tsx->status_code, - &rdata->msg_info.msg->line.status.reason, - rdata, -1); - } + // Callback should have been called. + // Calling it here will crash the system since pubc might have been + // destroyed + // + //if (status != PJ_SUCCESS) { + // call_callback(pubc, status, tsx->status_code, + // &rdata->msg_info.msg->line.status.reason, + // rdata, -1); + //} return; |