[sr-dev] git:andrei/rve_f_params: core: automatically fill known fixup_free functions

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Aug 5 23:17:47 CEST 2010


Module: sip-router
Branch: andrei/rve_f_params
Commit: d709a720cdbc578eb27184061708f730d2552b6f
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d709a720cdbc578eb27184061708f730d2552b6f

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu Aug  5 23:13:12 2010 +0200

core: automatically fill known fixup_free functions

When a module is loaded, for each fixup with a missing fixup_free
function fill the fixup_free function if known.
This way if a module uses one of the known standard fixups, the
core will fill the corresponding free fixup function even if it's
missing in the original module or the module uses a ser style
interface (that does not have a way to define free fixups).

---

 sr_module.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sr_module.c b/sr_module.c
index 2628226..04fb080 100644
--- a/sr_module.c
+++ b/sr_module.c
@@ -203,6 +203,9 @@ static sr31_cmd_export_t* sr_cmd_exports_convert(unsigned ver,
 		/* 3.1+ specific stuff */
 		ret[i].fixup_flags = 0;
 		ret[i].module_exports = mod;
+		/* fill known free fixups */
+		if (ret[i].fixup && ret[i].free_fixup == 0)
+			ret[i].free_fixup = get_fixup_free(ret[i].fixup);
 	}
 	return ret;
 error:




More information about the sr-dev mailing list