Use /usr/local/bin/lpq from CUPS for FreeBSD
for now; this prevents immediate dtprintinfo
crash.

In the future we should handle both built-in
/usr/bin/lpq as well as CUPS /usr/local/bin/lpq
output in separate functions.

Code to support CUPS should probably shared between
other operating systems.
---
 .../dtprintinfo/objects/PrintObj/ParseJobs.C       |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C 
b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
index 7a32fdf..c52d5b2 100644
--- a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
+++ b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
@@ -870,8 +870,10 @@ void LocalPrintJobs(char *printer, char **return_job_list, 
int *return_n_jobs)
 #if defined(__osf__)
    sprintf(buf, "lpstat -o%s", printer);
 #endif
-#if defined(linux) || defined(CSRG_BASED)
-   sprintf(buf, "lpq -P%s", printer);
+#if defined(linux) || defined(__OpenBSD__)
+   snprintf(buf, 1000, "lpq -P%s", printer);
+#elif defined(__FreeBSD__)
+   snprintf(buf, 1000, "/usr/local/bin/lpq -P%s", printer);
 #endif
 
    Invoke *_thread = new Invoke(buf, &output);
-- 
1.7.9.2


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to