rem: if (new_vp->type==PARAM_BRANCH) new_via->branch = new_vp;
add: switch(new_vp->type){ case PARAM_BRANCH: new_via->branch = new_vp; break; case PARAM_RECEIVED: new_via->received = new_vp; break; case PARAM_RPORT: new_via->rport = new_vp; break; case PARAM_I: new_via->i = new_vp; break; }
context: inline struct via_body* via_body_cloner( char* new_buf,					char *org_buf, struct via_body *param_org_via, char **p){	struct via_body *new_via;	struct via_body *first_via, *last_via;	struct via_body *org_via;	first_via = last_via = 0;	org_via = param_org_via;	do	{		/* clones the via_body structure */		new_via = (struct via_body*)(*p);		memcpy( new_via , org_via , sizeof( struct via_body) );		(*p) += ROUND4(sizeof( struct via_body ));		/* hdr (str type) */		new_via->hdr.s=translate_pointer(new_buf,org_buf,org_via->hdr.s);		/* name (str type) */		new_via->name.s=translate_pointer(new_buf,org_buf,org_via->name.s);		/* version (str type) */		new_via->version.s=			translate_pointer(new_buf,org_buf,org_via->version.s);		/* transport (str type) */		new_via->transport.s=			translate_pointer(new_buf,org_buf,org_via->transport.s);		/* host (str type) */		new_via->host.s=translate_pointer(new_buf,org_buf,org_via->host.s);		/* port_str (str type) */		new_via->port_str.s=			translate_pointer(new_buf,org_buf,org_via->port_str.s);		/* params (str type) */		new_via->params.s=translate_pointer(new_buf,org_buf,org_via->params.s);		/* transaction id */		new_via->tid.s=			translate_pointer(new_buf, org_buf, org_via->tid.s);		/* comment (str type) */		new_via->comment.s=			translate_pointer(new_buf,org_buf,org_via->comment.s);		if ( org_via->param_lst )		{			struct via_param *vp, *new_vp, *last_new_vp;			for( vp=org_via->param_lst, last_new_vp=0 ; vp ; vp=vp->next )			{				new_vp = (struct via_param*)(*p);				memcpy( new_vp , vp , sizeof(struct via_param));				(*p) += ROUND4(sizeof(struct via_param));				new_vp->name.s=translate_pointer(new_buf,org_buf,vp->name.s);				new_vp->value.s=translate_pointer(new_buf,org_buf,vp->value.s);				if (new_vp->type==PARAM_BRANCH)					new_via->branch = new_vp;				if (last_new_vp)					last_new_vp->next = new_vp;				else					new_via->param_lst = new_vp;				last_new_vp = new_vp;				last_new_vp->next = NULL;			}			new_via->last_param = new_vp;		}/*end if via has params */		if (last_via)			last_via->next = new_via;		else			first_via = new_via;		last_via = new_via;		org_via = org_via->next;	}while(org_via);	return first_via;}