summaryrefslogtreecommitdiffstats
path: root/cacheserver/utmpsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'cacheserver/utmpsync.c')
-rw-r--r--cacheserver/utmpsync.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/cacheserver/utmpsync.c b/cacheserver/utmpsync.c
deleted file mode 100644
index 69d1c623..00000000
--- a/cacheserver/utmpsync.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* $Id$ */
-#include "bbs.h"
-#include <err.h>
-
-extern SHM_t *SHM;
-
-int main(int argc, char **argv)
-{
- int sfd, index, i;
- attach_SHM();
- if( (sfd = toconnect(OUTTACACHEHOST, OUTTACACHEPORT)) < 0 ) {
- printf("connect fail\n");
- return 1;
- }
-
- index = -1;
- towrite(sfd, &index, sizeof(index));
- for( i = 0 ; i < USHM_SIZE ; ++i )
- if( towrite(sfd, &SHM->uinfo[i].uid, sizeof(SHM->uinfo[i].uid)) < 0 ||
- towrite(sfd, SHM->uinfo[i].myfriend,
- sizeof(SHM->uinfo[i].myfriend)) < 0 ||
- towrite(sfd, SHM->uinfo[i].reject,
- sizeof(SHM->uinfo[i].reject)) < 0 ){
- fprintf(stderr, "sync error %d\n", i);
- }
- return 0;
-}