Module: kamailio
Branch: master
Commit: f8bfc8d2c9f8b366e6a0d8d3b1790077ccca5b7e
URL:
https://github.com/kamailio/kamailio/commit/f8bfc8d2c9f8b366e6a0d8d3b179007…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-06-14T07:58:54+02:00
cdp: reworked same code execution in if branches
---
Modified: src/modules/cdp/peerstatemachine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f8bfc8d2c9f8b366e6a0d8d3b179007…
Patch:
https://github.com/kamailio/kamailio/commit/f8bfc8d2c9f8b366e6a0d8d3b179007…
---
diff --git a/src/modules/cdp/peerstatemachine.c b/src/modules/cdp/peerstatemachine.c
index c09ac06fc2b..9419b77134c 100644
--- a/src/modules/cdp/peerstatemachine.c
+++ b/src/modules/cdp/peerstatemachine.c
@@ -929,10 +929,10 @@ void Snd_DWR(peer *p)
return;
dwr->hopbyhopId = next_hopbyhop();
dwr->endtoendId = next_endtoend();
- if(p->state == I_Open)
- peer_send_msg(p, dwr);
- else
- peer_send_msg(p, dwr);
+ if(p->state == I_Open) {
+ LM_DBG("sending in state I_Open\n");
+ }
+ peer_send_msg(p, dwr);
}
/**
@@ -981,10 +981,10 @@ void Snd_DPR(peer *p)
AAACreateAndAddAVPToMessage(
dpr, AVP_Disconnect_Cause, AAA_AVP_FLAG_MANDATORY, 0, x, 4);
- if(p->state == I_Open)
- peer_send_msg(p, dpr);
- else
- peer_send_msg(p, dpr);
+ if(p->state == I_Open) {
+ LM_DBG("sending in state I_Open\n");
+ }
+ peer_send_msg(p, dpr);
}
/**