[Freeswitch-svn] [commit] r9957 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
brian at freeswitch.org
Sat Oct 11 01:42:53 EDT 2008
Author: brian
Date: Sat Oct 11 01:42:52 2008
New Revision: 9957
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
clean up log printfs, my pickyness again
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Sat Oct 11 01:42:52 2008
@@ -595,7 +595,7 @@
SIPTAG_SUPPORTED_STR(supported), SIPTAG_USER_AGENT_STR(profile->user_agent), TAG_END());
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "activated db for %s\n", profile->name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activated db for %s\n", profile->name);
switch_mutex_init(&profile->ireg_mutex, SWITCH_MUTEX_NESTED, profile->pool);
switch_mutex_init(&profile->gateway_mutex, SWITCH_MUTEX_NESTED, profile->pool);
@@ -642,7 +642,7 @@
su_root_run(profile->s_root);
sofia_clear_pflag_locked(profile, PFLAG_RUNNING);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "waiting for worker thread\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Waiting for worker thread\n");
while (sofia_test_pflag(profile, PFLAG_WORKER_RUNNING)) {
switch_yield(100000);
@@ -650,7 +650,7 @@
while (profile->inuse) {
switch_yield(5000000);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "waiting for %d session(s)\n", profile->inuse);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Waiting for %d session(s)\n", profile->inuse);
if (!sanity--) {
break;
}
@@ -892,7 +892,7 @@
gateway->retry_seconds = atoi(retry_seconds);
if (gateway->retry_seconds < 10) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "invalid retry-seconds of %d on gateway %s, using the value of 30 instead.\n",
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid retry-seconds of %d on gateway %s, using the value of 30 instead.\n",
gateway->retry_seconds, name);
gateway->retry_seconds = 30;
}
@@ -986,7 +986,7 @@
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "reconfig", "true");
if (!(xml = switch_xml_open_cfg(cf, &cfg, params))) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
status = SWITCH_STATUS_FALSE;
goto done;
}
@@ -1330,7 +1330,7 @@
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "profile", profile_name);
if (!(xml = switch_xml_open_cfg(cf, &cfg, params))) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
status = SWITCH_STATUS_FALSE;
goto done;
}
@@ -1972,10 +1972,10 @@
}
gateway->status = SOFIA_GATEWAY_UP;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "ping failed %s\n", gateway->name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Ping failed %s\n", gateway->name);
gateway->status = SOFIA_GATEWAY_DOWN;
if (gateway->state == REG_STATE_REGED) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "unregister %s\n", gateway->name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unregister %s\n", gateway->name);
gateway->state = REG_STATE_FAILED;
}
}
@@ -2156,7 +2156,7 @@
if (sip && sip->sip_call_id && sip->sip_call_id->i_id) callid = sip->sip_call_id->i_id;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "received response to invite with no matching session, destroying callid [%s]!\n", callid);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Received response to invite with no matching session, destroying callid [%s]!\n", callid);
if (nh) {
if (status == 200) {
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Sat Oct 11 01:42:52 2008
@@ -464,7 +464,7 @@
}
if (switch_strlen_zero(stun_ip)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! NO STUN SERVER\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "STUN Failed! NO STUN SERVER\n");
goto out;
}
@@ -481,21 +481,21 @@
}
}
if (status != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! %s:%d [%s]\n", stun_ip, stun_port, error);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "STUN Failed! %s:%d [%s]\n", stun_ip, stun_port, error);
goto out;
}
if (!*ip) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Stun Failed! No IP returned\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "STUN Failed! No IP returned\n");
goto out;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Success [%s]:[%d]\n", *ip, *port);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "STUN Success [%s]:[%d]\n", *ip, *port);
status = SWITCH_STATUS_SUCCESS;
if (tech_pvt) {
if (myport == *port && !strcmp(*ip, tech_pvt->profile->rtpip)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun Not Required ip and port match. [%s]:[%d]\n", *ip, *port);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "STUN Not Required ip and port match. [%s]:[%d]\n", *ip, *port);
if (profile->pflags & PFLAG_STUN_AUTO_DISABLE) {
profile->pflags &= ~PFLAG_STUN_ENABLED;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Stun completely disabled.\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "STUN completely disabled.\n");
}
} else {
tech_pvt->stun_ip = switch_core_session_strdup(tech_pvt->session, stun_ip);
@@ -2203,7 +2203,7 @@
int crypto_tag;
if (m->m_proto != sdp_proto_srtp) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "a=crypto in RTP/AVP\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "a=crypto in RTP/AVP, refer to rfc3711\n");
match = 0;
goto done;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Sat Oct 11 01:42:52 2008
@@ -250,7 +250,7 @@
if ((pname = switch_event_get_header(event, "sofia-profile"))) {
if (!(profile = sofia_glue_find_profile(pname))) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "no profile %s\n", pname);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No profile %s\n", pname);
}
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Sat Oct 11 01:42:52 2008
@@ -92,7 +92,7 @@
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gateway_ptr->name);
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gateway_ptr->register_from);
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gateway_ptr->register_contact);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "deleted gateway %s\n", gateway_ptr->name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Deleted gateway %s\n", gateway_ptr->name);
} else {
last = gateway_ptr;
}
@@ -127,7 +127,7 @@
gateway_ptr->status = SOFIA_GATEWAY_UP;
break;
case REG_STATE_REGISTER:
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "registered %s\n", gateway_ptr->name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Registered %s\n", gateway_ptr->name);
if (gateway_ptr->expires > 60) {
gateway_ptr->expires = now + (gateway_ptr->freq - 15);
} else {
@@ -150,7 +150,7 @@
NUTAG_URL(gateway_ptr->register_proxy),
SIPTAG_TO_STR(gateway_ptr->register_to),
NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END()))) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "registering %s\n", gateway_ptr->name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Registering %s\n", gateway_ptr->name);
if (!gateway_ptr->sofia_private) {
gateway_ptr->sofia_private = malloc(sizeof(*gateway_ptr->sofia_private));
@@ -732,7 +732,7 @@
}
if (auth_res != AUTH_OK && !stale) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "send %s for [%s@%s]\n", forbidden ? "forbidden" : "challenge", to_user, to_host);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send %s for [%s@%s]\n", forbidden ? "forbidden" : "challenge", to_user, to_host);
if (auth_res == AUTH_FORBIDDEN) {
nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());
} else {
@@ -1095,7 +1095,7 @@
switch_channel_t *channel = switch_core_session_get_channel(session);
if ((tech_pvt = switch_core_session_get_private(session)) && switch_test_flag(tech_pvt, TFLAG_REFER)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "received reply from refer\n");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Received reply from REFER\n");
goto end;
}
@@ -1315,7 +1315,7 @@
if (switch_xml_locate_user("id", switch_strlen_zero(username) ? "nobody" : username,
domain_name, ip, &xml, &domain, &user, params) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "can't find user [%s@%s]\n"
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n"
"You must define a domain called '%s' in your directory and add a user with the id=\"%s\" attribute\n"
"and you must configure your device to use the proper domain in it's authentication credentials.\n"
, username, domain_name, domain_name, username);
More information about the Freeswitch-svn
mailing list