mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
FS-2746 --resolve large xmlrpc update thanks garmt
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
/* A simple standalone XML-RPC server based on Abyss that contains a
|
||||
/* A simple standalone XML-RPC server program based on Abyss that contains a
|
||||
simple one-thread request processing loop.
|
||||
|
||||
This uses the "provide your own Abyss server" mode of operation.
|
||||
|
||||
xmlrpc_sample_add_server.c is a server that does the same thing, but
|
||||
does it by running a full Abyss daemon in the background, so it has
|
||||
less control over how the requests are served.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 600
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
@@ -66,7 +69,7 @@ printPeerIpAddr(TSession * const abyssSessionP) {
|
||||
static xmlrpc_value *
|
||||
sample_add(xmlrpc_env * const envP,
|
||||
xmlrpc_value * const paramArrayP,
|
||||
void * const serverInfo ATTR_UNUSED,
|
||||
void * const serverInfo,
|
||||
void * const channelInfo) {
|
||||
|
||||
xmlrpc_int x, y, z;
|
||||
@@ -117,6 +120,11 @@ int
|
||||
main(int const argc,
|
||||
const char ** const argv) {
|
||||
|
||||
struct xmlrpc_method_info3 const methodInfo = {
|
||||
.methodName = "sample.add",
|
||||
.methodFunction = &sample_add,
|
||||
.serverInfo = NULL
|
||||
};
|
||||
TServer abyssServer;
|
||||
xmlrpc_registry * registryP;
|
||||
xmlrpc_env env;
|
||||
@@ -136,8 +144,7 @@ main(int const argc,
|
||||
|
||||
registryP = xmlrpc_registry_new(&env);
|
||||
|
||||
xmlrpc_registry_add_method2(
|
||||
&env, registryP, "sample.add", &sample_add, NULL, NULL, NULL);
|
||||
xmlrpc_registry_add_method3(&env, registryP, &methodInfo);
|
||||
|
||||
xmlrpc_registry_set_shutdown(registryP,
|
||||
&requestShutdown, &terminationRequested);
|
||||
|
Reference in New Issue
Block a user