From b7b50b21d2254a079b1b1c299909483d23db1512 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 3 Feb 2012 13:57:00 +0100 Subject: Remove sysdb_get_ctx_from_list() --- src/db/sysdb.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/db/sysdb.c') diff --git a/src/db/sysdb.c b/src/db/sysdb.c index d3a20cf1..bec25057 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1310,35 +1310,6 @@ fail: return ret; } -int sysdb_get_ctx_from_list(struct sysdb_ctx_list *ctx_list, - struct sss_domain_info *domain, - struct sysdb_ctx **sysdb) -{ - int i; - - if (domain->sysdb != NULL) { - *sysdb = domain->sysdb; - return EOK; - } - - DEBUG(SSSDBG_TRACE_FUNC, ("sysdb context not stored in domain, " - "trying to find by name.\n")); - - for (i = 0; i < ctx_list->num_dbs; i++) { - if (ctx_list->dbs[i]->domain == domain) { - *sysdb = ctx_list->dbs[i]; - return EOK; - } - if (strcasecmp(ctx_list->dbs[i]->domain->name, domain->name) == 0) { - *sysdb = ctx_list->dbs[i]; - return EOK; - } - } - /* definitely not found */ - return ENOENT; -} - - int compare_ldb_dn_comp_num(const void *m1, const void *m2) { struct ldb_message *msg1 = talloc_get_type(*(void **) discard_const(m1), -- cgit