Changeset 1091 for pjproject/trunk/pjnath/src/pjstun-client/client_main.c
- Timestamp:
- Mar 21, 2007 9:31:01 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjstun-client/client_main.c
r1080 r1091 33 33 static struct global 34 34 { 35 pj_stun_ endpoint *endpt;35 pj_stun_config stun_config; 36 36 pj_pool_t *pool; 37 37 pj_caching_pool cp; … … 105 105 PJ_STUN_ATTR_RELAY_ADDR, 0); 106 106 if (ar) { 107 pj_memcpy(&g.relay_addr, &ar-> addr.ipv4,107 pj_memcpy(&g.relay_addr, &ar->sockaddr.ipv4, 108 108 sizeof(pj_sockaddr_in)); 109 109 PJ_LOG(3,(THIS_FILE, "Relay address is %s:%d", … … 209 209 pj_assert(status == PJ_SUCCESS); 210 210 211 status = pj_stun_endpoint_create(&g.cp.factory, 0, NULL, g.th, &g.endpt);211 pj_stun_config_init(&g.stun_config, &g.cp.factory, 0, NULL, g.th); 212 212 pj_assert(status == PJ_SUCCESS); 213 213 … … 236 236 stun_cb.on_request_complete = &on_request_complete; 237 237 238 status = pj_stun_session_create( g.endpt, NULL, &stun_cb,238 status = pj_stun_session_create(&g.stun_config, NULL, &stun_cb, 239 239 o.use_fingerprint!=0, &g.sess); 240 240 pj_assert(status == PJ_SUCCESS); … … 282 282 if (g.sess) 283 283 pj_stun_session_destroy(g.sess); 284 if (g.endpt)285 pj_stun_endpoint_destroy(g.endpt);286 284 if (g.sock != PJ_INVALID_SOCKET) 287 285 pj_sock_close(g.sock);
Note: See TracChangeset
for help on using the changeset viewer.