[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1571-g3e2975b

Günther Deschner gd at samba.org
Tue May 12 20:50:09 GMT 2009


The branch, master has been updated
       via  3e2975b3bdd247d1e3e7c74bada2f85a1936acaf (commit)
       via  20b5fc02d2e97dbd51d84cc05ac887e274b14866 (commit)
      from  ad9d64ee1b9e4cd4324b62c2bb2fd2eec9743e30 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3e2975b3bdd247d1e3e7c74bada2f85a1936acaf
Author: Günther Deschner <gd at samba.org>
Date:   Tue May 12 22:15:04 2009 +0200

    s3-netdomjoin-gui: use NetServerGetInfo() level 101 to get hostname.
    
    Guenther

commit 20b5fc02d2e97dbd51d84cc05ac887e274b14866
Author: Günther Deschner <gd at samba.org>
Date:   Tue May 12 22:12:47 2009 +0200

    s3-netdomjoin-gui: inspect the correct computername string before
    enabling/disabling the change button.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 .../examples/netdomjoin-gui/netdomjoin-gui.c       |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 629a447..2af4edd 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -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);
 	}
 }
@@ -1623,7 +1623,7 @@ static int init_join_state(struct join_state **state)
 	return 0;
 }
 
-static NET_API_STATUS get_server_comment(struct join_state *state)
+static NET_API_STATUS get_server_properties(struct join_state *state)
 {
 	struct SERVER_INFO_101 *info101 = NULL;
 	struct SERVER_INFO_1005 *info1005 = NULL;
@@ -1637,6 +1637,11 @@ static NET_API_STATUS get_server_comment(struct join_state *state)
 		if (!state->comment) {
 			return -1;
 		}
+		SAFE_FREE(state->my_hostname);
+		state->my_hostname = strdup(info101->sv101_name);
+		if (!state->my_hostname) {
+			return -1;
+		}
 		NetApiBufferFree(info101);
 		return NET_API_STATUS_SUCCESS;
 	}
@@ -1772,7 +1777,7 @@ static int initialize_join_state(struct join_state *state,
 		NetApiBufferFree((void *)buffer);
 	}
 
-	status = get_server_comment(state);
+	status = get_server_properties(state);
 	if (status != 0) {
 		return -1;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list