diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-10 12:17:08 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-10 12:17:08 +0800 |
commit | 7c766bf44d652f4f4ffad199c3fc556f82195d1f (patch) | |
tree | af59791178a0c95d604038051fd24e8572adaeea /daemon/fromd/fromd.c | |
parent | 883bf638558fbc87bacccbf5ee2b065382337b4f (diff) | |
download | pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.gz pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.bz2 pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.lz pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.xz pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.zst pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.zip |
Change tobind/toconnect interface.
**OUTTACACHE is now UTMPD**
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4121 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'daemon/fromd/fromd.c')
-rw-r--r-- | daemon/fromd/fromd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/daemon/fromd/fromd.c b/daemon/fromd/fromd.c index 5e080f7c..de1ad44c 100644 --- a/daemon/fromd/fromd.c +++ b/daemon/fromd/fromd.c @@ -76,26 +76,23 @@ void daemonize() int main(int argc, char *argv[]) { - int ch, port = 5130, sfd; - char *iface_ip = NULL; + int ch, sfd; + char *iface_ip = ":5130"; Signal(SIGPIPE, SIG_IGN); - while ( (ch = getopt(argc, argv, "p:i:h")) != -1 ) + while ( (ch = getopt(argc, argv, "i:h")) != -1 ) switch( ch ){ - case 'p': - port = atoi(optarg); - break; case 'i': iface_ip = optarg; break; case 'h': default: - fprintf(stderr, "usage: %s [-i interface_ip] [-p port]\n", argv[0]); + fprintf(stderr, "usage: %s [-i [interface_ip]:port]\n", argv[0]); return 1; } - if ( (sfd = tobind(iface_ip, port)) < 0 ) + if ( (sfd = tobind(iface_ip)) < 0 ) return 1; daemonize(); |