diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-05-26 00:28:13 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-05-26 00:28:13 +0800 |
commit | b0dc83e616ebe03a879183e0840d502f207e90cb (patch) | |
tree | 1dfec4cf449e95893b133a80b0de1949881c3338 /util/bbsrf.c | |
parent | 715aec67ce259145e9b0d0b67ebafe2980922ae1 (diff) | |
download | pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.tar pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.tar.gz pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.tar.bz2 pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.tar.lz pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.tar.xz pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.tar.zst pttbbs-b0dc83e616ebe03a879183e0840d502f207e90cb.zip |
- mbbsd use getopt() to parse command line options
- many mbbsd code revises and clean up
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4483 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/bbsrf.c')
-rw-r--r-- | util/bbsrf.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/util/bbsrf.c b/util/bbsrf.c index 04213caa..fdec15d8 100644 --- a/util/bbsrf.c +++ b/util/bbsrf.c @@ -53,7 +53,7 @@ static int showbanfile(const char *filename) int main(void) { int uid; - char *tty, remote_ip[MAX_REMOTE_IP_LEN + 1]; + char remote_ip[MAX_REMOTE_IP_LEN + 1]; openlog("bbsrf", LOG_PID | LOG_PERROR, LOG_USER); chdir(BBSHOME); @@ -75,11 +75,7 @@ int main(void) get_remote_ip(sizeof(remote_ip), remote_ip); - tty = ttyname(0); - if (tty == NULL) - tty = "notty"; - - execl(BBSPROG, "mbbsd", remote_ip, tty, NULL); + execl(BBSPROG, "mbbsd", "-D", "-h", remote_ip, NULL); syslog(LOG_ERR, "execl(): %m"); sleep(3); // prevent flooding |