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:
9209502
)
timeserver: Check for resolv before accessing it
author
Alok Barsode
<alok.barsode@linux.intel.com>
Thu, 5 Apr 2012 10:20:25 +0000
(13:20 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Thu, 5 Apr 2012 15:57:33 +0000
(18:57 +0300)
In order to cancel any ongoing resolution, check
if both resolv and resolv_id are valid.
src/timeserver.c
patch
|
blob
|
history
diff --git
a/src/timeserver.c
b/src/timeserver.c
index 65b7ad035cdb34e1733580c8fb33d46e886b9baa..e8a9d159402df00274619d2ab8d2dddc2aaf3e85 100644
(file)
--- a/
src/timeserver.c
+++ b/
src/timeserver.c
@@
-262,7
+262,7
@@
static int timeserver_start(struct connman_service *service)
return -EINVAL;
/* Stop an already ongoing resolution, if there is one */
- if (resolv_id > 0)
+ if (resolv
!= NULL && resolv
_id > 0)
g_resolv_cancel_lookup(resolv, resolv_id);
/* get rid of the old resolver */