summaryrefslogtreecommitdiff
path: root/pjsip/src
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/src')
-rw-r--r--pjsip/src/pjsip/sip_transport_loop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pjsip/src/pjsip/sip_transport_loop.c b/pjsip/src/pjsip/sip_transport_loop.c
index 6e0e3c68..e156dcbe 100644
--- a/pjsip/src/pjsip/sip_transport_loop.c
+++ b/pjsip/src/pjsip/sip_transport_loop.c
@@ -89,12 +89,16 @@ struct recv_list *create_incoming_packet( struct loop_transport *loop,
tdata->buf.cur - tdata->buf.start);
pkt->rdata.pkt_info.len = tdata->buf.cur - tdata->buf.start;
+ /* the source address */
+ pkt->rdata.pkt_info.src_addr.addr.sa_family = pj_AF_INET();
+
/* "Source address" info. */
pkt->rdata.pkt_info.src_addr_len = sizeof(pj_sockaddr_in);
- if (loop->base.key.type == PJSIP_TRANSPORT_LOOP)
+ if (loop->base.key.type == PJSIP_TRANSPORT_LOOP) {
pj_ansi_strcpy(pkt->rdata.pkt_info.src_name, ADDR_LOOP);
- else
+ } else {
pj_ansi_strcpy(pkt->rdata.pkt_info.src_name, ADDR_LOOP_DGRAM);
+ }
pkt->rdata.pkt_info.src_port = loop->base.local_name.port;
/* When do we need to "deliver" this packet. */