diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-09-12 17:25:15 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-09-12 17:25:15 +0000 |
commit | b406b0f53717127c81e7d4110ea50a0a2e25bbab (patch) | |
tree | 3f470d952e16d23c9278285a4159625b9c8de0bb /pjsip | |
parent | 9627317aba6457c0ba9fe489af8f70eb0eee6abb (diff) |
Ticket #349 revisited: Crash when sending PUBLISH when network is unreachable
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1432 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-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; |