diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/netapi/examples/netdomjoin/netdomjoin.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin/netdomjoin.c b/source3/lib/netapi/examples/netdomjoin/netdomjoin.c index 634d265597..a0ac0b1e56 100644 --- a/source3/lib/netapi/examples/netdomjoin/netdomjoin.c +++ b/source3/lib/netapi/examples/netdomjoin/netdomjoin.c @@ -104,7 +104,12 @@ int main(int argc, char **argv) password, join_flags); if (status != 0) { - printf("Join failed with: %s\n", libnetapi_errstr(ctx, status)); + const char *errstr = NULL; + errstr = libnetapi_get_error_string(ctx); + if (!errstr) { + errstr = libnetapi_errstr(ctx, status); + } + printf("Join failed with: %s\n", errstr); } else { printf("Successfully joined\n"); } |