#include <tr_apc.h>
#include <tr_comm.h>
#include <tr_rp.h>
-#include <trust_router/tr_name.h>
+#include <tr_name_internal.h>
/**********************************************************************/
/* APC test stuff */
for (this=entries,ii=0; this->id!=NULL; this++, ii++) {
new=comm_entry_to_comm(tmp_ctx, this);
if (new==NULL) {
- printf("Error creating community %d.\n", ii+1);
+ printf("Error creating community %u.\n", (unsigned int)ii+1);
rc=1;
goto cleanup;
}
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);
realm=NULL; /* still in tmp_ctx so will be freed */
else {
tr_idp_realm_set_apcs(realm, apc_entry_to_apc(tmp_ctx, re->apcs));
- if (tr_idp_realm_get_apcs==NULL)
+ if (tr_idp_realm_get_apcs(realm)==NULL)
realm=NULL;
}
}
assert(0==tr_comm_table_size(ctab));
talloc_free(mem_ctx);
+ return 0;
}