rem: if (soap->mode & SOAP_ENC_DIME)
add: if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM))
context: soap_envelope_end_out(struct soap *soap){ if (soap_element_end_out(soap, "SOAP-ENV:Envelope"))    return soap->error;#ifndef WITH_LEANER  if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME))  { soap->dime.size = soap->count - soap->dime.size;	/* DIME in MIME correction */    sprintf(soap->id, soap->dime_id_format, 0);    soap->dime.id = soap->id;    if (soap->local_namespaces)    { if (soap->local_namespaces[0].out)        soap->dime.type = (char*)soap->local_namespaces[0].out;      else        soap->dime.type = (char*)soap->local_namespaces[0].ns;    }    soap->dime.options = NULL;    soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;    if (!soap->dime.first)      soap->dime.flags |= SOAP_DIME_ME;    soap->count += 12 + ((strlen(soap->dime.id)+3)&(~3)) + ((strlen(soap->dime.type)+3)&(~3));  }  if (soap->mode & SOAP_ENC_DIME)    return soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3);#endif  soap->part = SOAP_END_ENVELOPE;  return SOAP_OK;} 