diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-05-24 13:49:50 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-05-24 13:49:50 +0800 |
commit | d365e7cace5e16046b3c5ca876d02e33c97014d2 (patch) | |
tree | 63698cb5801f801ebc2003c43fe028402a5365b6 | |
parent | 4be09ad0c2da18d07459b7067e40c5f7f61f9aca (diff) | |
download | pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.tar pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.tar.gz pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.tar.bz2 pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.tar.lz pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.tar.xz pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.tar.zst pttbbs-d365e7cace5e16046b3c5ca876d02e33c97014d2.zip |
add reloadbcache
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2016 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | util/shmctl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/util/shmctl.c b/util/shmctl.c index 82778162..54757795 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -23,7 +23,7 @@ int logout_friend_online(userinfo_t *utmp) if(ui->pid && ui!=utmp){ for(k=0; k<ui->friendtotal && (int)(ui->friend_online[k] & 0xFFFFFF) !=offset; k++); - if(k<ui->friendtotal){ + if( k < ui->friendtotal && k < MAX_FRIEND ){ ui->friendtotal--; ui->friend_online[k]=ui->friend_online[ui->friendtotal]; ui->friend_online[ui->friendtotal]=0; @@ -701,6 +701,13 @@ int usermode(int argc, char **argv) return 0; } +int torb(int argc, char **argv) +{ + reload_bcache(); + puts("bcache reloaded"); + return 0; +} + struct { int (*func)(int, char **); char *cmd, *descript; @@ -725,6 +732,7 @@ struct { {SHMinit, "SHMinit", "initialize SHM (including uhash_loader)"}, {hotboard, "hotboard", "list boards of most bfriends"}, {usermode, "usermode", "list #users in the same mode"}, + {torb, "reloadbcache", "reload bcache"}, {NULL, NULL, NULL} }; extern char ** environ; |