You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/01/14 12:42:42 UTC
svn commit: r369009 -
/webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
Author: samisa
Date: Sat Jan 14 03:42:36 2006
New Revision: 369009
URL: http://svn.apache.org/viewcvs?rev=369009&view=rev
Log:
Added more easy to use command line options
Modified:
webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c?rev=369009&r1=369008&r2=369009&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c Sat Jan 14 03:42:36 2006
@@ -51,14 +51,17 @@
axis2_env_t *env = NULL;
axis2_http_server_t *server = NULL;
char tmp_str[512];
- int port = -1;
+ int port = 9090;
+ axis2_char_t *repo = "../../../../../../";
- if(argc != 3)
+ if(argc > 1)
{
- printf("%s <port> <repo location>\n", argv[0]);
- exit(0);
+ port = atoi(argv[1]);
+ }
+ if(argc > 2)
+ {
+ repo = argv[2];
}
- port = atoi(argv[1]);
allocator = axis2_allocator_init(NULL);
if(NULL == allocator)
{
@@ -73,11 +76,11 @@
sprintf(tmp_str, "[Axis2]Server port : %d\n", port);
printf(tmp_str);
AXIS2_LOG_WRITE(env->log, tmp_str, AXIS2_LOG_INFO);
- sprintf(tmp_str, "[Axis2]Repo location : %s\n", argv[2]);
+ sprintf(tmp_str, "[Axis2]Repo location : %s\n", repo);
printf(tmp_str);
AXIS2_LOG_WRITE(env->log, tmp_str, AXIS2_LOG_INFO);
- server = axis2_http_server_create(&env, argv[2], port);
+ server = axis2_http_server_create(&env, repo, port);
if(NULL == server)
{
sprintf(tmp_str, "[Axis2]Server creation failed: Error code: %d\n",