Skip to content
Snippets Groups Projects
Commit 4ee93e52 authored by Travis Glenn Hansen's avatar Travis Glenn Hansen
Browse files

removing usage of peer info

allowing ports > 4 chars
parent 6f4f5eb2
No related branches found
No related tags found
No related merge requests found
...@@ -319,7 +319,7 @@ xit\n"); ...@@ -319,7 +319,7 @@ xit\n");
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
char buf[5]; char buf[6];
snprintf(buf, sizeof buf, "%d", portno); snprintf(buf, sizeof buf, "%d", portno);
e = getaddrinfo (NULL, buf, &hints, &ai); e = getaddrinfo (NULL, buf, &hints, &ai);
...@@ -569,9 +569,10 @@ resetting counter\n"); ...@@ -569,9 +569,10 @@ resetting counter\n");
max_client_count = current_count; max_client_count = current_count;
} }
char *peer = getsocketpeername (client_i->fd); //char *peer = getsocketpeername (client_i->fd);
fanout_debug (2, "client socket %d connected from %s\n", //fanout_debug (2, "client socket %d connected from %s\n",
client_i->fd, peer); fanout_debug (2, "client socket %d connected\n",
client_i->fd);
client_write (client_i, "debug!connected...\n"); client_write (client_i, "debug!connected...\n");
subscribe (client_i, "all"); subscribe (client_i, "all");
...@@ -853,9 +854,10 @@ struct client *get_client (int fd) ...@@ -853,9 +854,10 @@ struct client *get_client (int fd)
void remove_client (struct client *c) void remove_client (struct client *c)
{ {
char *peer = getsocketpeername (c->fd); //char *peer = getsocketpeername (c->fd);
fanout_debug (3, "removing client %d connected from %s from service\n", //fanout_debug (3, "removing client %d connected from %s from service\n",
c->fd, peer); fanout_debug (3, "removing client %d connected from service\n",
c->fd);
if (c->next != NULL) { if (c->next != NULL) {
c->next->previous = c->previous; c->next->previous = c->previous;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment