From 6b4964727bffb379aca9601e1cf69051ccbf600c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 30 Mar 2012 07:10:13 +0000 Subject: Re #1474: Merged all changes from 1.12 - HEAD (from the 1.x branch) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3999 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib-util/src/pjlib-util/stun_simple_client.c | 15 +++++++++++++-- pjlib-util/src/pjlib-util/xml.c | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'pjlib-util') diff --git a/pjlib-util/src/pjlib-util/stun_simple_client.c b/pjlib-util/src/pjlib-util/stun_simple_client.c index e4f0b0fe..dc13fe1a 100644 --- a/pjlib-util/src/pjlib-util/stun_simple_client.c +++ b/pjlib-util/src/pjlib-util/stun_simple_client.c @@ -44,7 +44,7 @@ PJ_DEF(pj_status_t) pjstun_get_mapped_addr( pj_pool_factory *pf, { unsigned srv_cnt; pj_sockaddr_in srv_addr[2]; - int i, send_cnt = 0; + int i, send_cnt = 0, nfds; pj_pool_t *pool; struct query_rec { struct { @@ -113,6 +113,17 @@ PJ_DEF(pj_status_t) pjstun_get_mapped_addr( pj_pool_factory *pf, TRACE_((THIS_FILE, " Done initialization.")); +#if defined(PJ_SELECT_NEEDS_NFDS) && PJ_SELECT_NEEDS_NFDS!=0 + nfds = -1; + for (i=0; i nfds) { + nfds = sock[i]; + } + } +#else + nfds = PJ_IOQUEUE_MAX_HANDLES-1; +#endif + /* Main retransmission loop. */ for (send_cnt=0; send_cnt\t", &node->name); + pj_scan_get_until_chr( scanner, " />\t\r\n", &node->name); /* Get attributes. */ while (*scanner->curptr != '>' && *scanner->curptr != '/') { pj_xml_attr *attr = alloc_attr(pool); - pj_scan_get_until_chr( scanner, "=> \t", &attr->name); + pj_scan_get_until_chr( scanner, "=> \t\r\n", &attr->name); if (*scanner->curptr == '=') { pj_scan_get_char( scanner ); pj_scan_get_quotes(scanner, "\"'", "\"'", 2, &attr->value); -- cgit v1.2.3