summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>1998-01-01 13:55:28 +0000
committerHerb Lewis <herb@samba.org>1998-01-01 13:55:28 +0000
commit0a5073e985847acac11979771bdc04308a903107 (patch)
treeee12645c7a3a44a0e2599f9bb8cec41d4e2cc332 /source3/smbd
parent6e329c6a4b19226dca624bf10eeae23ca856137b (diff)
downloadsamba-0a5073e985847acac11979771bdc04308a903107.tar.gz
samba-0a5073e985847acac11979771bdc04308a903107.tar.bz2
samba-0a5073e985847acac11979771bdc04308a903107.zip
fixes to make_printerdef.c to generate a correct printers.def file
changes to ipc.c to use new printers.def file (This used to be commit 52e275c4ccc1b7f0c2ef8d12d28065898a1c89c9)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c49
1 files changed, 37 insertions, 12 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 50ad831eb3..af1c928ba2 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -594,7 +594,7 @@ static void fill_printq_info(int cnum, int snum, int uLevel,
if (uLevel==52) {
int i,ok=0;
- pstring tok,driver,short_name;
+ pstring tok,driver,datafile, langmon, helpfile, datatype;
char *p,*q;
FILE *f;
pstring fname;
@@ -621,33 +621,58 @@ static void fill_printq_info(int cnum, int snum, int uLevel,
fclose(f);
- next_token(&p,short_name,":");
- next_token(&p,driver,":");
+ next_token(&p,driver,":"); /* driver file name */
+ next_token(&p,datafile,":"); /* data file name */
+/*
+ * for the next tokens - which may be empty - I have to check for empty
+ * tokens first because the next_token function will skip all empty
+ * token fields
+ */
+ if (*p == ':') {
+ *helpfile = '\0';
+ p++;
+ }else
+ next_token(&p,helpfile,":"); /* help file */
+ if (*p == ':') {
+ *langmon = '\0';
+ p++;
+ }else
+ next_token(&p,langmon,":"); /* language monitor */
+
+ next_token(&p,datatype,":"); /* default data type */
PACKI(desc,"W",0x0400); /* don't know */
- PACKS(desc,"z",lp_printerdriver(snum)); /* long printer name */
+ PACKS(desc,"z",lp_printerdriver(snum)); /* long printer name */
if (ok)
{
- PACKS(desc,"z",driver); /* Driver Name */
- PACKS(desc,"z",short_name); /* short printer name */
+ PACKS(desc,"z",driver); /* Driverfile Name */
+ PACKS(desc,"z",datafile); /* Datafile name */
+ PACKS(desc,"z",langmon); /* language monitor */
DEBUG(3,("Driver:%s:\n",driver));
- DEBUG(3,("short name:%s:\n",short_name));
+ DEBUG(3,("Data File:%s:\n",datafile));
+ DEBUG(3,("Language Monitor:%s:\n",langmon));
}
else
{
PACKS(desc,"z","");
PACKS(desc,"z","");
+ PACKS(desc,"z","");
}
- PACKS(desc,"z","");
PACKS(desc,"z",lp_driverlocation(snum)); /* share to retrieve files */
- PACKS(desc,"z","EMF");
- PACKS(desc,"z","");
- if (ok)
+ if (ok) {
+ PACKS(desc,"z",datatype); /* default data type */
+ PACKS(desc,"z",helpfile); /* helpfile name */
PACKS(desc,"z",driver); /* driver name */
- else
+ DEBUG(3,("Data Type:%s:\n",datatype));
+ DEBUG(3,("Help File:%s:\n",helpfile));
+ }
+ else {
+ PACKS(desc,"z","RAW");
PACKS(desc,"z","");
+ PACKS(desc,"z","");
+ }
PACKI(desc,"N",count); /* number of files to copy */
for (i=0;i<count;i++)
{