@@ -8,6 +8,10 @@ $Id$
2.1.0 changes
modules:
+ - textops - functions:
+ - remove_hf_re("regexp") -- filter message headers out
+ by matching the header name field against a regular
+ expression.
- avp - export new selects table to allow dissecting the content of an
attribute by interpreting it as a "name-addr" value
- auth - added extra authentication checks support, to protect
@@ -1088,3 +1088,21 @@ int get_int_fparam(int* dst, struct sip_msg* msg, fparam_t* param)
return 0;
}
+
+/**
+ * Retrieve the compiled RegExp.
+ * @return: 0 for success, negative on error.
+ */
+int get_regex_fparam(regex_t *dst, struct sip_msg* msg, fparam_t* param)
+{
+ switch (param->type) {
+ case FPARAM_REGEX:
+ *dst = *param->v.regex;
+ return 0;
+ default:
+ ERR("unexpected parameter type (%d), instead of regexp.\n",
+ param->type);
+ }
+ return -1;
+}
@@ -323,4 +323,10 @@ int get_str_fparam(str* dst, struct sip_msg* msg, fparam_t* param);
*/
int get_int_fparam(int* dst, struct sip_msg* msg, fparam_t* param);
+int get_regex_fparam(regex_t *dst, struct sip_msg* msg, fparam_t* param);
#endif /* sr_module_h */