Changeset 2125 for pjproject


Ignore:
Timestamp:
Jul 12, 2008 10:08:37 AM (16 years ago)
Author:
bennylp
Message:

Ticket #562: In TURN client sample application, when STUN server is specified, contact the STUN server on default STUN port rather than the TURN port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjturn-client/client_main.c

    r2040 r2125  
    134134        pj_stun_sock_cb stun_sock_cb; 
    135135        char name[] = "peer0"; 
     136        pj_uint16_t port; 
    136137        pj_str_t server; 
    137138 
     
    151152        } 
    152153 
    153         if (o.stun_server) 
     154        if (o.stun_server) { 
    154155            server = pj_str(o.stun_server); 
    155         else 
     156            port = PJ_STUN_PORT; 
     157        } else { 
    156158            server = pj_str(o.srv_addr); 
     159            port = (pj_uint16_t)(o.srv_port?atoi(o.srv_port):PJ_STUN_PORT); 
     160        } 
    157161        status = pj_stun_sock_start(g.peer[i].stun_sock, &server,  
    158                                     (pj_uint16_t)(o.srv_port?atoi(o.srv_port):PJ_STUN_PORT),  
    159                                     NULL); 
     162                                    port,  NULL); 
    160163        if (status != PJ_SUCCESS) { 
    161164            my_perror("pj_stun_sock_start()", status); 
Note: See TracChangeset for help on using the changeset viewer.