diff options
author | m0gg | 2006-05-15 06:45:07 +0000 |
---|---|---|
committer | m0gg | 2006-05-15 06:45:07 +0000 |
commit | 68e70db8b8e22afb6cd5be057dedb75a891cad98 (patch) | |
tree | f76e35dc626837ae98163df9b7d382521a4e57df | |
parent | 015fb3328b8d5c3c76d2e16f7b46d9598722f268 (diff) | |
download | csoap-68e70db8b8e22afb6cd5be057dedb75a891cad98.tar.gz csoap-68e70db8b8e22afb6cd5be057dedb75a891cad98.tar.bz2 |
csoap admin commandline switch
-rw-r--r-- | libcsoap/soap-admin.c | 16 | ||||
-rw-r--r-- | libcsoap/soap-admin.h | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/libcsoap/soap-admin.c b/libcsoap/soap-admin.c index 00f222a..65e07c9 100644 --- a/libcsoap/soap-admin.c +++ b/libcsoap/soap-admin.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: soap-admin.c,v 1.3 2006/03/29 08:49:59 m0gg Exp $ +* $Id: soap-admin.c,v 1.4 2006/05/15 06:45:07 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -162,10 +162,20 @@ _soap_admin_entry(httpd_conn_t * conn, hrequest_t * req) } -herror_t soap_admin_init_args(int argc, char **argv) +herror_t +soap_admin_init_args(int argc, char **argv) { - httpd_register("/csoap", _soap_admin_entry); + int i; + + for (i=0; i<argc; i++) { + + if (!strcmp(argv[i], CSOAP_ENABLE_ADMIN)) { + + httpd_register("/csoap", _soap_admin_entry); + break; + } + } return H_OK; } diff --git a/libcsoap/soap-admin.h b/libcsoap/soap-admin.h index b652f01..654f149 100644 --- a/libcsoap/soap-admin.h +++ b/libcsoap/soap-admin.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-admin.h,v 1.1 2006/03/29 08:35:55 m0gg Exp $ + * $Id: soap-admin.h,v 1.2 2006/05/15 06:45:07 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -24,6 +24,8 @@ #ifndef cSOAP_ADMIN_H #define cSOAP_ADMIN_H +#define CSOAP_ENABLE_ADMIN "-CSOAPadmin" + #ifdef __cplusplus extern "C" { #endif |