TID_RESP *tid_resp_dup(TALLOC_CTX *mem_ctx, TID_RESP *resp)
{
- TALLOC_CTX *tmp_ctx=NULL;
TID_RESP *newresp=NULL;
if (resp==NULL)
return NULL;
- tmp_ctx=talloc_new(NULL);
- newresp=talloc(tmp_ctx, TID_RESP);
+ newresp=tid_resp_new(mem_ctx);
if (NULL!=newresp) {
newresp->result=resp->result;
newresp->err_msg=tr_dup_name(resp->err_msg);
- newresp->rp_realm=tr_dup_name(resp->err_msg);
+ newresp->rp_realm=tr_dup_name(resp->rp_realm);
newresp->realm=tr_dup_name(resp->realm);
newresp->comm=tr_dup_name(resp->comm);
newresp->orig_coi=tr_dup_name(resp->orig_coi);
tid_resp_set_cons(newresp, resp->cons);
tid_resp_set_error_path(newresp, resp->error_path);
}
- talloc_free(tmp_ctx);
return newresp;
}
new->key_name=tr_dup_name(srvr->key_name);
new->aaa_server_dh=tr_dh_dup(srvr->aaa_server_dh);
new->key_expiration=srvr->key_expiration;
+
tid_srvr_blk_set_path(new, srvr->path);
tid_srvr_blk_add(new->next, tid_srvr_blk_dup(mem_ctx, srvr->next));
while (this->next!=NULL)
this=this->next;
+
this->next=new;
+ while (this!=NULL) {
+ talloc_steal(head, this);
+ this=this->next;
+ }
return head;
}