Author: jra Date: 2004-10-27 00:51:57 +0000 (Wed, 27 Oct 2004) New Revision: 3274
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/client&rev=3274&nolog=1 Log: Fix from Michael Sweet <[EMAIL PROTECTED]> for bug #1892. Jeremy. Modified: trunk/source/client/smbspool.c Changeset: Modified: trunk/source/client/smbspool.c =================================================================== --- trunk/source/client/smbspool.c 2004-10-27 00:41:41 UTC (rev 3273) +++ trunk/source/client/smbspool.c 2004-10-27 00:51:57 UTC (rev 3274) @@ -118,13 +118,13 @@ * Find the URI... */ - if (strncmp(argv[0], "smb://", 6) == 0) + 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 if (getenv("DEVICE_URI") != NULL) - strncpy(uri, getenv("DEVICE_URI"), 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); }