Minor improvements to debug output (bug #2644)
authorMark Spencer <markster@digium.com>
Sat, 16 Oct 2004 15:36:16 +0000 (15:36 +0000)
committerMark Spencer <markster@digium.com>
Sat, 16 Oct 2004 15:36:16 +0000 (15:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4017 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c
channels/chan_sip.c
res/res_crypto.c

index 29eeb2f..4eceb6e 100755 (executable)
@@ -5634,12 +5634,12 @@ retryowner2:
                                        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 @@ static int iax2_poke_noanswer(void *data)
        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 c3b018c..faca91f 100755 (executable)
@@ -6532,13 +6532,13 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
                                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 @@ static int sip_poke_noanswer(void *data)
        
        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)
index 912d7c8..a102913 100755 (executable)
@@ -416,7 +416,7 @@ int ast_check_signature_bin(struct ast_key *key, char *msg, int msglen, unsigned
        res = RSA_verify(NID_sha1, digest, sizeof(digest), dsig, 128, key->rsa);
        
        if (!res) {
-               ast_log(LOG_DEBUG, "Key failed verification\n");
+               ast_log(LOG_DEBUG, "Key failed verification: %s\n", key->name);
                return -1;
        }
        /* Pass */