Browse Source

Revert previous commit

git-svn-id: https://bucket.mit.edu/svn/nilm/acquisition/ethstream@10233 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/ethstream-1.3
jim 11 years ago
parent
commit
76143e7eb4
2 changed files with 4 additions and 0 deletions
  1. +1
    -0
      nerdjack.c
  2. +3
    -0
      ue9.c

+ 1
- 0
nerdjack.c View File

@@ -97,6 +97,7 @@ static int discovered_sock_create(struct discover_t *ds, uint32_t local_ip,
/* Set nonblocking */
if (soblock(sock, 0) < 0) {
verb("can't set nonblocking\n");
close(sock);
return 0;
}



+ 3
- 0
ue9.c View File

@@ -402,6 +402,7 @@ int ue9_open(const char *host, int port)
/* Set nonblocking */
if (soblock(fd, 0) < 0) {
verb("can't set nonblocking\n");
close(fd);
return -1;
}

@@ -417,6 +418,7 @@ int ue9_open(const char *host, int port)
he = gethostbyname(host);
if (he == NULL) {
verb("gethostbyname(\"%s\") failed\n", host);
close(fd);
return -1;
}
address.sin_addr = *((struct in_addr *)he->h_addr);
@@ -429,6 +431,7 @@ int ue9_open(const char *host, int port)
.tv_sec = TIMEOUT}) < 0) {
verb("connection to %s:%d failed: %s\n",
inet_ntoa(address.sin_addr), port, compat_strerror(errno));
close(fd);
return -1;
}


Loading…
Cancel
Save