diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-02-02 08:44:08 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-02-02 21:43:03 -0500 |
commit | 405a06682b3772b70bb06d3adba780a062959641 (patch) | |
tree | 9c5f47b96b04f9820a76144280cbae3bdf605721 /src/responder/nss | |
parent | 4d81fe27ced3d2e96866aeaf61661a925cb8edf1 (diff) | |
download | sssd-405a06682b3772b70bb06d3adba780a062959641.tar.gz sssd-405a06682b3772b70bb06d3adba780a062959641.tar.bz2 sssd-405a06682b3772b70bb06d3adba780a062959641.zip |
RESPONDERS: Provide a common sss_cmd_send_error function
The common function could be reused in new responders
Diffstat (limited to 'src/responder/nss')
-rw-r--r-- | src/responder/nss/nsssrv_cmd.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index bbb115c8..1dff829e 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -31,19 +31,7 @@ static int nss_cmd_send_error(struct nss_cmd_ctx *cmdctx, int err) { - struct cli_ctx *cctx = cmdctx->cctx; - int ret; - - /* create response packet */ - ret = sss_packet_new(cctx->creq, 0, - sss_packet_get_cmd(cctx->creq->in), - &cctx->creq->out); - if (ret != EOK) { - return ret; - } - - sss_packet_set_error(cctx->creq->out, err); - return EOK; + return sss_cmd_send_error(cmdctx->cctx, err); } static int nss_cmd_send_empty(struct nss_cmd_ctx *cmdctx) |