s3-netdomjoin-gui: inspect the correct computername string before
authorGünther Deschner <gd@samba.org>
Tue, 12 May 2009 20:12:47 +0000 (22:12 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 12 May 2009 20:49:04 +0000 (22:49 +0200)
enabling/disabling the change button.

Guenther

source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c

index 629a447..fd48748 100644 (file)
@@ -853,7 +853,7 @@ static void callback_enter_hostname_and_unlock(GtkWidget *widget,
        gtk_label_set_text(GTK_LABEL(state->label_full_computer_name), str);
        free(str);
 
-       if (state->hostname_changed && str && str[0] != 0 && str[0] != '.') {
+       if (state->hostname_changed && entry_text && entry_text[0] != 0 && entry_text[0] != '.') {
                gtk_widget_set_sensitive(GTK_WIDGET(state->button_ok), TRUE);
        }
 }