[Asterisk-cvs] asterisk/channels chan_iax2.c, 1.207,
1.208 chan_sip.c, 1.536, 1.537
markster at lists.digium.com
markster at lists.digium.com
Sat Oct 16 11:36:19 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv26832/channels
Modified Files:
chan_iax2.c chan_sip.c
Log Message:
Minor improvements to debug output (bug #2644)
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -d -r1.207 -r1.208
--- chan_iax2.c 14 Oct 2004 03:58:35 -0000 1.207
+++ chan_iax2.c 16 Oct 2004 15:36:16 -0000 1.208
@@ -5634,12 +5634,12 @@
peer = iaxs[fr.callno]->peerpoke;
if ((peer->lastms < 0) || (peer->lastms > peer->maxms)) {
if (iaxs[fr.callno]->pingtime <= peer->maxms)
- ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE!\n", peer->name);
- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Reachable\r\nTime: %d\r\n", peer->name,iaxs[fr.callno]->pingtime);
+ ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE! Time: %d\n", peer->name, iaxs[fr.callno]->pingtime);
+ manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Reachable\r\nTime: %d\r\n", peer->name, iaxs[fr.callno]->pingtime);
} else if ((peer->lastms > 0) && (peer->lastms <= peer->maxms)) {
if (iaxs[fr.callno]->pingtime > peer->maxms)
ast_log(LOG_NOTICE, "Peer '%s' is now TOO LAGGED (%d ms)!\n", peer->name, iaxs[fr.callno]->pingtime);
- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Lagged\r\nTime: %d\r\n", peer->name,iaxs[fr.callno]->pingtime);
+ manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Lagged\r\nTime: %d\r\n", peer->name, iaxs[fr.callno]->pingtime);
}
peer->lastms = iaxs[fr.callno]->pingtime;
if (peer->pokeexpire > -1)
@@ -6152,8 +6152,8 @@
struct iax2_peer *peer = data;
peer->pokeexpire = -1;
if (peer->lastms > -1) {
- ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE!\n", peer->name);
- manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name,peer->lastms);
+ ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Time: %d\n", peer->name, peer->lastms);
+ manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, peer->lastms);
}
if (peer->callno > 0)
iax2_destroy(peer->callno);
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.536
retrieving revision 1.537
diff -u -d -r1.536 -r1.537
--- chan_sip.c 14 Oct 2004 18:29:47 -0000 1.536
+++ chan_sip.c 16 Oct 2004 15:36:16 -0000 1.537
@@ -6532,13 +6532,13 @@
pingtime = 1;
if ((peer->lastms < 0) || (peer->lastms > peer->maxms)) {
if (pingtime <= peer->maxms) {
- ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE!\n", peer->name);
+ ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE! (%dms / %dms)\n", peer->name, pingtime, peer->maxms);
statechanged = 1;
newstate = 1;
}
} else if ((peer->lastms > 0) && (peer->lastms <= peer->maxms)) {
if (pingtime > peer->maxms) {
- ast_log(LOG_NOTICE, "Peer '%s' is now TOO LAGGED!\n", peer->name);
+ ast_log(LOG_NOTICE, "Peer '%s' is now TOO LAGGED! (%dms / %dms)\n", peer->name, pingtime, peer->maxms);
statechanged = 1;
newstate = 2;
}
@@ -7808,7 +7808,7 @@
peer->pokeexpire = -1;
if (peer->lastms > -1) {
- ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE!\n", peer->name);
+ ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Last qualify: %d\n", peer->name, peer->lastms);
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, -1);
}
if (peer->call)
More information about the svn-commits
mailing list