Hello all,
during my journey through the openser code is noticed a few
places for
improvement.. The same issues exists with some of our
internal modules.
There is a huge duplication of effort regarding utility
functions for data
type conversion or data handling in general. Many modules
defines their own,
slightly different functions. Only for str and char* copying
there existing
at the moment at least five different functions in the
code:
str_dup, str_duplicate, strdup (own definition and from
strings.h),
shm_strdup, dupl_string, and in some places of course
several macros with the
same purpose. As i mentioned before, the same problem exist
with some of our
internal modules.
It is the same with the str_fixup functions (char* to str)
and in the db layer
with the converter functions, i allready submit a patch some
time ago for
this.
The current situation is in my opinion not optimal from the
maintenace point
of view, it also increases the code size and could decrease
the performance.
I'm willing to work on this, i only need to know if this
work is welcome. One
normal str_dup function that uses string.h, and one for
shm_memory should be
sufficient.
Furthermore i propose a change to the contribution rules on
the OpenSER
webpage, that any new modules should use the existing
utility functions in
the core.
Part of the problem is the lack of a good hacking guide for
OpenSER, many
module authors don't know probably about the e.g. ut.h
header file.
Cheers,
Henning
_______________________________________________
Devel mailing list
Devel openser.org
htt
p://openser.org/cgi-bin/mailman/listinfo/devel
|