improve error message when we can't listen on port

This commit is contained in:
Radim Kolar 2020-04-29 08:06:26 +02:00
parent cd0d7cd132
commit b880c7af2f
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
Version NEXT Version NEXT
display port number if we can't listen on it
Version 2.8.1b29 - 24 Aug 2019 Version 2.8.1b29 - 24 Aug 2019
added scons command line argument without-fspscan=yes for building added scons command line argument without-fspscan=yes for building

View File

@ -243,7 +243,9 @@ int main (int argc, char ** argv)
{ {
opt=_x_udp(listen_on,&udp_port); opt=_x_udp(listen_on,&udp_port);
if(opt == -1) { if(opt == -1) {
perror("Error: socket open"); fprintf(stderr,"can't listen on port %d: ",udp_port);
fflush(stderr);
perror("");
exit(2); exit(2);
} }
if(dbug) { if(dbug) {