summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2003-01-05 23:09:01 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2003-01-05 23:09:01 +0000
commitb17d099db43b2d52876c05fcec6f7d3773d3e56e (patch)
tree7c9eddcabf722e69c3cc64d03761ba0d2acc1b7e /ffserver.c
parent3178ee4cc468aa9cd7c86b1941bf19efa82e9052 (diff)
Improve bind failure message to indicate the port that failed
Originally committed as revision 1399 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index f6e3be5eb8..974fbefd12 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -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;
}