bool TunnelInterfaceRegTest::writeFile(ReplyData replyData, WFString fileName) { // Create the file, if file already exist data will be appended. FILE* pSaveFile = fopen(fileName.c_str(), "ab"); if (pSaveFile == NULL) { return false; } // Get the buffer for writing if (replyData.getData() != NULL) { // Write the buffer to the file fwrite(replyData.getData(), replyData.getSize(), 1, pSaveFile); fclose(pSaveFile); return true; } // No buffer, this should never happen fclose(pSaveFile); return false; }