From: James Wang Date: Mon, 23 Jul 2007 17:35:32 +0000 (+0000) Subject: Readding seekToEnd() call to openLogFile() temporarily so that search doesn't break X-Git-Tag: 0.2.0~1304 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=e9cd65557916236ff4e29bcffdd33751190d55c9;p=common%2Fthrift.git Readding seekToEnd() call to openLogFile() temporarily so that search doesn't break Reviewed By: aditya Test Plan: Thrift compiles, falcon works Revert Plan: revertible git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665168 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp index 51e9f08b..2a8a414e 100644 --- a/lib/cpp/src/transport/TFileTransport.cpp +++ b/lib/cpp/src/transport/TFileTransport.cpp @@ -292,7 +292,7 @@ void TFileTransport::writerThread() { } // set the offset to the correct value (EOF) - offset_ = lseek(fd_, 0, SEEK_END); + seekToEnd(); // Figure out the next time by which a flush must take place @@ -751,6 +751,9 @@ void TFileTransport::openLogFile() { GlobalOutput(errorMsg); throw TTransportException(errorMsg); } + + // TODO: Remove this once Aditya fixes search problems + seekToEnd(); } void TFileTransport::getNextFlushTime(struct timespec* ts_next_flush) {