Module: kamailio Branch: master Commit: 65645c761e94cedde04f100764d5c506590cb200 URL: https://github.com/kamailio/kamailio/commit/65645c761e94cedde04f100764d5c506...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/65645c761e94cedde04f100764d5c506... Patch: https://github.com/kamailio/kamailio/commit/65645c761e94cedde04f100764d5c506...
---
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; }
/**