client.c: Made sure myhostname was initialised before substitutions.
[kai/samba.git] / source3 / client / client.c
index 329956ce94bdec3bdcf430eaf2e9843b21d16ff9..4718db84ac02587f72371db6252844374551167c 100644 (file)
@@ -34,6 +34,7 @@ pstring cd_path = "";
 pstring service="";
 pstring desthost="";
 extern pstring myname;
+extern pstring myhostname;
 pstring password = "";
 pstring username="";
 pstring workgroup="";
@@ -4625,6 +4626,11 @@ static void usage(char *pname)
 
   DEBUG(3,("%s client started (version %s)\n",timestring(),VERSION));
 
+  if(!get_myname(myhostname,NULL))
+  {
+    DEBUG(0,("Failed to get my hostname.\n"));
+  }
+
   if (!lp_load(servicesf,True)) {
     fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
   }