Module: kamailio
Branch: master
Commit: 93df5a5241f57ffb71dad0b0df04a256b7b0b7b4
URL:
https://github.com/kamailio/kamailio/commit/93df5a5241f57ffb71dad0b0df04a25…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-03-24T09:06:25+01:00
core: events - rename SREV_NET_DATA_SEND to SREV_NET_DATA_SENT
- reflects better the purpose, being executed after the message is sent
---
Modified: src/core/events.c
Modified: src/core/events.h
Modified: src/core/forward.h
---
Diff:
https://github.com/kamailio/kamailio/commit/93df5a5241f57ffb71dad0b0df04a25…
Patch:
https://github.com/kamailio/kamailio/commit/93df5a5241f57ffb71dad0b0df04a25…
---
diff --git a/src/core/events.c b/src/core/events.c
index 69a496df31..20d6d57ecf 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -175,9 +175,9 @@ int sr_event_register_cb(int type, sr_event_cb_f f)
_sr_events_list.net_data_recv = f;
else return -1;
break;
- case SREV_NET_DATA_SEND:
- if(_sr_events_list.net_data_send==0)
- _sr_events_list.net_data_send = f;
+ case SREV_NET_DATA_SENT:
+ if(_sr_events_list.net_data_sent==0)
+ _sr_events_list.net_data_sent = f;
else return -1;
break;
case SREV_SIP_REPLY_OUT:
@@ -329,10 +329,10 @@ int sr_event_exec(int type, sr_event_param_t *evp)
ret = _sr_events_list.net_data_recv(evp);
return ret;
} else return 1;
- case SREV_NET_DATA_SEND:
- if(unlikely(_sr_events_list.net_data_send!=0))
+ case SREV_NET_DATA_SENT:
+ if(unlikely(_sr_events_list.net_data_sent!=0))
{
- ret = _sr_events_list.net_data_send(evp);
+ ret = _sr_events_list.net_data_sent(evp);
return ret;
} else return 1;
case SREV_SIP_REPLY_OUT:
@@ -394,8 +394,8 @@ int sr_event_enabled(int type)
return (_sr_events_list.tcp_closed!=0)?1:0;
case SREV_NET_DATA_RECV:
return (_sr_events_list.net_data_recv!=0)?1:0;
- case SREV_NET_DATA_SEND:
- return (_sr_events_list.net_data_send!=0)?1:0;
+ case SREV_NET_DATA_SENT:
+ return (_sr_events_list.net_data_sent!=0)?1:0;
case SREV_SIP_REPLY_OUT:
return (_sr_events_list.sip_reply_out[0]!=0)?1:0;
case SREV_TCP_WS_CLOSE:
diff --git a/src/core/events.h b/src/core/events.h
index 4d53067dba..e2abc45efb 100644
--- a/src/core/events.h
+++ b/src/core/events.h
@@ -36,7 +36,7 @@
#define SREV_STUN_IN 12
#define SREV_TCP_CLOSED 13
#define SREV_NET_DATA_RECV 14
-#define SREV_NET_DATA_SEND 15
+#define SREV_NET_DATA_SENT 15
#define SREV_SIP_REPLY_OUT 16
#define SREV_TCP_WS_CLOSE 17
@@ -70,7 +70,7 @@ typedef struct sr_event_cb {
sr_event_cb_f rcv_nosip;
sr_event_cb_f tcp_closed;
sr_event_cb_f net_data_recv;
- sr_event_cb_f net_data_send;
+ sr_event_cb_f net_data_sent;
sr_event_cb_f sip_reply_out[SREV_CB_LIST_SIZE];
sr_event_cb_f tcp_ws_close[SREV_CB_LIST_SIZE];
} sr_event_cb_t;
diff --git a/src/core/forward.h b/src/core/forward.h
index 1a30a06c97..e4bf61445f 100644
--- a/src/core/forward.h
+++ b/src/core/forward.h
@@ -331,7 +331,7 @@ static inline int msg_send_buffer(struct dest_info* dst, char* buf,
int len,
netinfo.data.len = outb.len;
netinfo.dst = dst;
evp.data = (void*)&netinfo;
- sr_event_exec(SREV_NET_DATA_SEND, &evp);
+ sr_event_exec(SREV_NET_DATA_SENT, &evp);
}
if(outb.s != buf)