summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-16 07:38:45 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-16 07:38:45 +0000
commit2c80622a946a0e2ffe4b4b4ad3d3f5a203bdb0f3 (patch)
tree6120a355ab6b50d7b9f3d70800410dfbf6d55a0b
parent99acf45fa42f0fea2860f7aa0cd93fec90049f0f (diff)
downloadsamba-2c80622a946a0e2ffe4b4b4ad3d3f5a203bdb0f3.tar.gz
samba-2c80622a946a0e2ffe4b4b4ad3d3f5a203bdb0f3.tar.bz2
samba-2c80622a946a0e2ffe4b4b4ad3d3f5a203bdb0f3.zip
use some symbolic names for print queue status
(This used to be commit e8418ab73667e011b15e00a844240723ff4a8cd6)
-rw-r--r--source3/smbd/ipc.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 055b8344bb..4f87d632d2 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -531,6 +531,16 @@ static int check_printq_info(struct pack_desc* desc,
return True;
}
+
+#define JOB_STATUS_QUEUED 0
+#define JOB_STATUS_PAUSED 1
+#define JOB_STATUS_SPOOLING 2
+#define JOB_STATUS_PRINTING 3
+#define JOB_STATUS_PRINTED 4
+
+#define QUEUE_STATUS_PAUSED 1
+#define QUEUE_STATUS_ERROR 2
+
/* turn a print job status into a on the wire status
right now these are complete guesses - need to fill them in (tridge)
*/
@@ -538,15 +548,15 @@ static int printj_status(int v)
{
switch (v) {
case LPQ_QUEUED:
- return 0;
+ return JOB_STATUS_QUEUED;
case LPQ_PAUSED:
- return 1;
+ return JOB_STATUS_PAUSED;
case LPQ_SPOOLING:
- return 2;
+ return JOB_STATUS_SPOOLING;
case LPQ_PRINTING:
- return 3;
+ return JOB_STATUS_PRINTING;
}
- return 4;
+ return 0;
}
/* turn a print queue status into a on the wire status
@@ -558,13 +568,9 @@ static int printq_status(int v)
case LPQ_QUEUED:
return 0;
case LPQ_PAUSED:
- return 1;
- case LPQ_SPOOLING:
- return 2;
- case LPQ_PRINTING:
- return 3;
+ return QUEUE_STATUS_PAUSED;
}
- return 4;
+ return QUEUE_STATUS_ERROR;
}
static void fill_printjob_info(connection_struct *conn, int snum, int uLevel,