Skip to content

Commit

Permalink
secsipid: redesign to use per-process API functions
Browse files Browse the repository at this point in the history
- needed to initialize the multi-threaded libsecsipid library per child
process
- per-process API functions to be offered by secsipid_proc module
  • Loading branch information
miconda committed Feb 15, 2021
1 parent 25b1a51 commit 09c61a1
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 203 deletions.
23 changes: 1 addition & 22 deletions src/modules/secsipid/Makefile
Expand Up @@ -6,27 +6,6 @@
include ../../Makefile.defs
auto_gen=
NAME=secsipid.so

ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config)
ifneq ($(BUILDER),)
PKGLIBSECSIPID = $(shell $(BUILDER) --exists secsipid-1 > /dev/null 2>&1 ; echo $$? )
ifneq ($(PKGLIBSECSIPID),0)
BUILDER =
endif
endif
endif

ifeq ($(BUILDER),)
DEFS+= -I.
LIBS = -L. -lsecsipid
else
DEFS+= $(shell pkg-config --cflags secsipid-1)
LIBS = $(shell pkg-config --libs secsipid-1)
endif

ifeq ($(OS), darwin)
LIBS+= -framework CoreFoundation -framework Security -lpthread
endif
LIBS=

include ../../Makefile.modules
32 changes: 28 additions & 4 deletions src/modules/secsipid/doc/secsipid_admin.xml
Expand Up @@ -24,17 +24,23 @@
<para>
It exports the functions to check and generate SIP Identity header.
</para>
<para>
Note that this module needs "secsipid_proc.so" module to be installed,
but without loading the "secsipid_proc.so" via "loadmodule". This module
loads "secsipid_proc.so" in child init callback in order to initialize
the "libsecsipid" per child process.
</para>
</section>
<section>
<title>Dependencies</title>
<section>
<title>&kamailio; Modules</title>
<para>
The following modules must be loaded before this module:
The following modules must be installed (but not loaded) to use this module:
<itemizedlist>
<listitem>
<para>
<emphasis>No dependencies on other &kamailio; modules</emphasis>.
<emphasis>secsipid_proc</emphasis>.
</para>
</listitem>
</itemizedlist>
Expand All @@ -48,7 +54,7 @@
<itemizedlist>
<listitem>
<para>
<emphasis>libsecsipid</emphasis> - https://github.com/asipto/secsipidx/.
<emphasis>none</emphasis>.
</para>
</listitem>
</itemizedlist>
Expand Down Expand Up @@ -137,7 +143,25 @@ modparam("secsipid", "cache_expire", 7200)
</programlisting>
</example>
</section>

<section id="secsipid.p.modproc">
<title><varname>modproc</varname> (str)</title>
<para>
The name of or the path to the required per-process API module.
</para>
<para>
<emphasis>
Default value is "secsipid_proc.so".
</emphasis>
</para>
<example>
<title>Set <varname>modproc</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("secsipid", "modproc", "secsipid_proc2.so")
...
</programlisting>
</example>
</section>
</section>

<section>
Expand Down
148 changes: 0 additions & 148 deletions src/modules/secsipid/libsecsipid.h

This file was deleted.

16 changes: 0 additions & 16 deletions src/modules/secsipid/secsipid.h

This file was deleted.

0 comments on commit 09c61a1

Please sign in to comment.