r4089: fix logic error in add_a_form() that only compared N characters instead of...
[samba.git] / source3 / printing / nt_printing.c
index b17ddb51caf5c346e0f074966a3bd8190d0c6d45..3ffedcf1858cebf7f1909aac43cee9c4e0f461e2 100644 (file)
@@ -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;
 }