diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-13 20:29:51 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-13 20:29:51 +0800 |
commit | a3716fcd0d71c8b42a3024bae903e42531bc0ebe (patch) | |
tree | ef76583314a7743f345b3074f5e0ffb03c10078b | |
parent | d03347e40ff8091499ba039f101afacfecdfbeeb (diff) | |
download | pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.tar pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.tar.gz pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.tar.bz2 pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.tar.lz pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.tar.xz pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.tar.zst pttbbs-a3716fcd0d71c8b42a3024bae903e42531bc0ebe.zip |
* disable beep for unknown keys (because some stupid clients are doing anti-idle and confuse user)
* add '-d' to sync syntax to mbbsd command
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4590 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | daemon/logind/logind.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c index 9f090b81..5c8a9b9a 100644 --- a/daemon/logind/logind.c +++ b/daemon/logind/logind.c @@ -1075,7 +1075,9 @@ client_cb(int fd, short event, void *arg) if (c == KEY_UNKNOWN) { - _mt_bell(conn); + // XXX for stupid clients always doing anti-idle, + // user will get beeps and have no idea what happened... + // _mt_bell(conn); continue; } @@ -1375,7 +1377,7 @@ main(int argc, char *argv[]) Signal(SIGPIPE, SIG_IGN); stderr = stderr; - while ( (ch = getopt(argc, argv, "f:p:t:l:hDv")) != -1 ) + while ( (ch = getopt(argc, argv, "f:p:t:l:hdDv")) != -1 ) { switch( ch ){ case 'f': @@ -1390,6 +1392,9 @@ main(int argc, char *argv[]) case 't': strlcpy(tunnel_path, optarg, sizeof(tunnel_path)); break; + case 'd': + as_daemon = 1; + break; case 'D': as_daemon = 0; break; @@ -1399,9 +1404,10 @@ main(int argc, char *argv[]) case 'h': default: fprintf(stderr, - "usage: %s [-vD] [-l log_file] [-f conf] [-p port] [-t tunnel] [-c client_command]\r\n", argv[0]); + "usage: %s [-vdD] [-l log_file] [-f conf] [-p port] [-t tunnel] [-c client_command]\r\n", argv[0]); fprintf(stderr, "\t-v: provide verbose messages\r\n" + "\t-d: enter daemon mode\r\n" "\t-D: do not enter daemon mode\r\n" "\t-f: read configuration from file (default: %s)\r\n", BBSHOME "/" FN_CONF_BINDPORTS); |