summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-03 14:59:37 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-03 14:59:37 +0800
commitc8e482734eccf9567c8ca19edd126ab3d9d6404c (patch)
treeb9fc8c7535359bf0e059fa46d88c9d93b994e9ee
parentad4a83d2da5c14c4d38f3f2b3c091efedac1dbed (diff)
downloadpttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.tar
pttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.tar.gz
pttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.tar.bz2
pttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.tar.lz
pttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.tar.xz
pttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.tar.zst
pttbbs-c8e482734eccf9567c8ca19edd126ab3d9d6404c.zip
fix bugs in revision 2570
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2572 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/stuff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 49797a9d..1bcfb60a 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -970,9 +970,10 @@ int tobind(char * host, int port)
servaddr.sin_family = AF_INET;
if (!host || host[0] == NULL)
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
- else if (inet_aton(host, &servaddr.sin_addr) == 0)
+ else if (inet_aton(host, &servaddr.sin_addr) == 0) {
perror("inet_aton()");
exit(1);
+ }
servaddr.sin_port = htons(port);
if( bind(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0 ) {
perror("bind()");