[Freeswitch-svn] [commit] r5016 - in freeswitch/trunk: libs/xmlrpc-c libs/xmlrpc-c/include/xmlrpc-c libs/xmlrpc-c/lib/abyss/src src/mod/xml_int/mod_xml_rpc
Freeswitch SVN
mikej at freeswitch.org
Wed Apr 25 15:57:15 EDT 2007
Author: mikej
Date: Wed Apr 25 15:57:14 2007
New Revision: 5016
Modified:
freeswitch/trunk/libs/xmlrpc-c/.update
freeswitch/trunk/libs/xmlrpc-c/include/xmlrpc-c/abyss.h
freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/server.c
freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/trace.c
freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
Log:
resolve http://jira.freeswitch.org/browse/MDXMLINT-6
Modified: freeswitch/trunk/libs/xmlrpc-c/.update
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/.update (original)
+++ freeswitch/trunk/libs/xmlrpc-c/.update Wed Apr 25 15:57:14 2007
@@ -1 +1 @@
-Fri Mar 16 17:21:00 EDT 2007
+Wed Apr 25 16:05:00 EDT 2007
Modified: freeswitch/trunk/libs/xmlrpc-c/include/xmlrpc-c/abyss.h
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/include/xmlrpc-c/abyss.h (original)
+++ freeswitch/trunk/libs/xmlrpc-c/include/xmlrpc-c/abyss.h Wed Apr 25 15:57:14 2007
@@ -634,7 +634,7 @@
void ServerFree(TServer *srv);
-void ServerInit(TServer *srv);
+int ServerInit(TServer *srv);
void ServerRun(TServer *srv);
void ServerRunOnce(TServer *srv);
void ServerRunOnce2(TServer * const srv,
Modified: freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/server.c
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/server.c (original)
+++ freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/server.c Wed Apr 25 15:57:14 2007
@@ -711,20 +711,30 @@
SocketClose(&(c->socket));
}
-void ServerInit(TServer *srv)
+int ServerInit(TServer *srv)
{
/********* Must check errors from these functions *************/
- if (!SocketInit())
- TraceExit("Can't initialize TCP sockets\n");;
+ if (!SocketInit()) {
+ TraceMsg("Can't initialize TCP sockets\n");
+ return FALSE;
+ }
+
+ if (!SocketCreate(&srv->listensock)) {
+ TraceMsg("Can't create a socket\n");
+ return FALSE;
+ }
+
+ if (!SocketBind(&srv->listensock,NULL,srv->port)) {
+ TraceMsg("Can't bind\n");
+ return FALSE;
+ }
+
+ if (!SocketListen(&srv->listensock,MAX_CONN)) {
+ TraceMsg("Can't listen\n");
+ return FALSE;
+ }
- if (!SocketCreate(&srv->listensock))
- TraceExit("Can't create a socket\n");;
-
- if (!SocketBind(&srv->listensock,NULL,srv->port))
- TraceExit("Can't bind\n");
-
- if (!SocketListen(&srv->listensock,MAX_CONN))
- TraceExit("Can't listen\n");
+ return TRUE;
}
/* With pthread configuration, our connections run as threads of a
Modified: freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/trace.c
==============================================================================
--- freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/trace.c (original)
+++ freeswitch/trunk/libs/xmlrpc-c/lib/abyss/src/trace.c Wed Apr 25 15:57:14 2007
@@ -63,5 +63,5 @@
va_start(argptr,fmt);
TraceVMsg(fmt,argptr);
va_end(argptr);
- exit(1);
+ abort();
}
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c Wed Apr 25 15:57:14 2007
@@ -304,7 +304,11 @@
xmlrpc_server_abyss_set_handler(&env, &abyssServer, "/RPC2", registryP);
- ServerInit(&abyssServer);
+ if (ServerInit(&abyssServer) != TRUE) {
+ globals.running = 0;
+ return SWITCH_STATUS_FALSE;
+ }
+
ServerAddHandler(&abyssServer, HandleHook);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Starting HTTP Port %d, DocRoot [%s]\n", globals.port, SWITCH_GLOBAL_dirs.htdocs_dir);
More information about the Freeswitch-svn
mailing list