mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
add dl_debug api command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4883 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1391,9 +1391,9 @@ static void xmpp_connect(ldl_handle_t *handle, char *jabber_id, char *pass)
|
||||
handle,
|
||||
(iksStreamHook *) (ldl_test_flag(handle, LDL_FLAG_COMPONENT) ? on_stream_component : on_stream));
|
||||
|
||||
if (globals.debug) {
|
||||
iks_set_log_hook(handle->parser, (iksLogHook *) on_log);
|
||||
}
|
||||
|
||||
iks_set_log_hook(handle->parser, (iksLogHook *) on_log);
|
||||
|
||||
|
||||
strncpy(tmp, jabber_id, sizeof(tmp)-1);
|
||||
sl = strchr(tmp, '/');
|
||||
@@ -1763,6 +1763,15 @@ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, char *subje
|
||||
|
||||
}
|
||||
|
||||
int ldl_global_debug(int on)
|
||||
{
|
||||
if (on > -1) {
|
||||
globals.debug = on ? 1 : 0;
|
||||
}
|
||||
|
||||
return globals.debug ? 1 : 0;
|
||||
}
|
||||
|
||||
void ldl_global_set_logger(ldl_logger_t logger)
|
||||
{
|
||||
globals.logger = logger;
|
||||
|
@@ -375,6 +375,13 @@ void *ldl_session_get_private(ldl_session_t *session);
|
||||
*/
|
||||
void ldl_session_accept_candidate(ldl_session_t *session, ldl_candidate_t *candidate);
|
||||
|
||||
/*!
|
||||
\brief turn logging on/off
|
||||
\param on (TRUE or FALSE)
|
||||
\return current state
|
||||
*/
|
||||
int ldl_global_debug(int on);
|
||||
|
||||
/*!
|
||||
\brief Set a custom logger
|
||||
\param logger the logger function
|
||||
|
Reference in New Issue
Block a user