[OpenSIPS-Devel] Global body administration useful? - Please comment!

Roger Schreiter roger at planinternet.de
Sat Jul 16 14:13:10 CEST 2011


Hello,

imho, there should be a global administration of
the body parts - similar like the global data_lump
system.

Currently, if different modules try to add or delete
a complete body or a complete body part or try to transform a
single body to a multipart body (for adding a new body), while
the other module is deleting the complete body (because
it wants to delete the specific body, which was there
originally), it might imho lead to a corrupted body,
because those modues do not know about each others
plans to add or delete body parts.

The solutions might be a global adminstration of body
parts, with following functions:

- add_bodypart(content, mimetype)
- del_bodypart(mimetype, index)

Those functions should automatically replace single bodies to
a part of a multipart body if needed.

This body administration should allow the different modules,
to add or remove body parts, without knowing of each other.

However the existing data_lump system should also be
available for editing the content of the _original_existing_
body, for compatibility reasons and for allowing several
modules to edit the same (original) body (part).

One thing should be forbidden to modules in the future:
Deleting or adding a complete body (part) or transforming
multipart body to a single body or vice versa, because this
will ony be allowed to the new body part administration
in the future.


Please comment!

Roger.



More information about the Devel mailing list