summaryrefslogtreecommitdiffstats
path: root/src/responder/nss
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-01-20 13:53:16 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-01-27 09:02:01 -0500
commit990b7ebaf67b6d4cc982c805a8ec1126111bd4b4 (patch)
treeaa0f7e8018a5d5170c7486e8b0105b212b894bb2 /src/responder/nss
parentaec5785126354bd8b192f63fe04ea08dae9c0705 (diff)
downloadsssd-990b7ebaf67b6d4cc982c805a8ec1126111bd4b4.tar.gz
sssd-990b7ebaf67b6d4cc982c805a8ec1126111bd4b4.tar.xz
sssd-990b7ebaf67b6d4cc982c805a8ec1126111bd4b4.zip
DP: Refactor responder_dp_req so it's reusable by other responders
* the internal request is now more generic and is decoupled from account-specific data. There is a new sss_dp_issue_request() wrapper that issues a BE request or registers a callback * the public requests all use struct sss_dp_req_state as the tevent_req state data. This allows to report back data from the internal request even if the caller is just a callback notifier * each specific request now uses an _info structure that contains all the data necessary to construct a DBusMessage passed to provider * each specific request now defines a sss_dp_get_$data_msg callback that is called from the sss_dp_issue_request() common wraper. The purpose of the wrapper is to construct a DBusMessage and bind it to a DBus method so the message can be just sent over to back end The miscellanous changes include: * change SSS_DP_ constants to an enum. This way, a switch() would error if a value is not handled. * rename sss_dp_get_account_int_send() to sss_dp_internal_get_send() request because the internal request is going to handle more than just account data * the DBus return values were renamed from err_maj, err_min to dp_err and dp_ret respectively
Diffstat (limited to 'src/responder/nss')
-rw-r--r--src/responder/nss/nsssrv_services.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c
index 6e857ff14..cd0ec5832 100644
--- a/src/responder/nss/nsssrv_services.c
+++ b/src/responder/nss/nsssrv_services.c
@@ -468,7 +468,8 @@ static void lookup_service_done(struct tevent_req *subreq)
("Unable to get information from Data Provider\n"
"dp_error: [%u], errno: [%u], error_msg: [%s]\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min,
+ err_msg ? err_msg : "none"));
}
/* Recheck the cache after the lookup.