svn commit: samba r16901 - in trunk/source: printing smbd
vlendec at samba.org
vlendec at samba.org
Sun Jul 9 14:03:34 GMT 2006
Author: vlendec
Date: 2006-07-09 14:03:34 +0000 (Sun, 09 Jul 2006)
New Revision: 16901
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16901
Log:
print_job_set_place and print_job_set_name do not use snum
Modified:
trunk/source/printing/printing.c
trunk/source/smbd/lanman.c
Changeset:
Modified: trunk/source/printing/printing.c
===================================================================
--- trunk/source/printing/printing.c 2006-07-09 13:56:11 UTC (rev 16900)
+++ trunk/source/printing/printing.c 2006-07-09 14:03:34 UTC (rev 16901)
@@ -1793,7 +1793,7 @@
Set the place in the queue for a job.
****************************************************************************/
-BOOL print_job_set_place(int snum, uint32 jobid, int place)
+BOOL print_job_set_place(const char *sharename, uint32 jobid, int place)
{
DEBUG(2,("print_job_set_place not implemented yet\n"));
return False;
@@ -1803,9 +1803,8 @@
Set the name of a job. Only possible for owner.
****************************************************************************/
-BOOL print_job_set_name(int snum, uint32 jobid, char *name)
+BOOL print_job_set_name(const char *sharename, uint32 jobid, char *name)
{
- const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
pjob = print_job_find(sharename, jobid);
Modified: trunk/source/smbd/lanman.c
===================================================================
--- trunk/source/smbd/lanman.c 2006-07-09 13:56:11 UTC (rev 16900)
+++ trunk/source/smbd/lanman.c 2006-07-09 14:03:34 UTC (rev 16901)
@@ -2546,7 +2546,6 @@
char *str2 = skip_string(str1,1);
char *p = skip_string(str2,1);
uint32 jobid;
- int snum;
fstring sharename;
int uLevel = SVAL(p,2);
int function = SVAL(p,4);
@@ -2560,9 +2559,9 @@
return False;
}
- if ( (snum = lp_servicenumber(sharename)) == -1 ) {
- DEBUG(0,("api_PrintJobInfo: unable to get service number from sharename [%s]\n",
- sharename));
+ if (!share_defined(sharename)) {
+ DEBUG(0,("api_PrintJobInfo: sharen [%s] not defined\n",
+ sharename));
return False;
}
@@ -2585,14 +2584,14 @@
/* change job place in the queue,
data gives the new place */
place = SVAL(data,0);
- if (print_job_set_place(snum, jobid, place)) {
+ if (print_job_set_place(sharename, jobid, place)) {
errcode=NERR_Success;
}
break;
case 0xb:
/* change print job name, data gives the name */
- if (print_job_set_name(snum, jobid, data)) {
+ if (print_job_set_name(sharename, jobid, data)) {
errcode=NERR_Success;
}
break;
More information about the samba-cvs
mailing list