summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsip/sip_transport.c
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-11-06 05:22:11 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-11-06 05:22:11 +0000
commitb0d6da05e35bc899706df0cbb790ef9fb70b42ec (patch)
tree7524b11d709a9bfdb595a492bd018ec0749f4512 /pjsip/src/pjsip/sip_transport.c
parent8351c0cee88cc4347f998ed56d3cd82a82dcdd16 (diff)
Re #1590: Fixed pjsip_rx_data_clone() when there are multiple instances of a single header type (thanks Mike Evans for the report and the fix).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4295 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip/sip_transport.c')
-rw-r--r--pjsip/src/pjsip/sip_transport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c
index 81587b03..19c63667 100644
--- a/pjsip/src/pjsip/sip_transport.c
+++ b/pjsip/src/pjsip/sip_transport.c
@@ -638,7 +638,9 @@ PJ_DEF(pj_status_t) pjsip_rx_data_clone( const pjsip_rx_data *src,
#define GET_MSG_HDR2(TYPE, type, var) \
case PJSIP_H_##TYPE: \
- dst->msg_info.var = (pjsip_##type##_hdr*)hdr; \
+ if (!dst->msg_info.var) { \
+ dst->msg_info.var = (pjsip_##type##_hdr*)hdr; \
+ } \
break
#define GET_MSG_HDR(TYPE, var_type) GET_MSG_HDR2(TYPE, var_type, var_type)