Module: kamailio
Branch: master
Commit: 8e7f2e6a158bb2c59600b03be3c7e6eefc416180
URL:
https://github.com/kamailio/kamailio/commit/8e7f2e6a158bb2c59600b03be3c7e6e…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2021-12-17T12:53:37Z
dlgs: optimize dlgs_init, if/else path are identical
---
Modified: src/modules/dlgs/dlgs_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8e7f2e6a158bb2c59600b03be3c7e6e…
Patch:
https://github.com/kamailio/kamailio/commit/8e7f2e6a158bb2c59600b03be3c7e6e…
---
diff --git a/src/modules/dlgs/dlgs_mod.c b/src/modules/dlgs/dlgs_mod.c
index 46de9d5c44..a0c7af791e 100644
--- a/src/modules/dlgs/dlgs_mod.c
+++ b/src/modules/dlgs/dlgs_mod.c
@@ -174,11 +174,7 @@ static int ki_dlgs_init(sip_msg_t *msg, str *src, str *dst, str
*data)
if(msg->first_line.type == SIP_REQUEST) {
rtype = SIP_REQUEST;
- if(msg->first_line.u.request.method_value == METHOD_INVITE) {
- rmethod = METHOD_INVITE;
- } else {
- rmethod = msg->first_line.u.request.method_value;
- }
+ rmethod = msg->first_line.u.request.method_value;
} else {
rtype = SIP_REPLY;
if(msg->cseq==NULL && ((parse_headers(msg, HDR_CSEQ_F, 0)==-1) ||