r111399 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111398‎ | r111399 | r111400 >
Date:19:01, 13 February 2012
Author:qchris
Status:ok
Tags:
Comment:
recompressxml: Allowed lines between <page> and <id> tag
Modified paths:
  • /branches/ariel/xmldumps-backup/mwbzutils/recompressxml.c (modified) (history)

Diff [purge]

Index: branches/ariel/xmldumps-backup/mwbzutils/recompressxml.c
@@ -142,7 +142,7 @@
143143
144144 char *pageTitle = NULL;
145145 int pageId = 0;
146 - enum States{WantPage,WantPageTitle,WantPageId};
 146+ enum States{WantPage,WantPageTitle,WantPageId,FoundCompletePageInfo};
147147 int state = WantPage;
148148
149149 /* init bzip compression stuff */
@@ -189,8 +189,10 @@
190190 }
191191 pageId = hasId(inBuf);
192192 if (pageId) {
193 - state = WantPage;
 193+ state = FoundCompletePageInfo;
194194 }
 195+ }
 196+ if (state == FoundCompletePageInfo) {
195197 if (indexcompressed) {
196198 if (verbose) {
197199 fprintf(stderr,"writing line to compressed index file\n");
@@ -214,6 +216,7 @@
215217 }
216218 fprintf(indexfd,"%d:%d:%s\n",fileOffset,pageId,pageTitle);
217219 }
 220+ state = WantPage;
218221 pageId = 0;
219222 pageTitle = NULL;
220223 }

Status & tagging log