whitespace cleanup...

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7382 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-01-27 03:03:09 +00:00
parent 511958a2c5
commit d2a0183e71
3 changed files with 0 additions and 36 deletions

View File

@ -179,7 +179,6 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Got error [%ld] posting to web server [%s]\n",httpRes, globals.url); 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_easy_cleanup(curl_handle);
curl_slist_free_all(headers); curl_slist_free_all(headers);
@ -209,7 +208,6 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
} }
} }
success: success:
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
@ -225,7 +223,6 @@ error:
return status; return status;
} }
static switch_state_handler_table_t state_handlers = { static switch_state_handler_table_t state_handlers = {
/*.on_init */ NULL, /*.on_init */ NULL,
/*.on_ring */ NULL, /*.on_ring */ NULL,
@ -326,7 +323,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
globals.retries = 0; globals.retries = 0;
} }
if (globals.retries && globals.delay<=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"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "retries set but delay 0 setting to 5000ms\n");
globals.delay = 5000; globals.delay = 5000;
@ -338,7 +334,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
return status; return status;
} }
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_cdr_shutdown) SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_cdr_shutdown)
{ {
@ -346,8 +341,6 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_cdr_shutdown)
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
/* For Emacs: /* For Emacs:
* Local Variables: * Local Variables:
* mode:c * mode:c

View File

@ -81,7 +81,6 @@ usage:
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
static size_t file_callback(void *ptr, size_t size, size_t nmemb, void *data) static size_t file_callback(void *ptr, size_t size, size_t nmemb, void *data)
{ {
register unsigned int realsize = (unsigned int) (size * nmemb); 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; 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, 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) void *user_data)
{ {
@ -129,7 +127,6 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
return xml; return xml;
} }
switch_snprintf(basic_data, sizeof(basic_data), "hostname=%s&section=%s&tag_name=%s&key_name=%s&key_value=%s", switch_snprintf(basic_data, sizeof(basic_data), "hostname=%s&section=%s&tag_name=%s&key_name=%s&key_value=%s",
hostname, hostname,
section, section,
@ -285,7 +282,6 @@ static switch_status_t do_config(void)
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE; return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
} }
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_curl_load) SWITCH_MODULE_LOAD_FUNCTION(mod_xml_curl_load)
{ {
switch_api_interface_t *xml_curl_api_interface; switch_api_interface_t *xml_curl_api_interface;

View File

@ -104,7 +104,6 @@ static switch_status_t do_config(void)
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_rpc_load) SWITCH_MODULE_LOAD_FUNCTION(mod_xml_rpc_load)
{ {
/* connect my internal structure to the blank pointer passed to me */ /* 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; return SWITCH_STATUS_SUCCESS;
} }
static switch_status_t http_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen) static switch_status_t http_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen)
{ {
TSession *r = handle->data; 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; return ret ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
} }
static abyss_bool http_directory_auth(TSession *r, char *domain_name) static abyss_bool http_directory_auth(TSession *r, char *domain_name)
{ {
char *p, *x; char *p, *x;
@ -228,7 +225,6 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name)
goto authed; goto authed;
} }
for (x_param = switch_xml_child(x_params, "param"); x_param; x_param = x_param->next) { 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 *var = switch_xml_attr_soft(x_param, "name");
const char *val = switch_xml_attr_soft(x_param, "value"); 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; goto fail;
authed: authed:
ResponseAddField(r, "freeswitch-user", r->user); ResponseAddField(r, "freeswitch-user", r->user);
@ -339,8 +334,6 @@ abyss_bool auth_hook(TSession * r)
char *domain_name, *e; char *domain_name, *e;
abyss_bool ret = FALSE; abyss_bool ret = FALSE;
if (!strncmp(r->uri, "/domains/", 9)) { if (!strncmp(r->uri, "/domains/", 9)) {
domain_name = strdup(r->uri + 9); domain_name = strdup(r->uri + 9);
switch_assert(domain_name); switch_assert(domain_name);
@ -374,7 +367,6 @@ abyss_bool auth_hook(TSession * r)
new_uri new_uri
); );
if (switch_directory_exists(tmp, NULL) == SWITCH_STATUS_SUCCESS) { if (switch_directory_exists(tmp, NULL) == SWITCH_STATUS_SUCCESS) {
for (x = 0; x < 2; x++) { for (x = 0; x < 2; x++) {
switch_snprintf(tmp, sizeof(tmp), "%s%s%s%s", 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); ret = !http_directory_auth(r, NULL);
} }
} }
} }
return ret; return ret;
} }
@ -443,7 +433,6 @@ abyss_bool handler_hook(TSession * r)
*path_info++ = '\0'; *path_info++ = '\0';
} }
for (i=0;i<r->response_headers.size;i++) { for (i=0;i<r->response_headers.size;i++) {
ti=&r->response_headers.item[i]; ti=&r->response_headers.item[i];
if (!strcasecmp(ti->name, "freeswitch-user")) { if (!strcasecmp(ti->name, "freeswitch-user")) {
@ -492,7 +481,6 @@ abyss_bool handler_hook(TSession * r)
auth: auth:
if (switch_event_create(&stream.event, SWITCH_EVENT_API) == SWITCH_STATUS_SUCCESS) { if (switch_event_create(&stream.event, SWITCH_EVENT_API) == SWITCH_STATUS_SUCCESS) {
const char * const content_length = RequestHeaderValue(r, "content-length"); const char * const content_length = RequestHeaderValue(r, "content-length");
@ -557,7 +545,6 @@ abyss_bool handler_hook(TSession * r)
query = qbuf; query = qbuf;
} }
} }
if (query) { if (query) {
switch_event_add_header(stream.event, SWITCH_STACK_BOTTOM, "HTTP-QUERY", "%s", 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); switch_url_decode(q);
name = q; name = q;
if ((val = strchr(name, '='))) { if ((val = strchr(name, '='))) {
*val++ = '\0'; *val++ = '\0';
@ -593,13 +579,10 @@ abyss_bool handler_hook(TSession * r)
} while (q != NULL); } while (q != NULL);
free(qd); free(qd);
} }
} }
} }
//ResponseChunked(r); //ResponseChunked(r);
//ResponseContentType(r, mime); //ResponseContentType(r, mime);
@ -609,7 +592,6 @@ abyss_bool handler_hook(TSession * r)
//HTTPWrite(r, "<pre>\n\n", 7); //HTTPWrite(r, "<pre>\n\n", 7);
/* generation of the date field */ /* generation of the date field */
if (DateToString(&r->date, buf)) { if (DateToString(&r->date, buf)) {
ResponseAddField(r,"Date", buf); ResponseAddField(r,"Date", buf);
@ -630,7 +612,6 @@ abyss_bool handler_hook(TSession * r)
ConnWrite(r->conn,CRLF,2); ConnWrite(r->conn,CRLF,2);
} }
switch_snprintf(buf, sizeof(buf), "Connection: close\r\n"); switch_snprintf(buf, sizeof(buf), "Connection: close\r\n");
ConnWrite(r->conn, buf, (uint32_t) strlen(buf)); ConnWrite(r->conn, buf, (uint32_t) strlen(buf));
@ -656,7 +637,6 @@ abyss_bool handler_hook(TSession * r)
return ret; return ret;
} }
static xmlrpc_value *freeswitch_api(xmlrpc_env * const envP, xmlrpc_value * const paramArrayP, void *const userData) static xmlrpc_value *freeswitch_api(xmlrpc_env * const envP, xmlrpc_value * const paramArrayP, void *const userData)
{ {
char *command = NULL, *arg = NULL; 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) SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
{ {
xmlrpc_registry *registryP; xmlrpc_registry *registryP;
xmlrpc_env env; xmlrpc_env env;
char logfile[512]; char logfile[512];
@ -783,7 +762,6 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
return SWITCH_STATUS_TERM; return SWITCH_STATUS_TERM;
} }
ServerAddHandler(&globals.abyssServer, handler_hook); ServerAddHandler(&globals.abyssServer, handler_hook);
ServerAddHandler(&globals.abyssServer, auth_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); 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; return SWITCH_STATUS_TERM;
} }
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_rpc_shutdown) SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_xml_rpc_shutdown)
{ {
globals.abyssServer.running = 0; globals.abyssServer.running = 0;
shutdown(globals.abyssServer.listensock, 2); shutdown(globals.abyssServer.listensock, 2);
while(globals.running) { while(globals.running) {