|
@@ -13,8 +13,8 @@
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
* 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
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
MODULE_VERSION
|
|
MODULE_VERSION
|
|
|
|
|
|
-static int nosip_rcv_msg(void* data);
|
|
|
|
|
|
+static int nosip_rcv_msg(sr_event_param_t *evp);
|
|
static int mod_init(void);
|
|
static int mod_init(void);
|
|
|
|
|
|
static int pv_get_nosip(struct sip_msg *msg, pv_param_t *param,
|
|
static int pv_get_nosip(struct sip_msg *msg, pv_param_t *param,
|
|
@@ -86,13 +86,13 @@ struct module_exports exports= {
|
|
0 /* per-child init function */
|
|
0 /* per-child init function */
|
|
};
|
|
};
|
|
|
|
|
|
-/**
|
|
|
|
- *
|
|
|
|
|
|
+/**
|
|
|
|
+ *
|
|
*/
|
|
*/
|
|
static int mod_init(void)
|
|
static int mod_init(void)
|
|
{
|
|
{
|
|
int route_no;
|
|
int route_no;
|
|
-
|
|
|
|
|
|
+
|
|
route_no=route_get(&event_rt, "nosip:msg");
|
|
route_no=route_get(&event_rt, "nosip:msg");
|
|
if (route_no==-1)
|
|
if (route_no==-1)
|
|
{
|
|
{
|
|
@@ -105,7 +105,7 @@ static int mod_init(void)
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
nosip_route_no=route_no;
|
|
nosip_route_no=route_no;
|
|
-
|
|
|
|
|
|
+
|
|
/* register non-sip hooks */
|
|
/* register non-sip hooks */
|
|
sr_event_register_cb(SREV_RCV_NOSIP, nosip_rcv_msg);
|
|
sr_event_register_cb(SREV_RCV_NOSIP, nosip_rcv_msg);
|
|
|
|
|
|
@@ -128,8 +128,8 @@ static int mod_init(void)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- *
|
|
|
|
|
|
+/**
|
|
|
|
+ *
|
|
*/
|
|
*/
|
|
static int pv_get_nosip(sip_msg_t *msg, pv_param_t *param,
|
|
static int pv_get_nosip(sip_msg_t *msg, pv_param_t *param,
|
|
pv_value_t *res)
|
|
pv_value_t *res)
|
|
@@ -143,17 +143,17 @@ static int pv_get_nosip(sip_msg_t *msg, pv_param_t *param,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-/**
|
|
|
|
- *
|
|
|
|
|
|
+/**
|
|
|
|
+ *
|
|
*/
|
|
*/
|
|
-static int nosip_rcv_msg(void *data)
|
|
|
|
|
|
+static int nosip_rcv_msg(sr_event_param_t *evp)
|
|
{
|
|
{
|
|
sip_msg_t* msg;
|
|
sip_msg_t* msg;
|
|
regmatch_t pmatch;
|
|
regmatch_t pmatch;
|
|
char c;
|
|
char c;
|
|
struct run_act_ctx ra_ctx;
|
|
struct run_act_ctx ra_ctx;
|
|
|
|
|
|
- msg = (sip_msg_t*)data;
|
|
|
|
|
|
+ msg = (sip_msg_t*)evp->data;
|
|
|
|
|
|
if(nosip_msg_skip!=NULL || nosip_msg_match!=NULL)
|
|
if(nosip_msg_skip!=NULL || nosip_msg_match!=NULL)
|
|
{
|
|
{
|