summaryrefslogtreecommitdiff
path: root/tools/web-test.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-30 16:57:57 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-30 16:57:57 +0200
commit2c9d84797247bcbe034b185153159e8caf312695 (patch)
tree6b049c00dd5653af4ac47e728eeedcd8ea2687d9 /tools/web-test.c
parent1f29bdb3f8f8881f179427477027140efe4821a1 (diff)
downloadconnman-2c9d84797247bcbe034b185153159e8caf312695.tar.gz
connman-2c9d84797247bcbe034b185153159e8caf312695.tar.bz2
connman-2c9d84797247bcbe034b185153159e8caf312695.zip
Update error messages of GWeb test application
Diffstat (limited to 'tools/web-test.c')
-rw-r--r--tools/web-test.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/web-test.c b/tools/web-test.c
index f48853e7..823e1589 100644
--- a/tools/web-test.c
+++ b/tools/web-test.c
@@ -24,7 +24,6 @@
#endif
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <signal.h>
@@ -85,19 +84,19 @@ int main(int argc, char *argv[])
g_error_free(error);
} else
g_printerr("An unknown error occurred\n");
- exit(1);
+ return 1;
}
g_option_context_free(context);
if (argc < 2) {
- printf("missing argument\n");
+ fprintf(stderr, "Missing argument\n");
return 1;
}
web = g_web_new(index);
if (web == NULL) {
- printf("failed to web service\n");
+ fprintf(stderr, "Failed to create web service\n");
return 1;
}
@@ -117,7 +116,7 @@ int main(int argc, char *argv[])
if (g_web_request(web, G_WEB_METHOD_GET, argv[1],
web_result, NULL) == 0) {
- printf("failed to start request\n");
+ fprintf(stderr, "Failed to start request\n");
return 1;
}