diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-10-11 15:34:44 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-10-23 10:21:13 +0200 |
commit | 10c07e188323a2f9824b5e34379f3b1a9b37759e (patch) | |
tree | 8d8951b12cf5bff8d089cc76d0a2f8bd19a68359 /src/providers/fail_over.h | |
parent | 4a4af8e1b6a9bab7c7a34d86055a400376e3829e (diff) | |
download | sssd-10c07e188323a2f9824b5e34379f3b1a9b37759e.tar.gz sssd-10c07e188323a2f9824b5e34379f3b1a9b37759e.tar.xz sssd-10c07e188323a2f9824b5e34379f3b1a9b37759e.zip |
FO: Use refcount to keep track of servers returned to callers
Resolves:
https://fedorahosted.org/sssd/ticket/2829
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/providers/fail_over.h')
-rw-r--r-- | src/providers/fail_over.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/providers/fail_over.h b/src/providers/fail_over.h index e49c6414a..75bff8da1 100644 --- a/src/providers/fail_over.h +++ b/src/providers/fail_over.h @@ -128,7 +128,6 @@ int fo_add_server(struct fo_service *service, const char *name, int port, void *user_data, bool primary); - int fo_add_srv_server(struct fo_service *service, const char *srv, const char *discovery_domain, @@ -148,8 +147,17 @@ struct tevent_req *fo_resolve_service_send(TALLOC_CTX *mem_ctx, struct fo_service *service); int fo_resolve_service_recv(struct tevent_req *req, + TALLOC_CTX *ref_ctx, struct fo_server **server); + +/* To be used by async consumers of fo_resolve_service. If a server should be returned + * to an outer request, it should be referenced by a memory from that outer request, + * because the failover's server list might change with a subsequent call (see upstream + * bug #2829) + */ +void fo_ref_server(TALLOC_CTX *ref_ctx, struct fo_server *server); + /* * Set feedback about 'server'. Caller should use this to indicate a problem * with the server itself, not only with the service on that server. This |