Module: kamailio
Branch: master
Commit: 43563cf9888386aa0d7e4d5f63e9ee1147777e6c
URL:
https://github.com/kamailio/kamailio/commit/43563cf9888386aa0d7e4d5f63e9ee1…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-11-20T14:16:50+01:00
uid_avp_db: add fixup_free* to exported functions
---
Modified: src/modules/uid_avp_db/extra_attrs.c
Modified: src/modules/uid_avp_db/extra_attrs.h
Modified: src/modules/uid_avp_db/uid_avp_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/43563cf9888386aa0d7e4d5f63e9ee1…
Patch:
https://github.com/kamailio/kamailio/commit/43563cf9888386aa0d7e4d5f63e9ee1…
---
diff --git a/src/modules/uid_avp_db/extra_attrs.c b/src/modules/uid_avp_db/extra_attrs.c
index c8fde1bb184..171ea041ac0 100644
--- a/src/modules/uid_avp_db/extra_attrs.c
+++ b/src/modules/uid_avp_db/extra_attrs.c
@@ -459,6 +459,14 @@ int extra_attrs_fixup(void **param, int param_no)
return 0;
}
+int extra_attrs_fixup_free(void **param, int param_no)
+{
+ if(param_no == 2) {
+ return fixup_free_fparam_2(param, param_no);
+ }
+ return 0;
+}
+
/******* locking *******/
#define LOCK_CNT 32
diff --git a/src/modules/uid_avp_db/extra_attrs.h b/src/modules/uid_avp_db/extra_attrs.h
index bd5d1933c47..ba35d34bdfd 100644
--- a/src/modules/uid_avp_db/extra_attrs.h
+++ b/src/modules/uid_avp_db/extra_attrs.h
@@ -16,6 +16,7 @@ int save_extra_attrs(struct sip_msg *msg, char *_table, char *_id);
int remove_extra_attrs(struct sip_msg *msg, char *_table, char *_id);
int extra_attrs_fixup(void **param, int param_no);
+int extra_attrs_fixup_free(void **param, int param_no);
int lock_extra_attrs(struct sip_msg *msg, char *_table, char *_id);
int unlock_extra_attrs(struct sip_msg *msg, char *_table, char *_id);
diff --git a/src/modules/uid_avp_db/uid_avp_db.c b/src/modules/uid_avp_db/uid_avp_db.c
index 20ffca560d3..372e898c51a 100644
--- a/src/modules/uid_avp_db/uid_avp_db.c
+++ b/src/modules/uid_avp_db/uid_avp_db.c
@@ -76,16 +76,16 @@ static cmd_export_t cmds[] = {
{"load_attrs", load_attrs, 2, attrs_fixup, 0,
REQUEST_ROUTE | FAILURE_ROUTE},
/* functions for loading/storing flagged attributes into DB */
- {"load_extra_attrs", load_extra_attrs, 2, extra_attrs_fixup, 0,
+ {"load_extra_attrs", load_extra_attrs, 2, extra_attrs_fixup,
extra_attrs_fixup_free,
REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE},
- {"save_extra_attrs", save_extra_attrs, 2, extra_attrs_fixup, 0,
+ {"save_extra_attrs", save_extra_attrs, 2, extra_attrs_fixup,
extra_attrs_fixup_free,
REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE},
- {"remove_extra_attrs", remove_extra_attrs, 2, extra_attrs_fixup, 0,
+ {"remove_extra_attrs", remove_extra_attrs, 2, extra_attrs_fixup,
extra_attrs_fixup_free,
REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE},
/* locking attrs - needed for proper work! */
- {"lock_extra_attrs", lock_extra_attrs, 2, extra_attrs_fixup, 0,
+ {"lock_extra_attrs", lock_extra_attrs, 2, extra_attrs_fixup,
extra_attrs_fixup_free,
REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE},
- {"unlock_extra_attrs", unlock_extra_attrs, 2, extra_attrs_fixup, 0,
+ {"unlock_extra_attrs", unlock_extra_attrs, 2, extra_attrs_fixup,
extra_attrs_fixup_free,
REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE},
{0, 0, 0, 0, 0, 0}
};