From eb006d74dd8bbadbd7a551e732e373e7cf3ad9c9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 27 Feb 2008 10:49:43 +0000 Subject: bugfix: queue disk file were not properly persisted when immediately after closing an output file rsyslog was stopped or huped (the new output file open must NOT have happend at that point) - this lead to a sparse and invalid queue file which could cause several problems to the engine (unpredictable results). This situation should have happened only in very rare cases. tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=40 --- obj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'obj.c') diff --git a/obj.c b/obj.c index f0ad9787..5e0fd278 100644 --- a/obj.c +++ b/obj.c @@ -460,8 +460,9 @@ static rsRetVal objDeserializeHeader(uchar *pszRecType, objID_t *poID, int* poVe /* and now we skip over the rest until the delemiting \n */ NEXTC; - while(c != '\n') + while(c != '\n') { NEXTC; + } *poID = (objID_t) ioID; *poVers = oVers; @@ -659,6 +660,7 @@ rsRetVal objDeserialize(void *ppObj, objID_t objTypeExpected, strm_t *pStrm, rsR iRetLocal = objDeserializeHeader((uchar*) "Obj", &oID, &oVers, pStrm); if(iRetLocal != RS_RET_OK) { dbgprintf("objDeserialize error %d during header processing - trying to recover\n", iRetLocal); +abort(); CHKiRet(objDeserializeTryRecover(pStrm)); } } while(iRetLocal != RS_RET_OK); -- cgit