man am I OCD about this stuff or what

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9966 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West
2008-10-11 20:01:44 +00:00
parent 0ecfc14d68
commit f1bc3e6bb2
4 changed files with 5 additions and 72 deletions

View File

@@ -55,17 +55,13 @@ static char limit_sql[] =
"CREATE TABLE limit_data (\n"
" hostname VARCHAR(255),\n" " realm VARCHAR(255),\n" " id VARCHAR(255),\n" " uuid VARCHAR(255)\n" ");\n";
static char db_sql[] =
"CREATE TABLE db_data (\n"
" hostname VARCHAR(255),\n" " realm VARCHAR(255),\n" " data_key VARCHAR(255),\n" " data VARCHAR(255)\n" ");\n";
static char group_sql[] =
"CREATE TABLE group_data (\n" " hostname VARCHAR(255),\n" " groupname VARCHAR(255),\n" " url VARCHAR(255)\n" ");\n";
static switch_status_t limit_execute_sql(char *sql, switch_mutex_t *mutex)
{
switch_core_db_t *db;
@@ -102,7 +98,6 @@ static switch_status_t limit_execute_sql(char *sql, switch_mutex_t *mutex)
}
#endif
end:
if (mutex) {
switch_mutex_unlock(mutex);
@@ -111,7 +106,6 @@ static switch_status_t limit_execute_sql(char *sql, switch_mutex_t *mutex)
return status;
}
static switch_bool_t limit_execute_sql_callback(switch_mutex_t *mutex, char *sql, switch_core_db_callback_func_t callback, void *pdata)
{
switch_bool_t ret = SWITCH_FALSE;
@@ -152,10 +146,8 @@ static switch_bool_t limit_execute_sql_callback(switch_mutex_t *mutex, char *sql
}
return ret;
}
static switch_status_t do_config()
{
char *cf = "limit.conf";
@@ -191,7 +183,6 @@ static switch_status_t do_config()
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
#endif
}
}
}
@@ -254,7 +245,6 @@ static switch_status_t do_config()
switch_xml_free(xml);
return status;
}
static switch_status_t hanguphook(switch_core_session_t *session)
@@ -282,7 +272,9 @@ struct callback {
size_t len;
int matches;
};
typedef struct callback callback_t;
static int sql2str_callback(void *pArg, int argc, char **argv, char **columnNames)
{
callback_t *cbt = (callback_t *) pArg;
@@ -292,7 +284,6 @@ static int sql2str_callback(void *pArg, int argc, char **argv, char **columnName
return 0;
}
static int group_callback(void *pArg, int argc, char **argv, char **columnNames)
{
callback_t *cbt = (callback_t *) pArg;
@@ -301,7 +292,6 @@ static int group_callback(void *pArg, int argc, char **argv, char **columnNames)
return 0;
}
SWITCH_STANDARD_API(db_api_function)
{
int argc = 0;
@@ -360,7 +350,6 @@ SWITCH_STANDARD_API(db_api_function)
goto done;
}
error:
stream->write_function(stream, "!err!");
@@ -369,10 +358,8 @@ SWITCH_STANDARD_API(db_api_function)
switch_mutex_unlock(globals.mutex);
switch_safe_free(mydata);
return SWITCH_STATUS_SUCCESS;
}
#define DB_USAGE "[insert|delete]/<realm>/<key>/<val>"
#define DB_DESC "save data"
@@ -414,8 +401,6 @@ SWITCH_STANDARD_APP(db_function)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "USAGE: db %s\n", DB_USAGE);
}
SWITCH_STANDARD_API(group_api_function)
{
int argc = 0;
@@ -493,7 +478,6 @@ SWITCH_STANDARD_API(group_api_function)
switch_mutex_unlock(globals.mutex);
switch_safe_free(mydata);
return SWITCH_STATUS_SUCCESS;
}
#define GROUP_USAGE "[insert|delete]:<group name>:<val>"
@@ -527,7 +511,6 @@ SWITCH_STANDARD_APP(group_function)
limit_execute_sql(sql, globals.mutex);
switch_safe_free(sql);
}
}
#define LIMIT_USAGE "<realm> <id> <max> [transfer_destination_number]"
@@ -600,7 +583,6 @@ SWITCH_STANDARD_APP(limit_function)
switch_mutex_unlock(globals.mutex);
}
SWITCH_MODULE_LOAD_FUNCTION(mod_limit_load)
{
switch_status_t status;
@@ -637,8 +619,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_limit_load)
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs:
* Local Variables:
* mode:c