Default port for ping tool

This commit is contained in:
def 2014-11-24 22:37:13 +01:00
parent e8cf3fbec0
commit bde77f09c1

View file

@ -16,7 +16,7 @@ int main(int argc, char **argv) // ignore_convention
if(argc != 2)
{
fprintf(stderr, "usage: %s server:port\n", argv[0]);
fprintf(stderr, "usage: %s server[:port] (default port: 8303)\n", argv[0]);
return 1;
}
@ -27,6 +27,9 @@ int main(int argc, char **argv) // ignore_convention
return 1;
}
if(Addr.port == 0)
Addr.port = 8303;
unsigned char Buffer[sizeof(SERVERBROWSE_GETINFO)+1];
CNetChunk Packet;