Module: kamailio Branch: master Commit: 65645c761e94cedde04f100764d5c506590cb200 URL: https://github.com/kamailio/kamailio/commit/65645c761e94cedde04f100764d5c506590cb200
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2025-02-05T13:30:17+01:00 textops: catch return 0 when removing via param --- Modified: src/modules/textops/textops.c --- Diff: https://github.com/kamailio/kamailio/commit/65645c761e94cedde04f100764d5c506590cb200.diff Patch: https://github.com/kamailio/kamailio/commit/65645c761e94cedde04f100764d5c506590cb200.patch --- diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 94fba1c32a4..db1929e0127 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -5026,11 +5026,7 @@ static int ki_via_param_rm(sip_msg_t *msg, str *name, int idx) LM_ERR("no memory for delete operation\n"); return -1; } - if(ret < 0) { - ret = 1; - } else { - ret++; - } + ret++; } } if(ret > 0) { @@ -5041,7 +5037,7 @@ static int ki_via_param_rm(sip_msg_t *msg, str *name, int idx) } } } - return ret; + return (ret == 0) ? -1 : ret; } /** _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!