mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-14 07:14:14 +00:00
FS-9924: Removed extra space in source files
This commit is contained in:
1 parent
60d4e87487
commit
df1ab07ca4
455 files changed
+9699
-9698
No files matched your search
@@ -23,7 +23,7 @@ static switch_status_t python_hanguphook(switch_core_session_t *session_hungup);
|
||||
|
||||
void Session::destroy(void)
|
||||
{
|
||||
|
||||
|
||||
if (!allocated) {
|
||||
return;
|
||||
}
|
||||
@@ -40,7 +40,7 @@ void Session::destroy(void)
|
||||
Py_DECREF(hangup_func);
|
||||
hangup_func = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (hangup_func_arg) {
|
||||
Py_DECREF(hangup_func_arg);
|
||||
hangup_func_arg = NULL;
|
||||
@@ -124,7 +124,7 @@ bool Session::ready()
|
||||
|
||||
/*! this is called every time ready is called as a workaround to
|
||||
make it threadsafe. it sets a flag, and all the places where it
|
||||
comes in and out of threadswap, check it. so the end result is
|
||||
comes in and out of threadswap, check it. so the end result is
|
||||
you still get the hangup hook executed pretty soon after you
|
||||
hangup. */
|
||||
do_hangup_hook();
|
||||
@@ -148,7 +148,7 @@ void Session::do_hangup_hook()
|
||||
mark++;
|
||||
|
||||
if (hangup_func) {
|
||||
|
||||
|
||||
if (!PyCallable_Check(hangup_func)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "function not callable\n");
|
||||
return;
|
||||
@@ -157,7 +157,7 @@ void Session::do_hangup_hook()
|
||||
if (!Self) {
|
||||
mod_python_conjure_session(NULL, session);
|
||||
}
|
||||
|
||||
|
||||
if (hangup_func_arg) {
|
||||
arglist = Py_BuildValue("(OsO)", Self, what, hangup_func_arg);
|
||||
} else {
|
||||
@@ -167,7 +167,7 @@ void Session::do_hangup_hook()
|
||||
if (!(result = PyEval_CallObject(hangup_func, arglist))) {
|
||||
PyErr_Print();
|
||||
}
|
||||
|
||||
|
||||
Py_XDECREF(arglist);
|
||||
Py_XDECREF(hangup_func_arg);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ void Session::setHangupHook(PyObject *pyfunc, PyObject *arg)
|
||||
Py_XDECREF(hangup_func_arg);
|
||||
hangup_func_arg = NULL;
|
||||
}
|
||||
|
||||
|
||||
hangup_func = pyfunc;
|
||||
hangup_func_arg = arg;
|
||||
|
||||
@@ -239,10 +239,10 @@ void Session::unsetInputCallback(void)
|
||||
Py_XDECREF(cb_arg);
|
||||
cb_arg = NULL;
|
||||
}
|
||||
|
||||
|
||||
args.input_callback = NULL;
|
||||
ap = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Session::setInputCallback(PyObject *cbfunc, PyObject *funcargs)
|
||||
@@ -295,7 +295,7 @@ switch_status_t Session::run_dtmf_callback(void *input, switch_input_type_t ityp
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "function not callable\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (itype == SWITCH_INPUT_TYPE_DTMF) {
|
||||
switch_dtmf_t *dtmf = (switch_dtmf_t *) input;
|
||||
io = mod_python_conjure_DTMF(dtmf->digit, dtmf->duration);
|
||||
@@ -311,7 +311,7 @@ switch_status_t Session::run_dtmf_callback(void *input, switch_input_type_t ityp
|
||||
if (!Self) {
|
||||
mod_python_conjure_session(NULL, session);
|
||||
}
|
||||
|
||||
|
||||
if (cb_arg) {
|
||||
arglist = Py_BuildValue("(OsOO)", Self, what, io, cb_arg);
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
|
||||
*
|
||||
@@ -22,7 +22,7 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Brian Fertig <brian.fertig@convergencetek.com>
|
||||
* Johny Kadarisman <jkr888@gmail.com>
|
||||
* Traun Leyden <tleyden@branchcut.com>
|
||||
@@ -77,7 +77,7 @@ static switch_mutex_t *THREAD_POOL_LOCK = NULL;
|
||||
|
||||
|
||||
/**
|
||||
* This function is similiar to PyErr_Print. It uses the freeswitch print/log mechanism instead of the python sys.stderr
|
||||
* This function is similiar to PyErr_Print. It uses the freeswitch print/log mechanism instead of the python sys.stderr
|
||||
*/
|
||||
static void print_python_error(const char * script)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ static void print_python_error(const char * script)
|
||||
if (buffer == NULL ) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Not enough Memory to create the error buffer");
|
||||
}
|
||||
|
||||
|
||||
/* just for security that we will always have a string terminater */
|
||||
memset(buffer, 0, 20 * 1024 * sizeof(char) );
|
||||
|
||||
@@ -113,7 +113,7 @@ static void print_python_error(const char * script)
|
||||
|
||||
/*Print error message*/
|
||||
if (pyValue != NULL && (pyString=PyObject_Str(pyValue))!=NULL && (PyString_Check(pyString))) {
|
||||
strcat(buffer, "\nMessage: ");
|
||||
strcat(buffer, "\nMessage: ");
|
||||
strcat(buffer, PyString_AsString(pyString));
|
||||
} else {
|
||||
strcat(buffer, "\nMessage: <unknown exception date> ");
|
||||
@@ -279,7 +279,7 @@ static void eval_some_python(const char *funcname, char *args, switch_core_sessi
|
||||
arg = Py_BuildValue("(s)", switch_str_nil(argv[1]));
|
||||
}
|
||||
|
||||
// invoke the handler
|
||||
// invoke the handler
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call python script \n");
|
||||
result = PyEval_CallObjectWithKeywords(function, arg, (PyObject *) NULL);
|
||||
Py_DECREF(function);
|
||||
@@ -291,7 +291,7 @@ static void eval_some_python(const char *funcname, char *args, switch_core_sessi
|
||||
*str = strdup((char *) PyString_AsString(result));
|
||||
}
|
||||
} else if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
|
||||
// Print error, but ignore SystemExit
|
||||
// Print error, but ignore SystemExit
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error calling python script\n");
|
||||
print_python_error(script);
|
||||
PyErr_Clear();
|
||||
@@ -602,7 +602,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_python_shutdown)
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Had to kill %d threads\n", thread_cnt);
|
||||
|
||||
/* Give threads a few seconds to terminate.
|
||||
/* Give threads a few seconds to terminate.
|
||||
Not using switch_thread_join() since if threads refuse to die
|
||||
then freeswitch will hang */
|
||||
for (i = 0; i < 10 && thread_pool_head; i++) {
|
||||
|
||||
Reference in new issue
Block a user