Skip to content

Commit

Permalink
Connect fix v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kuliga committed Jan 2, 2021
1 parent 8c71cbc commit b512c2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int main(int argc, char *argv[])
goto exit;
}

if (connect(fd[SERV], (struct sockaddr*) &addr[SERV_], sizeof(struct sockaddr)) < 0) {
if (connect(fd[SERV], (struct sockaddr*) &addr[SERV_], sizeof(addr[SERV_])) < 0) {
fprintf(stderr, "Critical failure during connect.\n");
goto exit;
}
Expand Down Expand Up @@ -291,7 +291,7 @@ void *peer_thread(char *addr)

printf("Sending invite\n");

if (connect(fd[PEER], (struct sockaddr*) &peer_addr, sizeof(struct sockaddr)) < 0) {
if (connect(fd[PEER], (struct sockaddr*) &peer_addr, sizeof(peer_addr)) < 0) {
fprintf(stderr, "Critical failure during connect.\n");
exit(1);
}
Expand Down

0 comments on commit b512c2f

Please sign in to comment.