diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-05-15 20:27:08 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-05-15 20:27:08 +0000 |
commit | 886d1f799cb8b07df1b0d14ef67614571966f58d (patch) | |
tree | 4c81557f84377ae8eb5b364a5d00ac315827a111 /pjlib-util/src | |
parent | ec97a60507ab3d813c33479aaff19cea426f6c27 (diff) |
Fixed ticket #276: Error creating resolver on Win32 release mode (thanks Frank Wiersma)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1278 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib-util/src')
-rw-r--r-- | pjlib-util/src/pjlib-util/resolver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pjlib-util/src/pjlib-util/resolver.c b/pjlib-util/src/pjlib-util/resolver.c index f2578e48..a2a12fec 100644 --- a/pjlib-util/src/pjlib-util/resolver.c +++ b/pjlib-util/src/pjlib-util/resolver.c @@ -290,6 +290,11 @@ PJ_DEF(pj_status_t) pj_dns_resolver_create( pj_pool_factory *pf, if (status != PJ_SUCCESS) goto on_error; + /* Bind to any address/port */ + status = pj_sock_bind_in(resv->udp_sock, 0, 0); + if (status != PJ_SUCCESS) + goto on_error; + /* Register to ioqueue */ pj_bzero(&socket_cb, sizeof(socket_cb)); socket_cb.on_read_complete = &on_read_complete; |