summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlwms <lwms@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-30 12:51:03 +0800
committerlwms <lwms@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-30 12:51:03 +0800
commitab7a05f43a03d94b726d9137a50d96f6e7e02421 (patch)
tree59cdf54c041d3cf2ee6be4390b7829898b216712
parent00c4a848e63ee19ca7f36ba6e7ba0102cc086c09 (diff)
downloadpttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.tar
pttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.tar.gz
pttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.tar.bz2
pttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.tar.lz
pttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.tar.xz
pttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.tar.zst
pttbbs-ab7a05f43a03d94b726d9137a50d96f6e7e02421.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@134 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/inndBM.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/util/inndBM.c b/util/inndBM.c
index 87b4d007..7a1f665c 100644
--- a/util/inndBM.c
+++ b/util/inndBM.c
@@ -15,6 +15,7 @@
#define INND_NEWSFEED INNDHOME "/newsfeeds.bbs"
#define INND_NODELIST INNDHOME "/nodelist.bbs"
+#define INND_BADFEED INNDHOME "/badfeeds.bbs"
#define INND_SCRIPT INNDHOME "/bbsnnrpall.auto.sh"
extern bcache_t *brdshm;
@@ -84,12 +85,16 @@ int load_server()
int load_newsfeeds()
{
int bid;
- FILE *fp;
+ FILE *fp, *fo;
char str[128];
if (!(fp = fopen(INND_NEWSFEED, "r")))
{
return 0;
}
+ if (!(fo = fopen(INND_BADFEED, "w")))
+ {
+ return 0;
+ }
for(feedcount=0; fgets(str, 128, fp); feedcount++)
{
@@ -98,7 +103,11 @@ int load_newsfeeds()
feedline[feedcount].group,feedline[feedcount].board,
feedline[feedcount].server);
bid=getbnum(feedline[feedcount].board);
- if(!bid) {feedcount--;continue; /*移除沒有的看板i*/}
+ if(!bid) {
+ fprintf(fo,"%s\n", feedline[feedcount].group );
+ feedcount--;
+ continue; /*移除沒有的看板i*/}
+
strcpy(feedline[feedcount].board,bcache[bid-1].brdname);
/*校正大小寫 */
@@ -106,6 +115,7 @@ int load_newsfeeds()
}
fclose(fp);
+ fclose(fo);
qsort(feedline, feedcount, sizeof(newsfeed_t), newsfeed_cmp);
return feedcount;
}