projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
792c02f
)
dnsproxy: Check the result of socket creation when resolving
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 19 Nov 2012 08:21:00 +0000
(10:21 +0200)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 19 Nov 2012 12:53:28 +0000
(14:53 +0200)
If the socket creation failed, continue with the next server.
src/dnsproxy.c
patch
|
blob
|
history
diff --git
a/src/dnsproxy.c
b/src/dnsproxy.c
index
01bcc51
..
7de4e38
100644
(file)
--- a/
src/dnsproxy.c
+++ b/
src/dnsproxy.c
@@
-2229,8
+2229,12
@@
static gboolean resolv(struct request_data *req,
if (data->enabled == FALSE)
continue;
- if (data->channel == NULL && data->protocol == IPPROTO_UDP)
- server_create_socket(data);
+ if (data->channel == NULL && data->protocol == IPPROTO_UDP) {
+ if (server_create_socket(data) < 0) {
+ DBG("socket creation failed while resolving");
+ continue;
+ }
+ }
if (ns_resolv(data, req, request, name) > 0)
return TRUE;