]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r3275: Fix from Michael Sweet <mike@easysw.com> for bug #1892.
authorJeremy Allison <jra@samba.org>
Wed, 27 Oct 2004 00:52:12 +0000 (00:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:04 +0000 (10:53 -0500)
Jeremy.

source/client/smbspool.c

index a67ccadb90b45e460eddebecbd6854964da29460..f838c5de5bfd79e911e6b4ebeaf228106ad1e1d5 100644 (file)
@@ -118,13 +118,13 @@ static int                smb_print(struct cli_state *, char *, FILE *);
   * Find the URI...
   */
 
-  if (strncmp(argv[0], "smb://", 6) == 0)
-    strncpy(uri, argv[0], sizeof(uri) - 1);
-  else if (getenv("DEVICE_URI") != NULL)
+  if (getenv("DEVICE_URI") != NULL)
     strncpy(uri, getenv("DEVICE_URI"), sizeof(uri) - 1);
+  else if (strncmp(argv[0], "smb://", 6) == 0)
+    strncpy(uri, argv[0], sizeof(uri) - 1);
   else
   {
-    fputs("ERROR: No device URI found in argv[0] or DEVICE_URI environment variable!\n", stderr);
+    fputs("ERROR: No device URI found in DEVICE_URI environment variable or argv[0] !\n", stderr);
     return (1);
   }