summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/examples/netdomjoin-gui
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-18 02:30:53 +0100
committerGünther Deschner <gd@samba.org>2008-01-18 02:54:49 +0100
commitcfb7e254662dd957da7e193010f87544b96c2f17 (patch)
tree923afcfc192bf515476540d5dc96ee37bc849ee6 /source3/lib/netapi/examples/netdomjoin-gui
parentbb97b272a975e4af7738c58e7af4b8e3047d4b77 (diff)
downloadsamba-cfb7e254662dd957da7e193010f87544b96c2f17.tar.gz
samba-cfb7e254662dd957da7e193010f87544b96c2f17.tar.bz2
samba-cfb7e254662dd957da7e193010f87544b96c2f17.zip
Add some more debugging into netdomjoin-gui.
Guenther (This used to be commit d4c5b323229c6f43c824e3559084c98e370730a5)
Diffstat (limited to 'source3/lib/netapi/examples/netdomjoin-gui')
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 6e958b4c73..73b14d4d87 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -440,7 +440,7 @@ static void callback_do_join(GtkWidget *widget,
state->password,
unjoin_flags);
if (status != 0) {
- err_str = libnetapi_errstr(status);
+ err_str = libnetapi_get_error_string(state->ctx, status);
g_print("callback_do_join: failed to unjoin (%s)\n",
err_str);
@@ -464,7 +464,7 @@ static void callback_do_join(GtkWidget *widget,
state->password,
join_flags);
if (status != 0) {
- err_str = libnetapi_errstr(status);
+ err_str = libnetapi_get_error_string(state->ctx, status);
g_print("callback_do_join: failed to join (%s)\n", err_str);
dialog = gtk_message_dialog_new(GTK_WINDOW(state->window_parent),
@@ -1308,9 +1308,12 @@ static int initialize_join_state(struct join_state *state,
const char *buffer = NULL;
uint16_t type = 0;
status = NetGetJoinInformation(NULL, &buffer, &type);
- if (status) {
+ if (status != 0) {
+ printf("NetGetJoinInformation failed with: %s\n",
+ libnetapi_get_error_string(state->ctx, status));
return status;
}
+ debug("NetGetJoinInformation gave: %s and %d\n", buffer, type);
state->name_buffer_initial = strdup(buffer);
if (!state->name_buffer_initial) {
return -1;
@@ -1324,7 +1327,9 @@ static int initialize_join_state(struct join_state *state,
uint8_t *buffer = NULL;
status = NetServerGetInfo(NULL, 1005, &buffer);
- if (status) {
+ if (status != 0) {
+ printf("NetServerGetInfo failed with: %s\n",
+ libnetapi_get_error_string(state->ctx, status));
return status;
}