rem: hdr_lump = add_lump_rpl( trans->uas.request, new_header, strlen(new_header), LUMP_RPL_HDR ); if ( !hdr_lump ) { LOG(L_ERR,"ERROR:tm:t_reply_with_body: cannot add hdr lump\n"); goto error;
add: if (new_header && strlen(new_header)) { hdr_lump = add_lump_rpl( trans->uas.request, new_header, strlen(new_header), LUMP_RPL_HDR ); if ( !hdr_lump ) { LOG(L_ERR,"ERROR:tm:t_reply_with_body: cannot add hdr lump\n"); goto error; }
context: int t_reply_with_body( struct cell *trans, unsigned int code, 		char * text, char * body, char * new_header, char * to_tag ){	struct lump_rpl *hdr_lump;	struct lump_rpl *body_lump;	str  s_to_tag;	str  rpl;	int  ret;	struct bookmark bm;	s_to_tag.s = to_tag;	if(to_tag)		s_to_tag.len = strlen(to_tag);	/* mark the transaction as replied */	if (code>=200) set_kr(REQ_RPLD);	/* add the lumps for new_header and for body (by bogdan) */	hdr_lump = add_lump_rpl( trans->uas.request, new_header,		strlen(new_header), LUMP_RPL_HDR );	if ( !hdr_lump ) {		LOG(L_ERR,"ERROR:tm:t_reply_with_body: cannot add hdr lump\n");		goto error;	}	/* body lump */	if(body && strlen(body)) {		body_lump = add_lump_rpl( trans->uas.request, body, strlen(body),			LUMP_RPL_BODY );		if (body_lump==0) {			LOG(L_ERR,"ERROR:tm:t_reply_with_body: cannot add body lump\n");			goto error_1;		}	} else {		body_lump = 0;	}	rpl.s = build_res_buf_from_sip_req(			code, text, &s_to_tag,			trans->uas.request, (unsigned int*)&rpl.len, &bm);	/* since the msg (trans->uas.request) is a clone into shm memory, to avoid	 * memory leak or crashing (lumps are create in private memory) I will	 * remove the lumps by myself here (bogdan) */	unlink_lump_rpl( trans->uas.request, hdr_lump);	free_lump_rpl( hdr_lump );	if( body_lump ) {		unlink_lump_rpl( trans->uas.request, body_lump);		free_lump_rpl( body_lump );	}	if (rpl.s==0) {		LOG(L_ERR,"ERROR:tm:t_reply_with_body: failed in doing "			"build_res_buf_from_sip_req()\n");		goto error;	}	DBG("t_reply_with_body: buffer computed\n");	// frees 'res.s' ... no panic !	ret=_reply_light( trans, rpl.s, rpl.len, code, text, 		s_to_tag.s, s_to_tag.len, 1 /* lock replies */, &bm );	/* this is ugly hack -- the function caller may wish to continue with	 * transction and I unref; however, there is now only one use from	 * vm/fifo_vm_reply and I'm currently to lazy to export UNREF; -jiri	 */	UNREF(trans);	return ret;error_1:	unlink_lump_rpl( trans->uas.request, hdr_lump);	free_lump_rpl( hdr_lump );error:	return -1;}