diff --git a/sesman/libscp/libscp_tcp.c b/sesman/libscp/libscp_tcp.c index 29870563..30e8006c 100644 --- a/sesman/libscp/libscp_tcp.c +++ b/sesman/libscp/libscp_tcp.c @@ -26,12 +26,6 @@ #include "libscp_tcp.h" -#include -#include -#include -#include -#include - extern struct log_config *s_log; /*****************************************************************************/ @@ -124,11 +118,5 @@ scp_tcp_force_send(int sck, char *data, int len) int DEFAULT_CC scp_tcp_bind(int sck, char *addr, char *port) { - struct sockaddr_in s; - - memset(&s, 0, sizeof(struct sockaddr_in)); - s.sin_family = AF_INET; - s.sin_port = htons(atoi(port)); - s.sin_addr.s_addr = inet_addr(addr); - return bind(sck, (struct sockaddr *)&s, sizeof(struct sockaddr_in)); + return g_tcp_bind_address(sck, port, addr); }