Browse Source

tcpops: updates for core events API changes

Daniel-Constantin Mierla 8 years ago
parent
commit
9e2f8ac337
2 changed files with 8 additions and 6 deletions
  1. 4 2
      src/modules/tcpops/tcpops.c
  2. 4 4
      src/modules/tcpops/tcpops.h

+ 4 - 2
src/modules/tcpops/tcpops.c

@@ -34,6 +34,8 @@
 #include "../../core/fmsg.h"
 #include "../../core/sr_module.h"
 
+#include "tcpops.h"
+
 
 /* globally enabled by default */
 int tcp_closed_event = 1;
@@ -219,9 +221,9 @@ static void tcpops_tcp_closed_run_route(tcp_closed_event_info_t *tev)
 	set_route_type(backup_rt);
 }
 
-int tcpops_handle_tcp_closed(void *data)
+int tcpops_handle_tcp_closed(sr_event_param_t *evp)
 {
-	tcp_closed_event_info_t *tev = (tcp_closed_event_info_t *) data;
+	tcp_closed_event_info_t *tev = (tcp_closed_event_info_t *)evp->data;
 
 	if (tev == NULL || tev->con == NULL) {
 		LM_WARN("received bad TCP closed event\n");

+ 4 - 4
src/modules/tcpops/tcpops.h

@@ -21,8 +21,8 @@
  *
  */
 
-#ifndef TCP_KEEPALIVE_H_
-#define TCP_KEEPALIVE_H_
+#ifndef _TCPOPS_H_
+#define _TCPOPS_H_
 
 #include "../../core/tcp_conn.h"
 #include "../../core/events.h"
@@ -35,6 +35,6 @@ int tcpops_acquire_fd_from_tcpmain(int conid, int *fd);
 int tcpops_keepalive_enable(int fd, int idle, int count, int interval, int closefd);
 int tcpops_keepalive_disable(int fd, int closefd);
 int tcpops_set_connection_lifetime(struct tcp_connection* con, int time);
-int tcpops_handle_tcp_closed(void *data);
+int tcpops_handle_tcp_closed(sr_event_param_t *evp);
 
-#endif /* TCP_KEEPALIVE_H_ */
+#endif /* _TCPOPS_H_ */