@herlesupreeth commented on this pull request.

Thanks for the fix. I left a few comments. Let me know what you think


In src/modules/cdp/peerstatemachine.c:

> @@ -1241,8 +1233,12 @@ void Snd_Message(peer *p, AAAMessage *msg)
 	int send_message_before_session_sm = 0;
 	LM_DBG("called to peer [%.*s] for %s with code %d \n", p->fqdn.len,
 			p->fqdn.s, is_req(msg) ? "request" : "response", msg->commandCode);
-	if(msg->sessionId)
+	if(msg->sessionId) {
+		// Ensure proper locking order
+		lock_release(p->lock);

I am not sure adding lock part here if the right way. I would prefer this function be called with the lock (as mentioned in the comments above at line 1225). I will let other comment on this.


In src/modules/cdp/peerstatemachine.c:

> @@ -1351,8 +1347,13 @@ void Rcv_Process(peer *p, AAAMessage *msg)
 		return;
 	}
 
-	if(msg->sessionId)
+	if(msg->sessionId) {
+		// Ensure proper locking order
+		lock_release(p->lock);

same comment as above about the part of having locking parts inside the function


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/4191/review/2727880582@github.com>