summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-02-17 17:51:51 +0100
committerGravatar Martin Szulecki2013-02-17 17:51:51 +0100
commit7af899f21bad93c7aac0957388d2712d6c2cee84 (patch)
treeef3d0df2b8716b91668d305012bdbdfe383b475f
parent42f5b53169ae89a226054280ebd581ccc8ab766a (diff)
downloadcsoap-7af899f21bad93c7aac0957388d2712d6c2cee84.tar.gz
csoap-7af899f21bad93c7aac0957388d2712d6c2cee84.tar.bz2
Fix compiler warning about usage of exit() in mime_client example
-rwxr-xr-xexamples/nanohttp/mime_client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/nanohttp/mime_client.c b/examples/nanohttp/mime_client.c
index ffa8de7..b6fe8b0 100755
--- a/examples/nanohttp/mime_client.c
+++ b/examples/nanohttp/mime_client.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
if (argc < 5)
{
fprintf(stderr, "usage %s <url> <file> <id> <content-type>\n", argv[0]);
- exit(1);
+ return -1;
}
/* Set log level to see more information written by the library */
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
{
fprintf(stderr, "Cannot init httpc (%s)\n", herror_message(status));
herror_release(status);
- return 1;
+ return -1;
}
/* Create the client connection object */
@@ -144,13 +144,13 @@ int main(int argc, char **argv)
{
fprintf(stderr, "Can not start MIME: %s\n", herror_message(status));
herror_release(status);
- exit(1);
+ return -1;
}
if (!send_file(conn, argv[2], argv[3], argv[4]))
{
fprintf(stderr, "send_file failed\n");
- exit(1);
+ return -1;
}
while (1)
@@ -166,14 +166,14 @@ int main(int argc, char **argv)
gets(content_type);
if (!send_file(conn, file, id, content_type))
- exit(1);
+ return -1;
}
if ((status = httpc_mime_end(conn, &res)) != H_OK)
{
fprintf(stderr, "httpc_mime_end failed (%s)\n", herror_message(status));
herror_release(status);
- exit(1);
+ return -1;
}
/* Show response */