axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r369009 - /webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
Date Sat, 14 Jan 2006 11:42:42 GMT
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", 



Mime
View raw message