From 54024f58261c64099b46a964a92b96e3e48bd1fe Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 18 Nov 2004 15:13:58 +0000 Subject: r3848: Fix for bug 2057. Only partially applied the patch, the second part seems not necessary. I'm using gcc 3.4.1, this does not detect the possibly uninitialized variable. Does anybody know how to get 3.4.1 to warn me? Volker (This used to be commit 8b6f8f93a0f30be0184e6044a499c1ef8f7b247e) --- source3/smbd/lanman.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index aeea9de9ca..5f4c0cec52 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -2146,6 +2146,12 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param goto out; } + snum = lp_servicenumber( sharename); + if (snum == -1) { + errcode = NERR_DestNotFound; + goto out; + } + errcode = NERR_notsupported; switch (function) { @@ -2971,6 +2977,7 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn,uint16 vuid, char *para if(!rap_to_pjobid(SVAL(p,0), sharename, &jobid)) return False; + snum = lp_servicenumber( sharename); if (snum < 0 || !VALID_SNUM(snum)) return(False); count = print_queue_status(snum,&queue,&status); -- cgit