Changeset 1756 for pjproject/trunk


Ignore:
Timestamp:
Jan 26, 2008 10:45:02 AM (17 years ago)
Author:
bennylp
Message:

Bug: source address not initialized in loop transport causing pjsip-test to fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c

    r1405 r1756  
    9090    pkt->rdata.pkt_info.len = tdata->buf.cur - tdata->buf.start; 
    9191 
     92    /* the source address */ 
     93    pkt->rdata.pkt_info.src_addr.addr.sa_family = pj_AF_INET(); 
     94 
    9295    /* "Source address" info. */ 
    9396    pkt->rdata.pkt_info.src_addr_len = sizeof(pj_sockaddr_in); 
    94     if (loop->base.key.type == PJSIP_TRANSPORT_LOOP) 
     97    if (loop->base.key.type == PJSIP_TRANSPORT_LOOP) { 
    9598        pj_ansi_strcpy(pkt->rdata.pkt_info.src_name, ADDR_LOOP); 
    96     else 
     99    } else { 
    97100        pj_ansi_strcpy(pkt->rdata.pkt_info.src_name, ADDR_LOOP_DGRAM); 
     101    } 
    98102    pkt->rdata.pkt_info.src_port = loop->base.local_name.port; 
    99103 
Note: See TracChangeset for help on using the changeset viewer.