summaryrefslogtreecommitdiffstats
path: root/examples/nanohttp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nanohttp')
-rw-r--r--examples/nanohttp/Makefile.in2
-rw-r--r--examples/nanohttp/http_client.c5
-rw-r--r--examples/nanohttp/http_server.c7
-rwxr-xr-xexamples/nanohttp/mime_client.c6
4 files changed, 11 insertions, 9 deletions
diff --git a/examples/nanohttp/Makefile.in b/examples/nanohttp/Makefile.in
index f918782..9f2aabe 100644
--- a/examples/nanohttp/Makefile.in
+++ b/examples/nanohttp/Makefile.in
@@ -200,7 +200,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
LDADD = ../../nanohttp/libnanohttp.la
INCLUDES = -I${top_srcdir}
diff --git a/examples/nanohttp/http_client.c b/examples/nanohttp/http_client.c
index 1b9c912..adcd199 100644
--- a/examples/nanohttp/http_client.c
+++ b/examples/nanohttp/http_client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: http_client.c,v 1.9 2006/12/10 19:21:06 m0gg Exp $
+* $Id: http_client.c,v 1.10 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A http client/server library in C (example)
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
+#include <nanohttp/nanohttp-logging.h>
#include <nanohttp/nanohttp-client.h>
#define MAX_BUFFER_SIZE 1024
@@ -105,7 +106,7 @@ int main(int argc, char **argv)
}
/* Set log level to see more information written by the library */
- hlog_set_level(HLOG_INFO);
+ nanohttp_log_set_loglevel(NANOHTTP_LOG_INFO);
/* Initialize httpc module */
if (httpc_init(argc, argv))
diff --git a/examples/nanohttp/http_server.c b/examples/nanohttp/http_server.c
index eb98d33..5daad9a 100644
--- a/examples/nanohttp/http_server.c
+++ b/examples/nanohttp/http_server.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: http_server.c,v 1.14 2007/01/05 09:02:50 m0gg Exp $
+* $Id: http_server.c,v 1.15 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A http client/server library in C (example)
* Copyright (C) 2003 Ferhat Ayaz
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
+#include <nanohttp/nanohttp-logging.h>
#include <nanohttp/nanohttp-server.h>
static int
@@ -142,12 +143,12 @@ int
main(int argc, char **argv)
{
herror_t status;
- hlog_set_level(HLOG_INFO);
+
+ nanohttp_log_set_loglevel(NANOHTTP_LOG_INFO);
if (httpd_init(argc, argv))
{
fprintf(stderr, "Cannot init httpd\n");
- httpd_destroy();
exit(1);
}
diff --git a/examples/nanohttp/mime_client.c b/examples/nanohttp/mime_client.c
index e4d50ba..ffa8de7 100755
--- a/examples/nanohttp/mime_client.c
+++ b/examples/nanohttp/mime_client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: mime_client.c,v 1.1 2007/01/03 21:31:44 m0gg Exp $
+* $Id: mime_client.c,v 1.2 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A http client/server library in C (example)
* Copyright (C) 2003 Ferhat Ayaz
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
}
/* Set log level to see more information written by the library */
- // log_set_level(HLOG_VERBOSE);
+ // log_set_level(NANOHTTP_LOG_VERBOSE);
/* Initialize httpc module */
if ((status = httpc_init(argc, argv)) != H_OK)
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
*/
if ((status = httpc_mime_begin(conn, argv[1], argv[3], "", argv[4])) != H_OK)
{
- log_error2("Can not start MIME: %s\n", herror_message(status));
+ fprintf(stderr, "Can not start MIME: %s\n", herror_message(status));
herror_release(status);
exit(1);
}