summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-06-28 00:39:58 +0000
committerBenny Prijono <bennylp@teluu.com>2008-06-28 00:39:58 +0000
commit532a86c054092a117a9649001ef9ef1fda13e419 (patch)
treeca7727f3e26df62c20eb2bbe7c65f318881e01e4 /pjsip
parentb3da86fc77ae67cc955aedb7c43045cf2327d10d (diff)
Fixed crash when handling incoming MESSAGE request without message body but with Content/Type set (thanks Anshuman S. Rawat)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2086 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_im.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_im.c b/pjsip/src/pjsua-lib/pjsua_im.c
index 509f15fd..f993ff90 100644
--- a/pjsip/src/pjsua-lib/pjsua_im.c
+++ b/pjsip/src/pjsua-lib/pjsua_im.c
@@ -127,8 +127,16 @@ pj_bool_t pjsua_im_accept_pager(pjsip_rx_data *rdata,
return PJ_FALSE;
}
#else
- PJ_UNUSED_ARG(rdata);
- PJ_UNUSED_ARG(p_accept_hdr);
+ pjsip_msg *msg;
+
+ msg = rdata->msg_info.msg;
+ if (msg->body == NULL) {
+ /* Create Accept header. */
+ if (p_accept_hdr)
+ *p_accept_hdr = pjsua_im_create_accept(rdata->tp_info.pool);
+
+ return PJ_FALSE;
+ }
#endif
return PJ_TRUE;