rem: 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);  strcpy(body, new_body); memset(body+new_body_len, 0, body_len - new_body_len);
add: char *new_body = NULL; int new_body_len = ptr + 4 - body;   new_body = pkg_malloc(new_body_len+1); strncpy(new_body, ptr+4, new_body_len+1); patch_msg(_msg, body, body_len, new_body, new_body_len);
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;}