ims_diameter_server: drop cdp session to avoid deadlock
authorRiccardo Villa <riccardo.villa@netaxis.be>
Wed, 24 Feb 2021 08:55:46 +0000 (09:55 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Mon, 29 Mar 2021 08:17:58 +0000 (10:17 +0200)
(cherry picked from commit 84c342277f2a73196cb377476f2b80e6b4085e7b)

src/modules/ims_diameter_server/ims_diameter_server.c

index 7266f65..5b69c89 100644 (file)
@@ -310,6 +310,11 @@ int diameter_request(struct sip_msg * msg, char* peer, char* appid, char* comman
        session = cdpb.AAACreateSession(0);
 
        req = cdpb.AAACreateRequest(i_appid, i_commandcode, Flag_Proxyable, session);
+        if (session) {
+               cdpb.AAADropSession(session);
+                session = 0;
+        }
+
        if (!req) goto error1;
 
        if (addAVPsfromJSON(req, &s_message)) {