From d0a643a310ac8b608ffcb8efce697115ba554c8a 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 08/15] 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 8fd6f6a..7c6ed5d 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1478,7 +1478,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);
@@ -1628,7 +1628,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;
@@ -1643,7 +1643,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;
@@ -1668,7 +1668,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;
@@ -1681,7 +1682,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;
@@ -1872,7 +1873,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);
@@ -2038,7 +2039,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;
@@ -2050,7 +2052,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;
@@ -5252,7 +5254,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

