[sr-dev] Code-guidelines ?

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Jun 12 13:32:18 CEST 2009


On Jun 11, 2009 at 22:56, Ra?l Alexis Betancor Santana <rabs at dimension-virtual.com> wrote:
> 
> What are the code guidelines we must follow when developing for s-r ? I have 
> not found a code-guideline on the wiki.

We have only some coding style rules, in doc/ser-coding-style.txt
(http://git.sip-router.org/cgi-bin/gitweb.cgi?p=ser_core;a=blob;f=doc/ser-coding-style.txt).
> 
> I don't know if I used the correct LOG macros on the call_control module I 
> just taked a look at tm module and see that is used the LOG macros instead of 
> LM_* macros

Code coming from ser uses LOG(), or LOG shortcuts (e.g. ERR(), BUG(),
WARN()) and code from kamailo uses LM_*.


For new stuff use whatever you like, as long as you use the same thing
all across your module. If you are patching existing code, use whatever
was used before in that piece of code.

At some latter point we will probably run scripts/logging/fix-logs
which should migrate all old log messages to the new simplified
format (removing module_name and function name since they are added
automatically and switching to shorter log names).


Andrei



More information about the sr-dev mailing list