rem: if (soap->dime_chunksize) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime_chunksize));
add: if (soap->dime.chunksize) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime.chunksize));
context: soap_recv(struct soap *soap){#ifndef WITH_LEANER  if (soap->mode & SOAP_ENC_DIME)  { if (soap->dime_buflen)    { char *s;      int i;      unsigned char tmp[12];      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME hdr for chunked DIME is in buffer\n"));      soap->count += soap->dime_buflen - soap->buflen;      soap->buflen = soap->dime_buflen;      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Skip padding (%ld bytes)\n", -(long)soap->dime_size&3));      for (i = -(long)soap->dime_size&3; i > 0; i--)      { soap->bufidx++;        if (soap->bufidx >= soap->buflen)          if (soap_recv_raw(soap))            return EOF;      }      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME hdr for next chunk\n"));      s = (char*)tmp;      for (i = 12; i > 0; i--)      { *s++ = soap->buf[soap->bufidx++];        if (soap->bufidx >= soap->buflen)          if (soap_recv_raw(soap))            return EOF;      }      soap->dime_flags = tmp[0] & 0x7;      soap->dime_size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]);      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get DIME chunk (%u bytes)\n", (unsigned int)soap->dime_size));      if (soap->dime_flags & SOAP_DIME_CF)      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "More chunking\n"));        soap->dime_chunksize = soap->dime_size;        if (soap->buflen - soap->bufidx >= soap->dime_size)        { soap->dime_buflen = soap->buflen;          soap->buflen = soap->bufidx + soap->dime_chunksize;        }        else          soap->dime_chunksize -= soap->buflen - soap->bufidx;      }      else      { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Last chunk\n"));        soap->dime_buflen = 0;        soap->dime_chunksize = 0;      }      soap->count = soap->buflen - soap->bufidx;      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%u bytes remaining\n", (unsigned int)soap->count));      return SOAP_OK;    }    if (soap->dime_chunksize)    { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get next DIME hdr for chunked DIME (%u bytes chunk)\n", (unsigned int)soap->dime_chunksize));      if (soap_recv_raw(soap))        return EOF;      if (soap->buflen - soap->bufidx >= soap->dime_chunksize)      { soap->dime_buflen = soap->buflen;        soap->count -= soap->buflen - soap->bufidx - soap->dime_chunksize;        soap->buflen = soap->bufidx + soap->dime_chunksize;      }      else        soap->dime_chunksize -= soap->buflen - soap->bufidx;      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%lu bytes remaining, count=%u\n", (unsigned long)(soap->buflen-soap->bufidx), (unsigned int)soap->count));      return SOAP_OK;    }  }#endif  return soap_recv_raw(soap);}