You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the process of using version 5.7.4 of Kamailio, I found that the $conid cannot be correctly obtained in the TCP: closed routing block of the TCP module event_route. I am certain that it is normal in version 5.4.8.
Troubleshooting
pv [pv_core.c:2725]: pv_get_tcpconn_id()
Reproduction
The test scenario initiated a register registration process for me, and after completing the disconnection of the TCP connection, triggered this event.
Based on the log:
2024-02-26T01:35:55.902229802Z 83(129) DEBUG: <core> [core/tcp_main.c:3671]: tcp_emit_closed_event(): TCP closed event creation triggered (reason: 0)
2024-02-26T01:35:55.902224742Z 83(129) DEBUG: <core> [core/tcp_main.c:3904]: handle_tcp_child(): case CONN_EOF tcp_emit_closed_event before 5
locate the relevant code:
before:
if(tcpconn_try_unhash(tcpconn))
tcpconn_put(tcpconn);
LM_DBG("case CONN_EOF tcp_emit_closed_event before 5\n"); // custom log
tcp_emit_closed_event(tcpconn);
tcpconn_put_destroy(tcpconn); /* deref & delete if refcnt==0 */
try fix:
after:
tcp_emit_closed_event(tcpconn); //change execute order,trigger first and erase later
if(tcpconn_try_unhash(tcpconn))
tcpconn_put(tcpconn);
LM_DBG("case CONN_EOF tcp_emit_closed_event before 5\n"); // custom log
//tcp_emit_closed_event(tcpconn); //
tcpconn_put_destroy(tcpconn); /* deref & delete if refcnt==0 */
I'm not sure if this change will cause any other issues, but the close event can be triggered normally during runtime, and other events should have similar issues that require adjusting the order.
Is there any other better solution?
@liangbaolin: I pushed a few commits to address this one, last being f5c05a6 Can you try with git master branch and see if ok? If yes, patches will be backported.
Description
During the process of using version 5.7.4 of Kamailio, I found that the $conid cannot be correctly obtained in the TCP: closed routing block of the TCP module event_route. I am certain that it is normal in version 5.4.8.
Troubleshooting
Reproduction
The test scenario initiated a register registration process for me, and after completing the disconnection of the TCP connection, triggered this event.
Log Messages
SIP Traffic
Possible Solutions
I'm not sure if this change will cause any other issues, but the close event can be triggered normally during runtime, and other events should have similar issues that require adjusting the order.
Is there any other better solution?
Additional Information
kamailio -v
The text was updated successfully, but these errors were encountered: