src/task.c
static void saveReceivedDataToFile(char *dataBuf)
{
   char* start;
   int length;
   FILE* fp;

   start = parse_getContentStart(dataBuf);
   length = parse_getContentLength(dataBuf);
   if ((start != NULL) && (length > 0))
   {
      remove(target_file);
      fp = fopen(target_file, "w+");
      if (fp != NULL)
      {
         fwrite(start, 1, length, fp);
         fclose(fp);
         utils_sysLog(LOG_INFO, "Saved %d bytes to local file '%s'", length, target_file);
      }
   }
}
//!
//! Save the received data to a local file
//!

Save the received data to a local file
Save the received data to a local file
static void saveReceivedDataToFile(char *dataBuf)
{
   char* start;
   int length;
   FILE* fp;
   start = parse_getContentStart(dataBuf);
   length = parse_getContentLength(dataBuf);
   if ((start != NULL) && (length > 0))
   {
      remove(target_file);
      fp = fopen(target_file, "w+");
      if (fp != NULL)
      {
         fwrite(start, 1, length, fp);
         fclose(fp);
         utils_sysLog(LOG_INFO, "Saved %d bytes to local file '%s'", length, target_file);
      }
   }
}
static void saveReceivedDataToFile ( char * dataBuf ) { char * start ; int length ; FILE * fp ; start = parse_getContentStart ( dataBuf ) ; length = parse_getContentLength ( dataBuf ) ; if ( ( start != NULL ) && ( length > 0 ) ) { remove ( target_file ) ; fp = fopen ( target_file , " " ) ; if ( fp != NULL ) { fwrite ( start , 1 , length , fp ) ; fclose ( fp ) ; utils_sysLog ( LOG_INFO , " " , length , target_file ) ; } } }
Save the received data to a local file
Save the received data to a local file