From 3b86b89ba5c9e3908216273ea710270fd6b2dc31 Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Wed, 20 Jul 2016 18:24:52 +0300
Subject: [PATCH 07/12] NSS: Rename nss_cmd_getbynam/id_done

Rename nss_cmd_getby(nam|id)_done to
nss_cmd_getby(nam|id)_get_domains_done to prepare for addition of
another async request to nss_cmd_getby(nam|id) processing.
---
 src/responder/nss/nsssrv_cmd.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 0d978f3..42eb57e 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1538,7 +1538,7 @@ static int nss_check_name_of_well_known_sid(struct nss_cmd_ctx *cmdctx,
 }
 
 static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx);
-static void nss_cmd_getbynam_done(struct tevent_req *req);
+static void nss_cmd_getbynam_get_domains_done(struct tevent_req *req);
 static int nss_cmd_getpwnam(struct cli_ctx *cctx)
 {
     return nss_cmd_getbynam(SSS_NSS_GETPWNAM, cctx);
@@ -1688,7 +1688,7 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
         if (req == NULL) {
             ret = ENOMEM;
         } else {
-            tevent_req_set_callback(req, nss_cmd_getbynam_done, dctx);
+            tevent_req_set_callback(req, nss_cmd_getbynam_get_domains_done, dctx);
             ret = EAGAIN;
         }
         goto done;
@@ -1703,7 +1703,7 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
         if (req == NULL) {
             ret = ENOMEM;
         } else {
-            tevent_req_set_callback(req, nss_cmd_getbynam_done, dctx);
+            tevent_req_set_callback(req, nss_cmd_getbynam_get_domains_done, dctx);
             ret = EAGAIN;
         }
         goto done;
@@ -1728,7 +1728,8 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
             if (req == NULL) {
                 ret = ENOMEM;
             } else {
-                tevent_req_set_callback(req, nss_cmd_getbynam_done, dctx);
+                tevent_req_set_callback(req,
+                                        nss_cmd_getbynam_get_domains_done, dctx);
                 ret = EAGAIN;
             }
             goto done;
@@ -1741,7 +1742,7 @@ done:
     return nss_cmd_done(cmdctx, ret);
 }
 
-static void nss_cmd_getbynam_done(struct tevent_req *req)
+static void nss_cmd_getbynam_get_domains_done(struct tevent_req *req)
 {
     struct nss_dom_ctx *dctx = tevent_req_callback_data(req, struct nss_dom_ctx);
     struct nss_cmd_ctx *cmdctx = dctx->cmdctx;
@@ -1932,7 +1933,7 @@ done:
 
 static int nss_cmd_getgrgid_search(struct nss_dom_ctx *dctx);
 static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx);
-static void nss_cmd_getbyid_done(struct tevent_req *req);
+static void nss_cmd_getbyid_get_domains_done(struct tevent_req *req);
 static int nss_cmd_getpwuid(struct cli_ctx *cctx)
 {
     return nss_cmd_getbyid(SSS_NSS_GETPWUID, cctx);
@@ -2098,7 +2099,8 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
         if (req == NULL) {
             ret = ENOMEM;
         } else {
-            tevent_req_set_callback(req, nss_cmd_getbyid_done, dctx);
+            tevent_req_set_callback(req,
+                                    nss_cmd_getbyid_get_domains_done, dctx);
             ret = EAGAIN;
         }
         goto done;
@@ -2110,7 +2112,7 @@ done:
     return nss_cmd_done(cmdctx, ret);
 }
 
-static void nss_cmd_getbyid_done(struct tevent_req *req)
+static void nss_cmd_getbyid_get_domains_done(struct tevent_req *req)
 {
     struct nss_dom_ctx *dctx = tevent_req_callback_data(req, struct nss_dom_ctx);
     struct nss_cmd_ctx *cmdctx = dctx->cmdctx;
@@ -5364,7 +5366,8 @@ static int nss_cmd_getbysid(enum sss_cli_command cmd, struct cli_ctx *cctx)
             ret = ENOMEM;
         } else {
             dctx->rawname = sid_str;
-            tevent_req_set_callback(req, nss_cmd_getbyid_done, dctx);
+            tevent_req_set_callback(req,
+                                    nss_cmd_getbyid_get_domains_done, dctx);
             ret = EAGAIN;
         }
         goto done;
-- 
2.8.1

