Selaa lähdekoodia

corex: updates for core events API changes

Daniel-Constantin Mierla 8 vuotta sitten
vanhempi
commit
c8807c08a5
2 muutettua tiedostoa jossa 8 lisäystä ja 10 poistoa
  1. 6 8
      src/modules/corex/corex_nio.c
  2. 2 2
      src/modules/corex/corex_nio.h

+ 6 - 8
src/modules/corex/corex_nio.c

@@ -1,6 +1,4 @@
 /**
- * $Id$
- *
  * Copyright (C) 2009 SIP-Router.org
  *
  * This file is part of Extensible SIP Router, a free SIP server.
@@ -43,14 +41,14 @@ int nio_intercept_init(void)
 	}
 
 	nio_route_no=route_no;
-	
+
 	if (nio_min_msg_len < 0)
 	{
 		LM_WARN("min_msg_len is less then zero, setting it to zero");
 		nio_min_msg_len = 0;
 	}
 
-	if (nio_msg_avp_param.s && nio_msg_avp_param.len > 0) 
+	if (nio_msg_avp_param.s && nio_msg_avp_param.len > 0)
 	{
 		if (pv_parse_spec(&nio_msg_avp_param, &avp_spec)==0
 				|| avp_spec.type!=PVT_AVP)
@@ -83,7 +81,7 @@ int nio_intercept_init(void)
 /**
  *
  */
-int nio_msg_received(void *data)
+int nio_msg_received(sr_event_param_t *evp)
 {
     sip_msg_t msg;
     str *obuf;
@@ -92,7 +90,7 @@ int nio_msg_received(void *data)
     struct usr_avp *avp;
     struct run_act_ctx ra_ctx;
 
-    obuf = (str*)data;
+    obuf = (str*)evp->data;
 
     if (obuf->len < nio_min_msg_len) {
         return -1;
@@ -136,7 +134,7 @@ int nio_msg_received(void *data)
 /**
  *
  */
-int nio_msg_sent(void *data)
+int nio_msg_sent(sr_event_param_t *evp)
 {
     sip_msg_t msg;
     str *obuf;
@@ -144,7 +142,7 @@ int nio_msg_sent(void *data)
     struct usr_avp *avp;
     struct run_act_ctx ra_ctx;
 
-    obuf = (str*)data;
+    obuf = (str*)evp->data;
 
     if (obuf->len < nio_min_msg_len) {
         return -1;

+ 2 - 2
src/modules/corex/corex_nio.h

@@ -42,8 +42,8 @@ str nio_msg_avp_param;
 int_str nio_msg_avp_name;
 unsigned short nio_msg_avp_type;
 
-int nio_msg_received(void *data);
-int nio_msg_sent(void *data);
+int nio_msg_received(sr_event_param_t *evp);
+int nio_msg_sent(sr_event_param_t *evp);
 
 int nio_check_incoming(void);
 char* nio_msg_update(sip_msg_t *msg, unsigned int *olen);