summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-02-23 03:59:37 +0000
committerJeremy Allison <jra@samba.org>2001-02-23 03:59:37 +0000
commited77fca1990f96dba6fe9204e551056395c6ed29 (patch)
tree955f1e173e91fbccb9a7325567373fe708640fac /source3/rpc_server/srv_spoolss_nt.c
parent7bab8111d2b1668495b8e0411fa1de6b174aacdc (diff)
downloadsamba-ed77fca1990f96dba6fe9204e551056395c6ed29.tar.gz
samba-ed77fca1990f96dba6fe9204e551056395c6ed29.tar.bz2
samba-ed77fca1990f96dba6fe9204e551056395c6ed29.zip
include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.
include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We need these to be different as we're storing LPQ_xx enums in the tdb already. rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now returning status codes. smbd/lanman.c: Change the RAP status codes to have "RAP" in the name. printing/printing.c: Keep track of the status of a job. Allow a job to be deleted from one smbd when being submitted by another. Made logic in mutex clearer. Jeremy. (This used to be commit 71029da7dd74eb91dd6953752bdf238f319d985d)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c36
1 files changed, 31 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 05fbbca0f3..d5f0703e03 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -45,7 +45,7 @@ typedef struct _Printer{
BOOL open;
BOOL document_started;
BOOL page_started;
- int jobid; /* jobid in printing backend */
+ int jobid; /* jobid in printing backend */
POLICY_HND printer_hnd;
BOOL printer_type;
union {
@@ -90,12 +90,30 @@ static uint32 smb_connections=0;
static int nt_printj_status(int v)
{
switch (v) {
- case LPQ_PAUSED:
- return PRINTER_STATUS_PAUSED;
case LPQ_QUEUED:
+ return 0;
+ case LPQ_PAUSED:
+ return JOB_STATUS_PAUSED;
case LPQ_SPOOLING:
+ return JOB_STATUS_SPOOLING;
case LPQ_PRINTING:
- return 0;
+ return JOB_STATUS_PRINTING;
+ case LPQ_ERROR:
+ return JOB_STATUS_ERROR;
+ case LPQ_DELETING:
+ return JOB_STATUS_DELETING;
+ case LPQ_OFFLINE:
+ return JOB_STATUS_OFFLINE;
+ case LPQ_PAPEROUT:
+ return JOB_STATUS_PAPEROUT;
+ case LPQ_PRINTED:
+ return JOB_STATUS_PRINTED;
+ case LPQ_DELETED:
+ return JOB_STATUS_DELETED;
+ case LPQ_BLOCKED:
+ return JOB_STATUS_BLOCKED;
+ case LPQ_USER_INTERVENTION:
+ return JOB_STATUS_USER_INTERVENTION;
}
return 0;
}
@@ -1785,10 +1803,17 @@ static void spoolss_notify_job_status_string(int snum,
NT_PRINTER_INFO_LEVEL *printer,
TALLOC_CTX *mem_ctx)
{
- char *p = "unknown";
+ /*
+ * Now we're returning job status codes we just return a "" here. JRA.
+ */
+
+ char *p = "";
pstring temp;
uint32 len;
+#if 0 /* NO LONGER NEEDED - JRA. 02/22/2001 */
+ p = "unknown";
+
switch (queue->status) {
case LPQ_QUEUED:
p = "Queued";
@@ -1803,6 +1828,7 @@ static void spoolss_notify_job_status_string(int snum,
p = "Printing";
break;
}
+#endif /* NO LONGER NEEDED. */
len = (uint32)dos_PutUniCode(temp, p, sizeof(temp) - 2, True);