From ff2c3dd6dd7ef054e8e6d1340fbdccd4db92d766 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Mon, 2 Jan 2017 09:21:21 +0100 Subject: [PATCH] dnssec: removed empty mi cmds structure - bits of fromatting --- src/modules/dnssec/Makefile | 7 ++----- src/modules/dnssec/dnssec_func.c | 22 +++++++++++----------- src/modules/dnssec/dnssec_func.h | 4 ++-- src/modules/dnssec/dnssec_mod.c | 17 ++++------------- 4 files changed, 19 insertions(+), 31 deletions(-) diff --git a/src/modules/dnssec/Makefile b/src/modules/dnssec/Makefile index d357201b1a9..16466c0d52a 100644 --- a/src/modules/dnssec/Makefile +++ b/src/modules/dnssec/Makefile @@ -1,7 +1,7 @@ # -# example module makefile +# dnssec module makefile +# # -# # WARNING: do not run this directly, it should be run by the master Makefile include ../../Makefile.defs @@ -15,7 +15,4 @@ LIBS+= -lval-threads -lcrypto -lsres -lpthread -lssl DEFS+=-DKAMAILIO_MOD_INTERFACE - -SERLIBPATH=../../lib -SER_LIBS+=$(SERLIBPATH)/kmi/kmi include ../../Makefile.modules diff --git a/src/modules/dnssec/dnssec_func.c b/src/modules/dnssec/dnssec_func.c index 3eb7a7a4916..1486f4e9e59 100644 --- a/src/modules/dnssec/dnssec_func.c +++ b/src/modules/dnssec/dnssec_func.c @@ -15,14 +15,14 @@ * 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 + * 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 * */ /*! * \brief DNSsec support - * \ingroup DNSsec + * \ingroup DNSsec * \author mariuszbi@gmail.com */ /*! @@ -55,7 +55,7 @@ set_context_flags(unsigned int flags) { CHECK_AND_SET(QUERY_DONT_VALIDATE); CHECK_AND_SET(QUERY_IGNORE_SKEW); CHECK_AND_SET(QUERY_AC_DETAIL); - CHECK_AND_SET(QUERY_NO_DLV); + CHECK_AND_SET(QUERY_NO_DLV); CHECK_AND_SET(QUERY_NO_EDNS0_FALLBACK); CHECK_AND_SET(QUERY_RECURSE); CHECK_AND_SET(QUERY_SKIP_RESOLVER); @@ -71,7 +71,7 @@ dnssec_init_context(void) { return -1; if (context_flags != 0) { val_context_setqflags(libval_ctx, VAL_CTX_FLAG_SET, context_flags); - } + } } return 0; } @@ -85,13 +85,13 @@ dnssec_gethostbyname(const char *name) { return NULL; LOG(L_INFO, " gethostbyname(%s) called: wrapper\n", name); - + res = val_gethostbyname(libval_ctx, name, &val_status); if (val_istrusted(val_status) && !val_does_not_exist(val_status)) { return res; - } - return NULL; + } + return NULL; } @@ -104,13 +104,13 @@ dnssec_gethostbyname2(const char *name, int family) { return NULL; LOG(L_INFO, " gethostbyname2(%s) called: wrapper\n", name); - + res = val_gethostbyname2(libval_ctx, name, family, &val_status); if (val_istrusted(val_status) && !val_does_not_exist(val_status)) { return res; } - return NULL; + return NULL; } int @@ -130,7 +130,7 @@ dnssec_res_destroy(void) { int -dnssec_res_search(const char *dname, int class_h, int type_h, +dnssec_res_search(const char *dname, int class_h, int type_h, unsigned char *answer, int anslen) { val_status_t val_status; int ret; diff --git a/src/modules/dnssec/dnssec_func.h b/src/modules/dnssec/dnssec_func.h index abb6deee315..2859280c515 100644 --- a/src/modules/dnssec/dnssec_func.h +++ b/src/modules/dnssec/dnssec_func.h @@ -15,8 +15,8 @@ * 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 + * 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 * */ diff --git a/src/modules/dnssec/dnssec_mod.c b/src/modules/dnssec/dnssec_mod.c index 041335792ab..810bf71d9e0 100644 --- a/src/modules/dnssec/dnssec_mod.c +++ b/src/modules/dnssec/dnssec_mod.c @@ -15,8 +15,8 @@ * 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 + * 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 * */ @@ -56,28 +56,19 @@ gen_lock_t* timer_lock=0; struct list_link* timer = 0; -static cmd_export_t cmds[]={ - {0,0,0,0,0,0} -}; - static param_export_t params[]={ {"general_query_flags", INT_PARAM, &flags}, {0,0,0} }; -static mi_export_t mi_cmds [] = { - {0,0,0,0,0} -}; - - struct module_exports exports= { "dnssec", DEFAULT_DLFLAGS, /* dlopen flags */ - cmds, + 0, params, 0, /* exported statistics */ - mi_cmds, /* exported MI functions */ + 0, /* exported MI functions */ 0, /* exported pseudo-variables */ 0, /* extra processes */ dnssec_init, /* module initialization function */