@miconda commented on this pull request.
> @@ -1489,6 +1489,83 @@ static int ki_ht_dec(sip_msg_t *msg, str *htname, str
> *itname)
return ki_ht_add_op(msg, htname, itname, -1);
}
+static int ki_sht_cn(sip_msg_t *msg, str *table, str *op, str *pattern)
Wouldn't be enough to export only this function as `KSR.htable.sht_cn(...)`?
The others are just wrappers, the native cfg does not have a PV per each type
of match.
> +
+ /* Build pattern with operator prefix */
+ pat_buf = pkg_malloc(pattern->len + 3);
+ if(!pat_buf) {
+ LM_ERR("no pkg memory\n");
+ return -1;
+ }
+
+ pat.s = pat_buf;
+ pat.len = pattern->len + 2;
+ pat.s[pat.len] = '\0';
+
+ /* Prepend operator prefix to pattern */
+ if(op->len == 5 && strncmp(op->s, "regex", 5) == 0) {
+ pat.s[0] = '~';
+ pat.s[1] = '~';
Why is not the `op` value directly what is expected internally (and documented
for `$shtcn()`), like `~~`, `==` ... It only does an extra translation in this
style.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4492#pullrequestreview-3534693566
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4492/review/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!