NetServices Stack source

Dependents:   HelloWorld ServoInterfaceBoardExample1 4180_Lab4

Revision:
9:c79fa4034f5b
Parent:
0:632c9925f013
--- a/services/http/client/data/HTTPFile.cpp	Wed Jul 28 12:45:32 2010 +0000
+++ b/services/http/client/data/HTTPFile.cpp	Thu Aug 05 14:32:43 2010 +0000
@@ -23,6 +23,9 @@
 
 #include "HTTPFile.h"
 
+//#define __DEBUG
+#include "dbg/dbg.h"
+
 HTTPFile::HTTPFile(const char* path) : HTTPData(), m_fp(NULL), m_path(path), m_len(0), m_chunked(false)
 {
 
@@ -57,6 +60,7 @@
   if(!openFile("w")) //File does not exist, or I/O error...
     return 0;
   len = fwrite(buf, 1, len, m_fp);
+  DBG("Written %d bytes in %d\n", len, m_fp);
   if( (!m_chunked && (ftell(m_fp) >= m_len)) ||
       (m_chunked && !len) )
   {
@@ -111,6 +115,8 @@
     fseek(m_fp, 0, SEEK_SET); //Goto SOF
   }
   
+  DBG("fd = %d\n", m_fp);
+  
   if(!m_fp) 
     return false;