Skip to content

Commit

Permalink
sst: updated to the new module interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mslehto authored and linuxmaniac committed Sep 28, 2018
1 parent d32d511 commit c2f1610
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
26 changes: 2 additions & 24 deletions src/modules/sst/Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
#
#
# WARNING: do not run this directly, it should be run by the master Makefile
#
# Copyright (C) 2006 SOMA Networks, INC.
# Written by: Ron Winacott
#
# This file is part of Kamailio, a free SIP server.
#
# Kamailio is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version
#
# Kamailio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
# sst module makefile
#
#
# WARNING: do not run this directly, it should be run by the master Makefile

include ../../Makefile.defs
auto_gen=
NAME=sst.so
LIBS=

DEFS+=-DKAMAILIO_MOD_INTERFACE

include ../../Makefile.modules
26 changes: 10 additions & 16 deletions src/modules/sst/sst.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,16 @@ static stat_export_t mod_stats[] = {
#endif /* STATISTICS */

struct module_exports exports= {
"sst", /* module's name */
"sst", /* module's name */
DEFAULT_DLFLAGS, /* dlopen flags */
cmds, /* exported functions */
mod_params, /* param exports */
0, /* exported statistics (they are registered from mod_init) */
0, /* exported MI functions */
0, /* exported pseudo-variables */
0, /* extra processes */
mod_init, /* module initialization function */
0, /* reply processing function */
0, /* Destroy function */
0 /* per-child init function */
cmds, /* exported functions */
mod_params, /* param exports */
0, /* RPC method exports */
0, /* exported pseudo-variables */
0, /* reply processing function */
mod_init, /* module initialization function */
0, /* per-child init function */
0 /* Destroy function */
};

/**
Expand All @@ -155,10 +153,6 @@ struct module_exports exports= {
static int mod_init(void)
{
str s;
/* if statistics are disabled, prevent their registration to core. */
if (sst_enable_stats==0) {
exports.stats = 0;
}

#ifdef STATISTICS
/* register statistics */
Expand Down Expand Up @@ -236,4 +230,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
{
sr_kemi_modules_add(sr_kemi_sst_exports);
return 0;
}
}

0 comments on commit c2f1610

Please sign in to comment.