thrift-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ro...@apache.org
Subject svn commit: r1153638 - /thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp
Date Wed, 03 Aug 2011 20:12:32 GMT
Author: roger
Date: Wed Aug  3 20:12:32 2011
New Revision: 1153638

URL: http://svn.apache.org/viewvc?rev=1153638&view=rev
Log:
THRIFT-916 printf %lld for 32bit platform only by using __ia64__

Modified:
    thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp

Modified: thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp?rev=1153638&r1=1153637&r2=1153638&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp (original)
+++ thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp Wed Aug  3 20:12:32 2011
@@ -741,9 +741,15 @@ bool TFileTransport::isEventCorrupted() 
   } else if( ((offset_ + readState_.bufferPtr_ - 4)/chunkSize_) !=
              ((offset_ + readState_.bufferPtr_ + readState_.event_->eventSize_ - 1)/chunkSize_)
) {
     // 3. size indicates that event crosses chunk boundary
+#ifdef __ia64__
+    T_ERROR("Read corrupt event. Event crosses chunk boundary. Event size:%u  Offset:%ld",
+            readState_.event_->eventSize_,
+            (int64_t) (offset_ + readState_.bufferPtr_ + 4));
+#else
     T_ERROR("Read corrupt event. Event crosses chunk boundary. Event size:%u  Offset:%lld",
             readState_.event_->eventSize_,
             (int64_t) (offset_ + readState_.bufferPtr_ + 4));
+#endif
 
     return true;
   }
@@ -783,8 +789,13 @@ void TFileTransport::performRecovery() {
       readState_.resetState(readState_.lastDispatchPtr_);
       currentEvent_ = NULL;
       char errorMsg[1024];
+#ifdef __ia64__
+      sprintf(errorMsg, "TFileTransport: log file corrupted at offset: %ld",
+              (int64_t) (offset_ + readState_.lastDispatchPtr_));
+#else
       sprintf(errorMsg, "TFileTransport: log file corrupted at offset: %lld",
               (int64_t) (offset_ + readState_.lastDispatchPtr_));
+#endif
               
       GlobalOutput(errorMsg);
       throw TTransportException(errorMsg);



Mime
View raw message