diff --git a/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c b/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c index db9ae34d37..2defd680df 100644 --- a/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c +++ b/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c @@ -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 diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c index 94bad3e412..52712add1d 100644 --- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c +++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.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; diff --git a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c index 8249e6844f..7b1cf2795a 100644 --- a/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c +++ b/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c @@ -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; @@ -227,7 +224,6 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name) if (!(x_params = switch_xml_child(x_user, "params"))) { 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"); @@ -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); @@ -373,7 +366,6 @@ abyss_bool auth_hook(TSession * r) SWITCH_GLOBAL_dirs.htdocs_dir, new_uri ); - if (switch_directory_exists(tmp, NULL) == SWITCH_STATUS_SUCCESS) { for (x = 0; x < 2; x++) { @@ -404,9 +396,7 @@ abyss_bool auth_hook(TSession * r) ret = !http_directory_auth(r, NULL); } } - } - return ret; } @@ -442,7 +432,6 @@ abyss_bool handler_hook(TSession * r) if ((path_info = strchr(command, '/'))) { *path_info++ = '\0'; } - for (i=0;iresponse_headers.size;i++) { ti=&r->response_headers.item[i]; @@ -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); @@ -582,7 +569,6 @@ abyss_bool handler_hook(TSession * r) } switch_url_decode(q); - name = q; if ((val = strchr(name, '='))) { @@ -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, "
\n\n", 7);
 
-
 	/* generation of the date field */
 	if (DateToString(&r->date, buf)) {
 		ResponseAddField(r,"Date", buf);
@@ -629,7 +611,6 @@ abyss_bool handler_hook(TSession * r)
 		ConnWrite(r->conn, ti->value, (uint32_t)strlen(ti->value));
 		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) {