whitespace cleanup...
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7382 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
511958a2c5
commit
d2a0183e71
|
@ -179,7 +179,6 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
|
|||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Got error [%ld] posting to web server [%s]\n",httpRes, globals.url);
|
||||
}
|
||||
|
||||
}
|
||||
curl_easy_cleanup(curl_handle);
|
||||
curl_slist_free_all(headers);
|
||||
|
@ -209,7 +208,6 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
success:
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
|
@ -225,7 +223,6 @@ error:
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
static switch_state_handler_table_t state_handlers = {
|
||||
/*.on_init */ NULL,
|
||||
/*.on_ring */ NULL,
|
||||
|
@ -326,7 +323,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
|
|||
globals.retries = 0;
|
||||
}
|
||||
|
||||
|
||||
if (globals.retries && globals.delay<=0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "retries set but delay 0 setting to 5000ms\n");
|
||||
globals.delay = 5000;
|
||||
|
@ -338,7 +334,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_cdr_shutdown)
|
||||
{
|
||||
|
||||
|
@ -346,8 +341,6 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_cdr_shutdown)
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
|
|
|
@ -81,7 +81,6 @@ usage:
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static size_t file_callback(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
register unsigned int realsize = (unsigned int) (size * nmemb);
|
||||
|
@ -94,7 +93,6 @@ static size_t file_callback(void *ptr, size_t size, size_t nmemb, void *data)
|
|||
return x;
|
||||
}
|
||||
|
||||
|
||||
static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, switch_event_t *params,
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -129,7 +127,6 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
|
|||
return xml;
|
||||
}
|
||||
|
||||
|
||||
switch_snprintf(basic_data, sizeof(basic_data), "hostname=%s§ion=%s&tag_name=%s&key_name=%s&key_value=%s",
|
||||
hostname,
|
||||
section,
|
||||
|
@ -285,7 +282,6 @@ static switch_status_t do_config(void)
|
|||
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_curl_load)
|
||||
{
|
||||
switch_api_interface_t *xml_curl_api_interface;
|
||||
|
|
|
@ -104,7 +104,6 @@ static switch_status_t do_config(void)
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_rpc_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
|
@ -118,7 +117,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_rpc_load)
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static switch_status_t http_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen)
|
||||
{
|
||||
TSession *r = handle->data;
|
||||
|
@ -147,7 +145,6 @@ static switch_status_t http_stream_write(switch_stream_handle_t *handle, const c
|
|||
return ret ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static abyss_bool http_directory_auth(TSession *r, char *domain_name)
|
||||
{
|
||||
char *p, *x;
|
||||
|
@ -228,7 +225,6 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name)
|
|||
goto authed;
|
||||
}
|
||||
|
||||
|
||||
for (x_param = switch_xml_child(x_params, "param"); x_param; x_param = x_param->next) {
|
||||
const char *var = switch_xml_attr_soft(x_param, "name");
|
||||
const char *val = switch_xml_attr_soft(x_param, "value");
|
||||
|
@ -307,7 +303,6 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name)
|
|||
}
|
||||
goto fail;
|
||||
|
||||
|
||||
authed:
|
||||
|
||||
ResponseAddField(r, "freeswitch-user", r->user);
|
||||
|
@ -339,8 +334,6 @@ abyss_bool auth_hook(TSession * r)
|
|||
char *domain_name, *e;
|
||||
abyss_bool ret = FALSE;
|
||||
|
||||
|
||||
|
||||
if (!strncmp(r->uri, "/domains/", 9)) {
|
||||
domain_name = strdup(r->uri + 9);
|
||||
switch_assert(domain_name);
|
||||
|
@ -374,7 +367,6 @@ abyss_bool auth_hook(TSession * r)
|
|||
new_uri
|
||||
);
|
||||
|
||||
|
||||
if (switch_directory_exists(tmp, NULL) == SWITCH_STATUS_SUCCESS) {
|
||||
for (x = 0; x < 2; x++) {
|
||||
switch_snprintf(tmp, sizeof(tmp), "%s%s%s%s",
|
||||
|
@ -404,9 +396,7 @@ abyss_bool auth_hook(TSession * r)
|
|||
ret = !http_directory_auth(r, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -443,7 +433,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
*path_info++ = '\0';
|
||||
}
|
||||
|
||||
|
||||
for (i=0;i<r->response_headers.size;i++) {
|
||||
ti=&r->response_headers.item[i];
|
||||
if (!strcasecmp(ti->name, "freeswitch-user")) {
|
||||
|
@ -492,7 +481,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
|
||||
auth:
|
||||
|
||||
|
||||
if (switch_event_create(&stream.event, SWITCH_EVENT_API) == SWITCH_STATUS_SUCCESS) {
|
||||
const char * const content_length = RequestHeaderValue(r, "content-length");
|
||||
|
||||
|
@ -557,7 +545,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
|
||||
query = qbuf;
|
||||
}
|
||||
|
||||
}
|
||||
if (query) {
|
||||
switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", query);
|
||||
|
@ -583,7 +570,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
|
||||
switch_url_decode(q);
|
||||
|
||||
|
||||
name = q;
|
||||
if ((val = strchr(name, '='))) {
|
||||
*val++ = '\0';
|
||||
|
@ -593,13 +579,10 @@ abyss_bool handler_hook(TSession * r)
|
|||
} while (q != NULL);
|
||||
|
||||
free(qd);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//ResponseChunked(r);
|
||||
|
||||
//ResponseContentType(r, mime);
|
||||
|
@ -609,7 +592,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
|
||||
//HTTPWrite(r, "<pre>\n\n", 7);
|
||||
|
||||
|
||||
/* generation of the date field */
|
||||
if (DateToString(&r->date, buf)) {
|
||||
ResponseAddField(r,"Date", buf);
|
||||
|
@ -630,7 +612,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
ConnWrite(r->conn,CRLF,2);
|
||||
}
|
||||
|
||||
|
||||
switch_snprintf(buf, sizeof(buf), "Connection: close\r\n");
|
||||
ConnWrite(r->conn, buf, (uint32_t) strlen(buf));
|
||||
|
||||
|
@ -656,7 +637,6 @@ abyss_bool handler_hook(TSession * r)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static xmlrpc_value *freeswitch_api(xmlrpc_env * const envP, xmlrpc_value * const paramArrayP, void *const userData)
|
||||
{
|
||||
char *command = NULL, *arg = NULL;
|
||||
|
@ -744,7 +724,6 @@ static xmlrpc_value *freeswitch_man(xmlrpc_env * const envP, xmlrpc_value * cons
|
|||
|
||||
SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
|
||||
{
|
||||
|
||||
xmlrpc_registry *registryP;
|
||||
xmlrpc_env env;
|
||||
char logfile[512];
|
||||
|
@ -783,7 +762,6 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
|
|||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
|
||||
ServerAddHandler(&globals.abyssServer, handler_hook);
|
||||
ServerAddHandler(&globals.abyssServer, auth_hook);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Starting HTTP Port %d, DocRoot [%s]\n", globals.port, SWITCH_GLOBAL_dirs.htdocs_dir);
|
||||
|
@ -793,11 +771,8 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
|
|||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_rpc_shutdown)
|
||||
{
|
||||
|
||||
globals.abyssServer.running = 0;
|
||||
shutdown(globals.abyssServer.listensock, 2);
|
||||
while(globals.running) {
|
||||
|
|
Loading…
Reference in New Issue