From 7ca57841172471dc31e3646e9387ca795500a04d 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 4/6] 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 | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 4baacf3..dfe1fe8 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1528,7 +1528,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);
@@ -1678,7 +1678,8 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
             ret = ENOMEM;
         } else {
             dctx->rawname = rawname;
-            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;
@@ -1694,7 +1695,8 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
             ret = ENOMEM;
         } else {
             dctx->rawname = rawname;
-            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;
@@ -1720,7 +1722,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;
@@ -1733,7 +1736,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;
@@ -1924,7 +1927,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);
@@ -2034,7 +2037,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;
@@ -2072,7 +2076,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;
@@ -5360,7 +5364,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

