[sr-dev] git:master: modules:sipcapture: fixed mirroring mode, added BPF functionality.
Daniel-Constantin Mierla
miconda at gmail.com
Thu Sep 29 19:40:00 CEST 2011
Hello,
I see you define static variables in header file, they will be cloned in
all files where the header file is included. The header file should
contain ususally the prototype for functions, defines and definitions of
structures. Variables should be defined in .c files, to avoid
duplicates. If needed to be accessed from other files, they can be
declared again as extern in header file (not for static vars, though).
Maybe this time the header file is included only in one .c file, but
still, the variables should be moved in .c file to be safe in the future.
On a different subject, just wanted to tell that instead of:
if(method =~ "^(INVITE|UPDATE|NOTIFY|SUBSCRIBE|OPTIONS|REGISTER)")
you can use:
if(is_method("INVITE|UPDATE|NOTIFY|SUBSCRIBE|OPTIONS|REGISTER"))
it is faster and safer in the case someone sends a new method like
INVITEXYZ, the function is part of textops module.
Cheers,
Daniel
On 9/29/11 2:52 PM, Alexandr Dubovikov wrote:
> Module: sip-router
> Branch: master
> Commit: 81cd64fe78847ad777f51316c50ff45becf1764c
> URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=81cd64fe78847ad777f51316c50ff45becf1764c
>
> Author: Alexandr Dubovikov<alexandr.dubovikov at gmail.com>
> Committer: Alexandr Dubovikov<alexandr.dubovikov at gmail.com>
> Date: Thu Sep 29 14:26:45 2011 +0200
>
> modules:sipcapture: fixed mirroring mode, added BPF functionality.
>
> ---
>
> modules/sipcapture/README | 29 +++-
> modules/sipcapture/doc/sipcapture_admin.xml | 21 +++
> modules/sipcapture/examples/kamailio.cfg | 10 +-
> modules/sipcapture/sipcapture.c | 255 +++++++++++++++++++++-----
> modules/sipcapture/sipcapture.h | 55 ++++++
> 5 files changed, 311 insertions(+), 59 deletions(-)
>
> Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=81cd64fe78847ad777f51316c50ff45becf1764c
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda
More information about the sr-dev
mailing list