diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-09 20:51:26 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-09 20:51:26 +0800 |
commit | b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69 (patch) | |
tree | 566c0ee9210e33d8fb8acd7e4af44dbea2c2f841 /util | |
parent | ef77e882e4addbd7b94333f1aac9c41673ee611f (diff) | |
download | pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.tar pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.tar.gz pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.tar.bz2 pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.tar.lz pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.tar.xz pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.tar.zst pttbbs-b3b99a3f3c2c86d1ac2ffdc9f7af338375d76d69.zip |
fix redirect bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@316 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/inndBM.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/util/inndBM.c b/util/inndBM.c index 17b6ce87..52092434 100644 --- a/util/inndBM.c +++ b/util/inndBM.c @@ -9,8 +9,6 @@ #define INND_BADFEED INNDHOME "/badfeeds.bbs" #define INND_SCRIPT INNDHOME "/bbsnnrpall.auto.sh" -extern boardheader_t *bcache; -extern int numboards; int istran[MAX_BOARD]; typedef @@ -109,32 +107,29 @@ int load_newsfeeds() qsort(feedline, feedcount, sizeof(newsfeed_t), newsfeed_cmp); return feedcount; } + int dobbsnnrp(char *serverstr, int serverid,FILE *fpscript) { - char buf[256]; - printf("set %s\r\n",serverstr); - strtok(serverstr,";\r\n"); - strtok(server[serverid].address,";\r\n"); //¨¾hack - sprintf(buf,INNDHOME"/bbsnnrp -c %s " - INNDHOME"/active/%s.auto.active >>" - INNDHOME"/log/inndBM.log 2>>" - INNDHOME"/log/inndBM.log.err &\r\n", - server[serverid].address, - serverstr); - system(buf); - if(fpscript) - fprintf(fpscript,INNDHOME"/bbsnnrp %s " - INNDHOME"/active/%s.auto.active >>" - INNDHOME"/log/inndBM.log 2>>" - INNDHOME"/log/inndBM.log.err &\r\n", - server[serverid].address,serverstr); - return 0; + char buf[256]; + printf("set %s\r\n",serverstr); + strtok(serverstr,";\r\n"); + strtok(server[serverid].address,";\r\n"); //¨¾hack + sprintf(buf, INNDHOME"/bbsnnrp -c %s " + INNDHOME "/active/%s.auto.active " + " >> " INNDHOME"/log/inndBM.log &", + server[serverid].address, + serverstr); + system(buf); + if(fpscript) + fprintf(fpscript, buf); + return 0; } int main() { int i,serverid=0; FILE *fp=NULL,*fpscript=fopen(INND_SCRIPT,"w"); char buf[256],serverstr[30]=""; + chdir(BBSHOME "/innd"); resolve_boards(); memset(istran,0,sizeof(int)*MAX_BOARD); load_server(); |