Browse files

Oops

  • Loading branch information...
1 parent 9b31fdf commit 6679b2c42ab53e542d84150522a871f791c80a63 @solson committed Apr 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/bot.c
View
4 src/bot.c
@@ -48,13 +48,13 @@ void bot_connect(bot *b) {
struct addrinfo *p;
for(p = res; p != NULL; p = p->ai_next) {
- b->sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ b->sock = socket(p->ai_family, p->ai_socktype, p->ai_protocol);
if(b->sock == -1) {
perror("error opening socket");
continue;
}
- status = connect(b->sock, res->ai_addr, res->ai_addrlen);
+ status = connect(b->sock, p->ai_addr, p->ai_addrlen);
if(status == -1) {
perror("error connecting");
continue;

0 comments on commit 6679b2c

Please sign in to comment.