diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-11-07 12:59:17 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-09 13:50:30 -0500 |
commit | 47d61ca8db78e5976400dbe08f426c0985e6e801 (patch) | |
tree | ec74b9a683113660420ee0aca8f10122ea8eb475 /server/providers/ipa | |
parent | 35d0b225578e179b8c21f1eee59fcf075eb1f692 (diff) | |
download | sssd-47d61ca8db78e5976400dbe08f426c0985e6e801.tar.gz sssd-47d61ca8db78e5976400dbe08f426c0985e6e801.tar.bz2 sssd-47d61ca8db78e5976400dbe08f426c0985e6e801.zip |
Fix tevent_req error checking.
When possible using a macro that correctly deals with tstate
Diffstat (limited to 'server/providers/ipa')
-rw-r--r-- | server/providers/ipa/ipa_access.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/server/providers/ipa/ipa_access.c b/server/providers/ipa/ipa_access.c index 0adad546..19b707cd 100644 --- a/server/providers/ipa/ipa_access.c +++ b/server/providers/ipa/ipa_access.c @@ -274,14 +274,9 @@ static int hbac_get_user_info_recv(struct tevent_req *req, TALLOC_CTX *memctx, { struct hbac_get_user_info_state *state = tevent_req_data(req, struct hbac_get_user_info_state); - enum tevent_req_state tstate; - uint64_t err; int i; - if (tevent_req_is_error(req, &tstate, &err)) { - if (err) return err; - return EIO; - } + TEVENT_REQ_RETURN_ON_ERROR(req); *user_dn = talloc_steal(memctx, state->user_orig_dn); *groups_count = state->groups_count; @@ -716,13 +711,8 @@ static int hbac_get_host_info_recv(struct tevent_req *req, TALLOC_CTX *memctx, { struct hbac_get_host_info_state *state = tevent_req_data(req, struct hbac_get_host_info_state); - enum tevent_req_state tstate; - uint64_t err; - if (tevent_req_is_error(req, &tstate, &err)) { - if (err) return err; - return EIO; - } + TEVENT_REQ_RETURN_ON_ERROR(req); *hhi = talloc_steal(memctx, state->hbac_host_info); return EOK; @@ -1118,14 +1108,9 @@ static int hbac_get_rules_recv(struct tevent_req *req, TALLOC_CTX *memctx, { struct hbac_get_rules_state *state = tevent_req_data(req, struct hbac_get_rules_state); - enum tevent_req_state tstate; - uint64_t err; int i; - if (tevent_req_is_error(req, &tstate, &err)) { - if (err) return err; - return EIO; - } + TEVENT_REQ_RETURN_ON_ERROR(req); *hbac_rule_count = state->hbac_reply_count; *hbac_rule_list = talloc_steal(memctx, state->hbac_reply_list); |