summaryrefslogtreecommitdiff
path: root/source3/client/smbspool.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-10-27 00:52:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:04 -0500
commit6f12b26cb7d0137c087bf6bdc5919c3a98bdb67f (patch)
treefa0f2909c8fb47b456a3b868c56cd237abf80d3b /source3/client/smbspool.c
parentf8345c1b18904169666955c98474fa2d5894a007 (diff)
downloadsamba-6f12b26cb7d0137c087bf6bdc5919c3a98bdb67f.tar.gz
samba-6f12b26cb7d0137c087bf6bdc5919c3a98bdb67f.tar.bz2
samba-6f12b26cb7d0137c087bf6bdc5919c3a98bdb67f.zip
r3275: Fix from Michael Sweet <mike@easysw.com> for bug #1892.
Jeremy. (This used to be commit 13278744cce43060379b7bbebcdf90b41546d43d)
Diffstat (limited to 'source3/client/smbspool.c')
-rw-r--r--source3/client/smbspool.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index a67ccadb90..f838c5de5b 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -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);
}