diff options
author | GDR! <gdr@gdr.name> | 2020-04-21 20:00:37 +0200 |
---|---|---|
committer | GDR! <gdr@gdr.name> | 2020-04-21 20:00:37 +0200 |
commit | 3d2f21ac28057f19bf367b7732039102e846b16f (patch) | |
tree | bb75edaa5a8caa6529276ac18c7dcd05d742a2d6 /client.c | |
parent | 537575ce348921b569d9e45542681278ed5d97be (diff) |
Fix wrong return type of functions
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -225,6 +225,17 @@ int handle_server_tcp_frame(protocol_frame *rcvd_frame) | |||
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
227 | 227 | ||
228 | /* Delete tunnel and clear client-side fdset */ | ||
229 | void client_close_tunnel(tunnel *tun) | ||
230 | { | ||
231 | if(tun->sockfd) | ||
232 | { | ||
233 | FD_CLR(tun->sockfd, &client_master_fdset); | ||
234 | } | ||
235 | |||
236 | tunnel_delete(tun); | ||
237 | } | ||
238 | |||
228 | /* Handle close-tunnel frame recived from the server */ | 239 | /* Handle close-tunnel frame recived from the server */ |
229 | int handle_server_tcp_fin_frame(protocol_frame *rcvd_frame) | 240 | int handle_server_tcp_fin_frame(protocol_frame *rcvd_frame) |
230 | { | 241 | { |
@@ -250,19 +261,8 @@ int handle_server_tcp_fin_frame(protocol_frame *rcvd_frame) | |||
250 | return 0; | 261 | return 0; |
251 | } | 262 | } |
252 | 263 | ||
253 | /* Delete tunnel and clear client-side fdset */ | ||
254 | int client_close_tunnel(tunnel *tun) | ||
255 | { | ||
256 | if(tun->sockfd) | ||
257 | { | ||
258 | FD_CLR(tun->sockfd, &client_master_fdset); | ||
259 | } | ||
260 | |||
261 | tunnel_delete(tun); | ||
262 | } | ||
263 | |||
264 | /* Close and delete all tunnels (when server went offline) */ | 264 | /* Close and delete all tunnels (when server went offline) */ |
265 | int client_close_all_connections() | 265 | void client_close_all_connections() |
266 | { | 266 | { |
267 | tunnel *tmp = NULL; | 267 | tunnel *tmp = NULL; |
268 | tunnel *tun = NULL; | 268 | tunnel *tun = NULL; |