Ignore:
Timestamp:
Jun 11, 2007 4:51:18 PM (17 years ago)
Author:
bennylp
Message:

Ticket #330: Changed DNS SRV resolver to use the new DNS A response parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r1317 r1357  
    743743    } 
    744744 
    745     pj_memcpy(&pjsua_var.stun_srv, &rec->entry[0].addr,  
    746               rec->entry[0].addr_len); 
     745    pj_assert(rec->count != 0 && rec->entry[0].server.addr_count != 0); 
     746    pj_sockaddr_in_init(&pjsua_var.stun_srv.ipv4, NULL, 
     747                        rec->entry[0].port); 
     748    pjsua_var.stun_srv.ipv4.sin_addr.s_addr =  
     749        rec->entry[0].server.addr[0].s_addr; 
    747750 
    748751    PJ_LOG(3,(THIS_FILE, "_stun._udp.%.*s resolved, found %d entry(s):", 
     
    755758                  " %d: prio=%d, weight=%d  %s:%d",  
    756759                  i, rec->entry[i].priority, rec->entry[i].weight, 
    757                   pj_inet_ntoa(rec->entry[i].addr.ipv4.sin_addr), 
    758                   (int)pj_ntohs(rec->entry[i].addr.ipv4.sin_port))); 
     760                  pj_inet_ntoa(rec->entry[i].server.addr[0]), 
     761                  (int)rec->entry[i].port)); 
    759762    } 
    760763 
     
    794797                pj_dns_srv_resolve(&pjsua_var.ua_cfg.stun_domain, &res_type, 
    795798                                   3478, pjsua_var.pool, pjsua_var.resolver, 
    796                                    0, NULL, &stun_dns_srv_resolver_cb); 
     799                                   0, NULL, &stun_dns_srv_resolver_cb, NULL); 
    797800            if (status != PJ_SUCCESS) { 
    798801                pjsua_perror(THIS_FILE, "Error starting DNS SRV resolution",  
Note: See TracChangeset for help on using the changeset viewer.