summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-08-01 23:35:05 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2010-08-01 23:35:05 (GMT)
commit2509163e47302bef6afe494b11720d510760a0ed (patch)
treeae5f33c13425db13ff81893712aa674b30a88785
parentb6df327d8e5eee5f3dd3aae63bbc4edc6c886141 (diff)
downloadconnman-2509163e47302bef6afe494b11720d510760a0ed.zip
connman-2509163e47302bef6afe494b11720d510760a0ed.tar.gz
connman-2509163e47302bef6afe494b11720d510760a0ed.tar.bz2
Report error if lookup fails
-rw-r--r--tools/resolv-test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/resolv-test.c b/tools/resolv-test.c
index 30a6554..05c3a56 100644
--- a/tools/resolv-test.c
+++ b/tools/resolv-test.c
@@ -144,7 +144,11 @@ int main(int argc, char *argv[])
timer = g_timer_new();
- g_resolv_lookup_hostname(resolv, argv[1], resolv_result, NULL);
+ if (g_resolv_lookup_hostname(resolv, argv[1],
+ resolv_result, NULL) == 0) {
+ printf("failed to start lookup\n");
+ return 1;
+ }
memset(&sa, 0, sizeof(sa));
sa.sa_handler = sig_term;