Module: kamailio
Branch: master
Commit: 759d76819b7c8ab31d71ab8a77a3863c1861e374
URL:
https://github.com/kamailio/kamailio/commit/759d76819b7c8ab31d71ab8a77a3863…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-06-13T09:45:13+02:00
cdp: fix always true condition in peer_timer()
- extended the log message
---
Modified: src/modules/cdp/peermanager.c
---
Diff:
https://github.com/kamailio/kamailio/commit/759d76819b7c8ab31d71ab8a77a3863…
Patch:
https://github.com/kamailio/kamailio/commit/759d76819b7c8ab31d71ab8a77a3863…
---
diff --git a/src/modules/cdp/peermanager.c b/src/modules/cdp/peermanager.c
index f1d9751c5a..e8f2de12df 100644
--- a/src/modules/cdp/peermanager.c
+++ b/src/modules/cdp/peermanager.c
@@ -286,9 +286,10 @@ int peer_timer(time_t now, void *ptr)
lock_get(p->lock);
n = p->next;
- if(p->disabled && (p->state != Closed || p->state != Closing)) {
- LM_DBG("Peer [%.*s] has been disabled - shutting down\n",
- p->fqdn.len, p->fqdn.s);
+ if(p->disabled && p->state != Closed && p->state != Closing)
{
+ LM_DBG("Peer [%.*s] has been disabled [state: %d] - shutting "
+ "down\n",
+ p->fqdn.len, p->fqdn.s, p->state);
if(p->state == I_Open)
sm_process(p, Stop, 0, 1, p->I_sock);
if(p->state == R_Open)