rem: LOG(L_ERR, "mangle_message_cpim -1-\n");
add: char *new_content_type_str = strstr(body, "Content-Type: "); int new_content_type_len = 0; char *new_content_type_body;  if (new_content_type_str) { char *new_content_type_end = strstr(new_content_type_str, "\r\n"); if (new_content_type_end) { new_content_type_str += 14; new_content_type_len = new_content_type_end - new_content_type_str; } else { new_content_type_len = 10; new_content_type_str = "text/plain"; } } else { new_content_type_len = 10; new_content_type_str = "text/plain"; } if (strncmp(new_content_type_str, "application/sip-iscomposing+xml", 31) == 0) { new_content_type_len = 30; new_content_type_str = "application/im-iscomposing+xml"; } new_content_type_body = pkg_malloc(new_content_type_len); strncpy(new_content_type_body, new_content_type_str, new_content_type_len);   patch_msg(_msg, content_type->body.s, content_type->body.len, new_content_type_body, new_content_type_len);  LOG(L_ERR, "mangle_message_cpim -1b- patched content-type=%.*s\n", new_content_type_len, new_content_type_str);
context: int mangle_message_cpim(struct sip_msg* _msg, char* _s1, char* _s2){     char *body = get_body(_msg);     int body_len = strlen(body);     if (body) {	  char *ptr = strstr(body, "\r\n\r\n");	  LOG(L_ERR, "mangle_message_cpim -1-\n");	  if (ptr) {	       char *new_body = body + 4;	       int new_body_len = strlen(new_body);	       LOG(L_ERR, "mangle_message_cpim -2- old_body_len=%d new_body_len=%d\n", body_len, new_body_len);	       //patch_msg(_msg, body, body_len, new_body, new_body_len);	       strcpy(body, new_body);	       memset(body+new_body_len, 0, body_len - new_body_len);	  }     }     LOG(L_ERR, "mangle_message_cpim -3-\n");     return 1;}