| |
@@ -209,6 +209,12 @@
|
| |
goto done;
|
| |
}
|
| |
|
| |
+ if (services == NULL) {
|
| |
+ PRINT("This domain has no active servers.\n");
|
| |
+ ret = EOK;
|
| |
+ goto done;
|
| |
+ }
|
| |
+
|
| |
PRINT("Active servers:\n");
|
| |
for (i = 0; services[i] != NULL; i++) {
|
| |
ret = sbus_call_ifp_domain_ActiveServer(tmp_ctx, conn, IFP_BUS,
|
| |
@@ -220,6 +226,7 @@
|
| |
goto done;
|
| |
}
|
| |
|
| |
+ /* SBUS_REQ_STRING_DEFAULT handles (server == NULL) case gracefully */
|
| |
server = SBUS_REQ_STRING_DEFAULT(server, _("not connected"));
|
| |
printf("%s: %s\n", proper_service_name(services[i]), server);
|
| |
}
|
| |
@@ -256,6 +263,12 @@
|
| |
goto done;
|
| |
}
|
| |
|
| |
+ if (services == NULL) {
|
| |
+ PRINT("No servers discovered.\n");
|
| |
+ ret = EOK;
|
| |
+ goto done;
|
| |
+ }
|
| |
+
|
| |
for (i = 0; services[i] != NULL; i++) {
|
| |
PRINT("Discovered %s servers:\n", proper_service_name(services[i]));
|
| |
|
| |
Fixes https://pagure.io/SSSD/sssd/issue/2710