diff options
author | iphydf <iphydf@users.noreply.github.com> | 2017-06-04 12:59:34 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2017-06-04 17:48:23 +0000 |
commit | 1e8fa85aadf602bdca3a540de09a8184f7139a6c (patch) | |
tree | 4caab80957f7f9a2098fb97e776be763defc44ab /toxcore/TCP_connection.c | |
parent | 03f99bde2ecee3722d47a5b6a1031fc88e7210b7 (diff) |
Add a monolith_test that includes all toxcore sources.
This requires that every symbol, even if static (file-scope), is unique.
The idea is that we can easily run "whole" program static analysis on
programs that include monolith.h ("whole" is in quotes, as we don't
include dependencies like libsodium in this static analysis).
Diffstat (limited to 'toxcore/TCP_connection.c')
-rw-r--r-- | toxcore/TCP_connection.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/TCP_connection.c b/toxcore/TCP_connection.c index 18c1e76e..b9c75afe 100644 --- a/toxcore/TCP_connection.c +++ b/toxcore/TCP_connection.c | |||
@@ -973,8 +973,8 @@ static int tcp_status_callback(void *object, uint32_t number, uint8_t connection | |||
973 | return 0; | 973 | return 0; |
974 | } | 974 | } |
975 | 975 | ||
976 | static int tcp_data_callback(void *object, uint32_t number, uint8_t connection_id, const uint8_t *data, uint16_t length, | 976 | static int tcp_conn_data_callback(void *object, uint32_t number, uint8_t connection_id, const uint8_t *data, |
977 | void *userdata) | 977 | uint16_t length, void *userdata) |
978 | { | 978 | { |
979 | if (length == 0) { | 979 | if (length == 0) { |
980 | return -1; | 980 | return -1; |
@@ -1003,8 +1003,8 @@ static int tcp_data_callback(void *object, uint32_t number, uint8_t connection_i | |||
1003 | return 0; | 1003 | return 0; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | static int tcp_oob_callback(void *object, const uint8_t *public_key, const uint8_t *data, uint16_t length, | 1006 | static int tcp_conn_oob_callback(void *object, const uint8_t *public_key, const uint8_t *data, uint16_t length, |
1007 | void *userdata) | 1007 | void *userdata) |
1008 | { | 1008 | { |
1009 | if (length == 0) { | 1009 | if (length == 0) { |
1010 | return -1; | 1010 | return -1; |
@@ -1026,7 +1026,7 @@ static int tcp_oob_callback(void *object, const uint8_t *public_key, const uint8 | |||
1026 | TCP_Connection_to *con_to = get_connection(tcp_c, connections_number); | 1026 | TCP_Connection_to *con_to = get_connection(tcp_c, connections_number); |
1027 | 1027 | ||
1028 | if (con_to && tcp_connection_in_conn(con_to, tcp_connections_number)) { | 1028 | if (con_to && tcp_connection_in_conn(con_to, tcp_connections_number)) { |
1029 | return tcp_data_callback(object, connections_number, 0, data, length, userdata); | 1029 | return tcp_conn_data_callback(object, connections_number, 0, data, length, userdata); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | if (tcp_c->tcp_oob_callback) { | 1032 | if (tcp_c->tcp_oob_callback) { |
@@ -1067,8 +1067,8 @@ static int tcp_relay_set_callbacks(TCP_Connections *tcp_c, int tcp_connections_n | |||
1067 | onion_response_handler(con, &tcp_onion_callback, tcp_c); | 1067 | onion_response_handler(con, &tcp_onion_callback, tcp_c); |
1068 | routing_response_handler(con, &tcp_response_callback, con); | 1068 | routing_response_handler(con, &tcp_response_callback, con); |
1069 | routing_status_handler(con, &tcp_status_callback, con); | 1069 | routing_status_handler(con, &tcp_status_callback, con); |
1070 | routing_data_handler(con, &tcp_data_callback, con); | 1070 | routing_data_handler(con, &tcp_conn_data_callback, con); |
1071 | oob_data_handler(con, &tcp_oob_callback, con); | 1071 | oob_data_handler(con, &tcp_conn_oob_callback, con); |
1072 | 1072 | ||
1073 | return 0; | 1073 | return 0; |
1074 | } | 1074 | } |