From 2c80622a946a0e2ffe4b4b4ad3d3f5a203bdb0f3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 16 Apr 2000 07:38:45 +0000 Subject: use some symbolic names for print queue status (This used to be commit e8418ab73667e011b15e00a844240723ff4a8cd6) --- source3/smbd/ipc.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'source3/smbd/ipc.c') 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, -- cgit