mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
Fix libnetapi error string callers.
Guenther
This commit is contained in:
@ -46,7 +46,7 @@ int main(int argc, char **argv)
|
||||
|
||||
status = NetGetDCName(argv[1], argv[2], &buffer);
|
||||
if (status != 0) {
|
||||
printf("GetDcName failed with: %s\n", libnetapi_errstr(ctx, status));
|
||||
printf("GetDcName failed with: %s\n", libnetapi_errstr(status));
|
||||
} else {
|
||||
printf("%s\n", (char *)buffer);
|
||||
}
|
||||
|
@ -147,13 +147,13 @@ static void callback_apply_description_change(GtkWidget *widget,
|
||||
status = NetServerSetInfo(NULL, 1005, (uint8_t *)&info1005, &parm_err);
|
||||
if (status) {
|
||||
debug("NetServerSetInfo failed with: %s\n",
|
||||
libnetapi_errstr(state->ctx, status));
|
||||
libnetapi_errstr(status));
|
||||
dialog = gtk_message_dialog_new(GTK_WINDOW(state->window_main),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
"Failed to change computer description: %s.",
|
||||
libnetapi_errstr(state->ctx, status));
|
||||
libnetapi_errstr(status));
|
||||
g_signal_connect_swapped(dialog, "response",
|
||||
G_CALLBACK(gtk_widget_destroy),
|
||||
dialog);
|
||||
@ -439,7 +439,7 @@ static void callback_do_join(GtkWidget *widget,
|
||||
state->password,
|
||||
unjoin_flags);
|
||||
if (status != 0) {
|
||||
err_str = libnetapi_errstr(state->ctx, status);
|
||||
err_str = libnetapi_errstr(status);
|
||||
g_print("callback_do_join: failed to unjoin (%s)\n",
|
||||
err_str);
|
||||
|
||||
@ -463,7 +463,7 @@ static void callback_do_join(GtkWidget *widget,
|
||||
state->password,
|
||||
join_flags);
|
||||
if (status != 0) {
|
||||
err_str = libnetapi_errstr(state->ctx, status);
|
||||
err_str = libnetapi_errstr(status);
|
||||
g_print("callback_do_join: failed to join (%s)\n", err_str);
|
||||
|
||||
dialog = gtk_message_dialog_new(GTK_WINDOW(state->window_parent),
|
||||
|
@ -105,9 +105,9 @@ int main(int argc, char **argv)
|
||||
join_flags);
|
||||
if (status != 0) {
|
||||
const char *errstr = NULL;
|
||||
errstr = libnetapi_get_error_string(ctx);
|
||||
errstr = libnetapi_get_error_string(ctx, status);
|
||||
if (!errstr) {
|
||||
errstr = libnetapi_errstr(ctx, status);
|
||||
errstr = libnetapi_errstr(status);
|
||||
}
|
||||
printf("Join failed with: %s\n", errstr);
|
||||
} else {
|
||||
|
@ -101,7 +101,7 @@ static int net_dom_unjoin(int argc, const char **argv)
|
||||
status = NetUnjoinDomain(server_name, account, password, unjoin_flags);
|
||||
if (status != 0) {
|
||||
printf("Failed to unjoin domain: %s\n",
|
||||
libnetapi_errstr(ctx, status));
|
||||
libnetapi_errstr(status));
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ static int net_dom_join(int argc, const char **argv)
|
||||
Account, password, join_flags);
|
||||
if (status != 0) {
|
||||
printf("Failed to join domain: %s\n",
|
||||
libnetapi_errstr(ctx, status));
|
||||
libnetapi_errstr(status));
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user