Browse Source

added another type cast to socket handling

pull/783/head
Logan oos Even 3 years ago
committed by GitHub
parent
commit
8eb13165d4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/n2n.c

2
src/n2n.c

@ -34,7 +34,7 @@ SOCKET open_socket (int local_port, in_addr_t address, int type /* 0 = UDP, TCP
struct sockaddr_in local_address; struct sockaddr_in local_address;
int sockopt; int sockopt;
if((sock_fd = socket(PF_INET, ((type == 0) ? SOCK_DGRAM : SOCK_STREAM) , 0)) < 0) { if((int)(sock_fd = socket(PF_INET, ((type == 0) ? SOCK_DGRAM : SOCK_STREAM) , 0)) < 0) {
traceEvent(TRACE_ERROR, "Unable to create socket [%s][%d]\n", traceEvent(TRACE_ERROR, "Unable to create socket [%s][%d]\n",
strerror(errno), sock_fd); strerror(errno), sock_fd);
return(-1); return(-1);

Loading…
Cancel
Save