summaryrefslogtreecommitdiffstats
path: root/sesman/libscp
diff options
context:
space:
mode:
Diffstat (limited to 'sesman/libscp')
-rw-r--r--sesman/libscp/libscp_tcp.c14
1 files changed, 1 insertions, 13 deletions
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 <netinet/in.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <stdlib.h>
-#include <string.h>
-
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);
}