Module: sip-router
Branch: master
Commit: 8b446ade643fa84cb4382067bb181f8a6995e38b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8b446ad…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Tue Jun 15 12:30:32 2010 +0200
dbg(s): remove module, as its functionality is also provided from cfgutils
remove the dbg module, its functionality can be provided from cfgutils:
- dbg_msleep(n) -> usleep(n*1000)
- dbg_abort() -> abort()
- dbg_pkg_status() -> pkg_status()
- dbg_shm_status() -> shm_status()
---
modules_s/dbg/Makefile | 15 -----
modules_s/dbg/README | 71 ---------------------
modules_s/dbg/dbg.c | 128 ---------------------------------------
modules_s/dbg/doc/Makefile | 4 -
modules_s/dbg/doc/dbg.xml | 47 --------------
modules_s/dbg/doc/functions.xml | 97 -----------------------------
modules_s/dbg/doc/params.xml | 17 -----
7 files changed, 0 insertions(+), 379 deletions(-)
diff --git a/modules_s/dbg/Makefile b/modules_s/dbg/Makefile
deleted file mode 100644
index bdb6af3..0000000
--- a/modules_s/dbg/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# $Id$
-#
-# dbg module makefile
-#
-#
-# WARNING: do not run this directly, it should be run by the master Makefile
-
-include ../../Makefile.defs
-auto_gen=
-NAME=dbg.so
-LIBS=
-
-DEFS+=-DSER_MOD_INTERFACE
-
-include ../../Makefile.modules
diff --git a/modules_s/dbg/README b/modules_s/dbg/README
deleted file mode 100644
index 05f5838..0000000
--- a/modules_s/dbg/README
+++ /dev/null
@@ -1,71 +0,0 @@
-
-Dbg Module
-
-Andrei Pelinescu-Onciul
-
- iptelorg GmbH
-
- Copyright � 2007 iptelorg GmbH
- Revision History
- Revision $Revision$ $Date$
- _________________________________________________________________
-
-Overview
-
- This is a module used for debugging. It should contain only test and
- debugging related functions. For example it contains functions to
- simulate delays and to dump core.
-
- This modules should not be used in production.
-
-Parameters
-
- Revision History
- Revision $Revision$ $Date$
-
-Functions
-
- Revision History
- Revision $Revision$ $Date$
-
-dbg_msleep(ms)
-
- Causes a ms milliseconds delay in processing for the executing
- process.
-
- This function can be used to simulate delays.
-
- Meaning of the parameters is as follows:
- * ms - delay in milliseconds.
-
- Example 1. dbg_msleep usage
-...
-dbg_msleep(1000); # 1 second delay
-...
-
-dbg_abort()
-
- Forces a core dump (see abort(3)).
-
- Example 2. dbg_abort usage
-...
-dbg_abort();
-...
-
-dbg_pkg_status()
-
- Dumps the local memory malloc fragment list into the log.
-
- Example 3. dbg_pkg_status usage
-...
-dbg_pkg_status();
-...
-
-dbg_shm_status()
-
- Dumps the shared memory malloc fragment list into the log.
-
- Example 4. dbg_shm_status usage
-...
-dbg_shm_status();
-...
diff --git a/modules_s/dbg/dbg.c b/modules_s/dbg/dbg.c
deleted file mode 100644
index 0af55a2..0000000
--- a/modules_s/dbg/dbg.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*$Id$
- *
- * debug and test ser module
- *
- *
- * Copyright (C) 2007 iptelorg GmbH
- *
- * This file is part of ser, a free SIP server.
- *
- * ser 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
- *
- * For a license to use the ser software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact
iptel.org by e-mail at the following addresses:
- * info(a)iptel.org
- *
- * ser 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-/*
- * History:
- * --------
- * 2007-02-27 created by andrei
- */
-
-
-
-
-#include "../../sr_module.h"
-#include "../../mem/mem.h"
-#include "../../mem/shm_mem.h"
-
-#define _XOPEN_SOURCE 500
-#include <unistd.h>
-#include <stdlib.h>
-
-MODULE_VERSION
-
-static int dbg_msleep(struct sip_msg*, char*,char*);
-static int dbg_abort(struct sip_msg*, char*,char*);
-static int dbg_pkg_status(struct sip_msg*, char*,char*);
-static int dbg_shm_status(struct sip_msg*, char*,char*);
-static int mod_init(void);
-
-
-static cmd_export_t cmds[]={
- {"dbg_msleep", dbg_msleep, 1, fixup_int_1,
- REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE|ONSEND_ROUTE},
- {"dbg_abort", dbg_abort, 0, 0,
- REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE|ONSEND_ROUTE},
- {"dbg_pkg_status", dbg_pkg_status, 0, 0,
- REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE|ONSEND_ROUTE},
- {"dbg_shm_status", dbg_shm_status, 0, 0,
- REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE|ONSEND_ROUTE},
- {0, 0, 0, 0, 0}
-};
-
-static param_export_t params[]={
- {0,0,0}
-};
-
-struct module_exports exports = {
- "dbg",
- cmds,
- 0, /* RPC methods */
- params,
-
- mod_init, /* module initialization function */
- 0, /* response function*/
- 0, /* destroy function */
- 0, /* oncancel function */
- 0 /* per-child init function */
-};
-
-
-static int mod_init(void)
-{
- LOG(L_WARN, "WARNING: dbg module loaded\n");
- return 0;
-}
-
-
-static int dbg_msleep(struct sip_msg* msg, char* val, char* foo)
-{
- int ms;
- fparam_t* p;
- p=(fparam_t*)val;
- ms=p->v.i;
- LOG(L_CRIT, "dbg: sleeping %d ms\n", ms);
- usleep(ms*1000);
- return 1;
-}
-
-
-
-static int dbg_abort(struct sip_msg* msg, char* foo, char* bar)
-{
- LOG(L_CRIT, "dbg: dbg_abort called\n");
- abort();
- return 0;
-}
-
-
-
-static int dbg_pkg_status(struct sip_msg* msg, char* foo, char* bar)
-{
- pkg_status();
- return 1;
-}
-
-
-
-static int dbg_shm_status(struct sip_msg* msg, char* foo, char* bar)
-{
- shm_status();
- return 1;
-}
-
-
diff --git a/modules_s/dbg/doc/Makefile b/modules_s/dbg/doc/Makefile
deleted file mode 100644
index 30f5566..0000000
--- a/modules_s/dbg/doc/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-docs = dbg.xml
-
-docbook_dir=../../../docbook
-include $(docbook_dir)/Makefile.module
diff --git a/modules_s/dbg/doc/dbg.xml b/modules_s/dbg/doc/dbg.xml
deleted file mode 100644
index 9508f7f..0000000
--- a/modules_s/dbg/doc/dbg.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<section id="print"
xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
- <authorgroup>
- <author>
- <firstname>Andrei</firstname>
- <surname>Pelinescu-Onciul</surname>
- <affiliation><orgname>iptelorg GmbH</orgname></affiliation>
- <address>
- <email>andrei(a)iptel.org</email>
- </address>
- </author>
- </authorgroup>
- <copyright>
- <year>2007</year>
- <holder>iptelorg GmbH</holder>
- </copyright>
- <revhistory>
- <revision>
- <revnumber>$Revision$</revnumber>
- <date>$Date$</date>
- </revision>
- </revhistory>
- </sectioninfo>
-
- <title>Dbg Module</title>
-
- <section id="dbg.overview">
- <title>Overview</title>
- <para>
- This is a module used for debugging. It should contain only test and
- debugging related functions. For example it contains functions to
- simulate delays and to dump core.
- </para>
- <para>
- This modules <emphasis>should not be used</emphasis> in production.
- </para>
- </section>
-
- <xi:include href="params.xml"/>
- <xi:include href="functions.xml"/>
-
-</section>
-
diff --git a/modules_s/dbg/doc/functions.xml b/modules_s/dbg/doc/functions.xml
deleted file mode 100644
index 99bd7f0..0000000
--- a/modules_s/dbg/doc/functions.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<section id="dbg.functions"
xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
- <revhistory>
- <revision>
- <revnumber>$Revision$</revnumber>
- <date>$Date$</date>
- </revision>
- </revhistory>
- </sectioninfo>
-
- <title>Functions</title>
-
- <section id="dbg.dbg_msleep">
- <title>
- <function>dbg_msleep(ms)</function>
- </title>
- <para>
- Causes a <varname>ms</varname> milliseconds delay in processing for the
- executing process.
- </para>
- <para>
- This function can be used to simulate delays.
- </para>
- <para>Meaning of the parameters is as follows:</para>
- <itemizedlist>
- <listitem>
- <para><emphasis>ms</emphasis> - delay in milliseconds.
- </para>
- </listitem>
- </itemizedlist>
- <example>
- <title><function>dbg_msleep</function> usage</title>
- <programlisting>
-...
-dbg_msleep(1000); # 1 second delay
-...
- </programlisting>
- </example>
- </section>
-
- <section id="dbg.abort">
- <title>
- <function>dbg_abort()</function>
- </title>
- <para>
- Forces a core dump (see abort(3)).
- </para>
- <example>
- <title><function>dbg_abort</function> usage</title>
- <programlisting>
-...
-dbg_abort();
-...
- </programlisting>
- </example>
- </section>
-
- <section id="dbg.pkg_status">
- <title>
- <function>dbg_pkg_status()</function>
- </title>
- <para>
- Dumps the local memory malloc fragment list into the log.
- </para>
- <example>
- <title><function>dbg_pkg_status</function> usage</title>
- <programlisting>
-...
-dbg_pkg_status();
-...
- </programlisting>
- </example>
- </section>
-
- <section id="dbg.shm_status">
- <title>
- <function>dbg_shm_status()</function>
- </title>
- <para>
- Dumps the shared memory malloc fragment list into the log.
- </para>
- <example>
- <title><function>dbg_shm_status</function> usage</title>
- <programlisting>
-...
-dbg_shm_status();
-...
- </programlisting>
- </example>
- </section>
-
-
-</section>
diff --git a/modules_s/dbg/doc/params.xml b/modules_s/dbg/doc/params.xml
deleted file mode 100644
index 97f2d3b..0000000
--- a/modules_s/dbg/doc/params.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<section id="dbg.parameters"
xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
- <revhistory>
- <revision>
- <revnumber>$Revision$</revnumber>
- <date>$Date$</date>
- </revision>
- </revhistory>
- </sectioninfo>
-
- <title>Parameters</title>
-
-</section>