summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-12-07 19:00:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:32 -0500
commit7ab25a7ae1eea978998cc9ccfd9596b7add33a8b (patch)
tree505a7ba26a18a2a2c0c7affde2ff27cafbd29590
parentacf9d61421faa6c0055d57fdee7db300dc5431aa (diff)
downloadsamba-7ab25a7ae1eea978998cc9ccfd9596b7add33a8b.tar.gz
samba-7ab25a7ae1eea978998cc9ccfd9596b7add33a8b.tar.bz2
samba-7ab25a7ae1eea978998cc9ccfd9596b7add33a8b.zip
r4089: fix logic error in add_a_form() that only compared N characters instead of the entire form name
(This used to be commit e3decbc441686486903a4863daa862ed1672e405)
-rw-r--r--source3/printing/nt_printing.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index b17ddb51ca..3ffedcf185 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -593,8 +593,7 @@ BOOL add_a_form(nt_forms_struct **list, const FORM *form, int *count)
unistr2_to_ascii(form_name, &form->name, sizeof(form_name)-1);
for (n=0; n<*count; n++) {
- if (!strncmp((*list)[n].name, form_name, strlen(form_name))) {
- DEBUG(103, ("NT workaround, [%s] already exists\n", form_name));
+ if ( strequal((*list)[n].name, form_name) ) {
update=True;
break;
}
@@ -618,6 +617,9 @@ BOOL add_a_form(nt_forms_struct **list, const FORM *form, int *count)
(*list)[n].right=form->right;
(*list)[n].bottom=form->bottom;
+ DEBUG(6,("add_a_form: Successfully %s form [%s]\n",
+ update ? "updated" : "added", form_name));
+
return True;
}