summaryrefslogtreecommitdiffstats
path: root/source3/printing
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-08 00:04:27 +0100
committerGünther Deschner <gd@samba.org>2009-02-09 10:42:12 +0100
commit3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0 (patch)
treea2b0e52f3eb34e0d4b1beea520b260bcef6c0721 /source3/printing
parent5234f5e433847e6efd29e0c4a7d76a491818a92a (diff)
downloadsamba-3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0.tar.gz
samba-3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0.tar.xz
samba-3a1f9411e588742cb2d9dbb6f8edc1b78893fbd0.zip
s3-spoolss: use pidl for spoolss_AddForm.
Guenther
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index da31945ed0..70c5864535 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -893,11 +893,10 @@ int write_ntforms(nt_forms_struct **list, int number)
/****************************************************************************
add a form struct at the end of the list
****************************************************************************/
-bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
+bool add_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int *count)
{
int n=0;
bool update;
- fstring form_name;
/*
* NT tries to add forms even when
@@ -906,10 +905,9 @@ bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
*/
update=False;
-
- unistr2_to_ascii(form_name, &form->name, sizeof(form_name));
+
for (n=0; n<*count; n++) {
- if ( strequal((*list)[n].name, form_name) ) {
+ if ( strequal((*list)[n].name, form->form_name) ) {
update=True;
break;
}
@@ -920,20 +918,20 @@ bool add_a_form(nt_forms_struct **list, const FORM *form, int *count)
DEBUG(0,("add_a_form: failed to enlarge forms list!\n"));
return False;
}
- unistr2_to_ascii((*list)[n].name, &form->name, sizeof((*list)[n].name));
+ fstrcpy((*list)[n].name, form->form_name);
(*count)++;
}
-
- (*list)[n].flag=form->flags;
- (*list)[n].width=form->size_x;
- (*list)[n].length=form->size_y;
- (*list)[n].left=form->left;
- (*list)[n].top=form->top;
- (*list)[n].right=form->right;
- (*list)[n].bottom=form->bottom;
+
+ (*list)[n].flag = form->flags;
+ (*list)[n].width = form->size.width;
+ (*list)[n].length = form->size.height;
+ (*list)[n].left = form->area.left;
+ (*list)[n].top = form->area.top;
+ (*list)[n].right = form->area.right;
+ (*list)[n].bottom = form->area.bottom;
DEBUG(6,("add_a_form: Successfully %s form [%s]\n",
- update ? "updated" : "added", form_name));
+ update ? "updated" : "added", form->form_name));
return True;
}