X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=common%2Ftests%2Fcommtest.c;fp=common%2Ftests%2Fcommtest.c;h=d2becc028e784f5098f7d131605188cd6c4d286a;hp=72a2844ee1b156baf8ecf6b5c614f4edb2f3e315;hb=6f65c9cce86719147d0b4dcc9823b25443c2d185;hpb=eaa1a8ceed54fbfadc2638cf383aaa12ab446a57 diff --git a/common/tests/commtest.c b/common/tests/commtest.c index 72a2844..d2becc0 100644 --- a/common/tests/commtest.c +++ b/common/tests/commtest.c @@ -239,11 +239,9 @@ struct aaa_entry { static TR_AAA_SERVER *aaa_entry_to_aaa_server(TALLOC_CTX *mem_ctx, struct aaa_entry *ae) { TALLOC_CTX *tmp_ctx=talloc_new(NULL); - TR_AAA_SERVER *aaa=tr_aaa_server_new(tmp_ctx, tr_new_name(ae->hostname)); + TR_AAA_SERVER *aaa=tr_aaa_server_from_string(tmp_ctx, ae->hostname); - if ((aaa==NULL) || (aaa->hostname==NULL)) - aaa=NULL; - else + if (aaa) talloc_steal(mem_ctx, aaa); talloc_free(tmp_ctx);