Author: kalim Date: 2005-08-29 01:27:39 +0000 (Mon, 29 Aug 2005) New Revision: 9726
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9726 Log: Fixed a bug with command line workgroup being overwritten by call to smbc_init(). -Kalim Modified: branches/SOC/SAMBA_3_0/source/client/client.c Changeset: Modified: branches/SOC/SAMBA_3_0/source/client/client.c =================================================================== --- branches/SOC/SAMBA_3_0/source/client/client.c 2005-08-29 01:17:20 UTC (rev 9725) +++ branches/SOC/SAMBA_3_0/source/client/client.c 2005-08-29 01:27:39 UTC (rev 9726) @@ -40,6 +40,7 @@ static pstring service; static pstring desthost; static pstring username; +static pstring workgroup; static pstring calling_name; static BOOL grepable=False; static char *cmdstr = NULL; @@ -132,9 +133,9 @@ } else { - d_printf("Workgroup: %s\n", lp_workgroup()); - strncpy(pWorkgroup, lp_workgroup(), maxLenWorkgroup - 1); - strncpy(authWorkgroup, lp_workgroup(), maxLenWorkgroup - 1); + d_printf("Workgroup: %s\n", workgroup); + strncpy(pWorkgroup, workgroup, maxLenWorkgroup - 1); + strncpy(authWorkgroup, workgroup, maxLenWorkgroup - 1); d_printf("Username: %s\n", username); strncpy(pUsername, username, maxLenUsername - 1); @@ -3662,6 +3663,7 @@ if ( strlen(new_workgroup) != 0 ) set_global_myworkgroup( new_workgroup ); + pstrcpy(workgroup, lp_workgroup()); if ( strlen(calling_name) != 0 ) set_global_myname( calling_name );
