git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f0f0e1
)
In libnetapi example, use libnetapi_get_error_string().
author
Günther Deschner
<gd@samba.org>
Mon, 7 Jan 2008 19:10:47 +0000
(20:10 +0100)
committer
Günther Deschner
<gd@samba.org>
Mon, 7 Jan 2008 19:13:40 +0000
(20:13 +0100)
Guenther
source/lib/netapi/examples/netdomjoin/netdomjoin.c
patch
|
blob
|
history
diff --git
a/source/lib/netapi/examples/netdomjoin/netdomjoin.c
b/source/lib/netapi/examples/netdomjoin/netdomjoin.c
index 634d265597236b126033250b70a9d1dea02c6002..a0ac0b1e5618fa325849526403d4cf96c15d06d8 100644
(file)
--- a/
source/lib/netapi/examples/netdomjoin/netdomjoin.c
+++ b/
source/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");
}