Commit da83118c authored by philipjsg's avatar philipjsg

Improve bind failure message to indicate the port that failed


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1399 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8eafda0c
......@@ -429,7 +429,9 @@ static int socket_open_listen(struct sockaddr_in *my_addr)
setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) {
perror ("bind");
char bindmsg[32];
snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port));
perror (bindmsg);
close(server_fd);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment