summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorGravatar snowdrop2006-07-09 16:24:18 +0000
committerGravatar snowdrop2006-07-09 16:24:18 +0000
commit8e94d40e90b5ed006090af64ff7017a2d4f1a802 (patch)
treed75f7d201eb5cf7236f2d0dc1ca18a44910eda49 /examples
parent1b6cc73eff4ecc9ec0b2be81841d495a3cb53fc9 (diff)
downloadcsoap-8e94d40e90b5ed006090af64ff7017a2d4f1a802.tar.gz
csoap-8e94d40e90b5ed006090af64ff7017a2d4f1a802.tar.bz2
ported logging function to a seperate file (nanohttp-logging.*)r1_1_0
and renamed all logging functions.
Diffstat (limited to 'examples')
-rw-r--r--examples/csoap/Makefile.am2
-rwxr-xr-xexamples/csoap/echoattachments-client.c6
-rwxr-xr-xexamples/csoap/echoattachments-server.c6
-rw-r--r--examples/csoap/simpleclient.c4
-rw-r--r--examples/csoap/simpleserver.c5
-rw-r--r--examples/csoap/soapclient.c2
-rw-r--r--examples/nanohttp/Makefile.am2
-rw-r--r--examples/nanohttp/http_client.c5
-rw-r--r--examples/nanohttp/http_server.c5
9 files changed, 23 insertions, 14 deletions
diff --git a/examples/csoap/Makefile.am b/examples/csoap/Makefile.am
index f44f62c..556dd95 100644
--- a/examples/csoap/Makefile.am
+++ b/examples/csoap/Makefile.am
@@ -1,4 +1,4 @@
-LDADD=../../nanohttp/libnanohttp.la ../../libcsoap/libcsoap.la -lpthread
+LDADD=../../nanohttp/libnanohttp.la ../../libcsoap/libcsoap.la
INCLUDES=-I${top_srcdir}
noinst_PROGRAMS=simpleclient simpleserver echoattachments-client echoattachments-server
diff --git a/examples/csoap/echoattachments-client.c b/examples/csoap/echoattachments-client.c
index b3dd3f8..6f07253 100755
--- a/examples/csoap/echoattachments-client.c
+++ b/examples/csoap/echoattachments-client.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: echoattachments-client.c,v 1.10 2006/01/10 11:29:04 snowdrop Exp $
+ * $Id: echoattachments-client.c,v 1.11 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -21,9 +21,9 @@
* Email: ferhatayaz@yahoo.com
******************************************************************/
-#include <libcsoap/soap-client.h>
-
+#include <nanohttp/nanohttp-logging.h>
+#include <libcsoap/soap-client.h>
static const char *urn = "urn:examples";
diff --git a/examples/csoap/echoattachments-server.c b/examples/csoap/echoattachments-server.c
index 4b37aa8..0beb56f 100755
--- a/examples/csoap/echoattachments-server.c
+++ b/examples/csoap/echoattachments-server.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: echoattachments-server.c,v 1.7 2006/01/10 11:29:04 snowdrop Exp $
+ * $Id: echoattachments-server.c,v 1.8 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -21,6 +21,8 @@
* Email: ferhatayaz@yahoo.com
******************************************************************/
+#include <nanohttp/nanohttp-logging.h>
+
#include <libcsoap/soap-server.h>
@@ -64,7 +66,7 @@ main(int argc, char *argv[])
herror_t err;
SoapRouter *router;
- log_set_level(HLOG_VERBOSE);
+ hlog_set_level(HLOG_VERBOSE);
err = soap_server_init_args(argc, argv);
if (err != H_OK)
diff --git a/examples/csoap/simpleclient.c b/examples/csoap/simpleclient.c
index 6ae206b..6468113 100644
--- a/examples/csoap/simpleclient.c
+++ b/examples/csoap/simpleclient.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: simpleclient.c,v 1.11 2006/01/10 11:29:04 snowdrop Exp $
+ * $Id: simpleclient.c,v 1.12 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -21,6 +21,8 @@
* Email: ferhatayaz@yahoo.com
******************************************************************/
+#include <nanohttp/nanohttp-logging.h>
+
#include <libcsoap/soap-client.h>
diff --git a/examples/csoap/simpleserver.c b/examples/csoap/simpleserver.c
index cde4e79..6b076f6 100644
--- a/examples/csoap/simpleserver.c
+++ b/examples/csoap/simpleserver.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: simpleserver.c,v 1.18 2006/02/27 22:26:01 snowdrop Exp $
+ * $Id: simpleserver.c,v 1.19 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: CSOAP examples project
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -21,6 +21,7 @@
* Email: ferhatayaz@yahoo.com
******************************************************************/
+#include <nanohttp/nanohttp-logging.h>
#include <libcsoap/soap-server.h>
@@ -66,7 +67,7 @@ main(int argc, char *argv[])
herror_t err;
SoapRouter *router;
- log_set_level(HLOG_INFO);
+ hlog_set_level(HLOG_INFO);
err = soap_server_init_args(argc, argv);
if (err != H_OK)
diff --git a/examples/csoap/soapclient.c b/examples/csoap/soapclient.c
index f1b054d..c7ece72 100644
--- a/examples/csoap/soapclient.c
+++ b/examples/csoap/soapclient.c
@@ -7,6 +7,8 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+
+#include <nanohttp/nanohttp-logging.h>
#include <libcsoap/soap-client.h>
#define MAX_LINE_LENGTH 65535
diff --git a/examples/nanohttp/Makefile.am b/examples/nanohttp/Makefile.am
index ae5e6a7..d0a6be7 100644
--- a/examples/nanohttp/Makefile.am
+++ b/examples/nanohttp/Makefile.am
@@ -1,4 +1,4 @@
-LDADD=../../nanohttp/libnanohttp.la -lpthread
+LDADD=../../nanohttp/libnanohttp.la
INCLUDES=-I${top_srcdir}
noinst_PROGRAMS=http_server http_client
diff --git a/examples/nanohttp/http_client.c b/examples/nanohttp/http_client.c
index 8d827ba..c454fd7 100644
--- a/examples/nanohttp/http_client.c
+++ b/examples/nanohttp/http_client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: http_client.c,v 1.1 2006/03/06 13:30:30 m0gg Exp $
+* $Id: http_client.c,v 1.2 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C (example)
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <string.h>
+#include <nanohttp/nanohttp-logging.h>
#include <nanohttp/nanohttp-client.h>
#define MAX_BUFFER_SIZE 1024
@@ -103,7 +104,7 @@ int main(int argc, char **argv) {
}
/* Set log level to see more information written by the library */
- log_set_level(HLOG_INFO);
+ hlog_set_level(HLOG_INFO);
/* Initialize httpc module */
if (httpc_init(argc, argv)) {
diff --git a/examples/nanohttp/http_server.c b/examples/nanohttp/http_server.c
index 33e60ce..348a1d7 100644
--- a/examples/nanohttp/http_server.c
+++ b/examples/nanohttp/http_server.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: http_server.c,v 1.3 2006/04/21 08:40:37 m0gg Exp $
+* $Id: http_server.c,v 1.4 2006/07/09 16:24:19 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C (example)
* Copyright (C) 2003 Ferhat Ayaz
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <string.h>
+#include <nanohttp/nanohttp-logging.h>
#include <nanohttp/nanohttp-server.h>
static int simple_authenticator(hrequest_t *req, const char *user, const char *password)
@@ -141,7 +142,7 @@ static void root_service(httpd_conn_t *conn, hrequest_t *req)
int main(int argc, char *argv[])
{
- log_set_level(HLOG_INFO);
+ hlog_set_level(HLOG_INFO);
if (httpd_init(argc, argv)) {