summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-06-30 13:12:01 +0200
committerGünther Deschner <gd@samba.org>2009-06-30 13:34:51 +0200
commitb85b93dcff89e18bd15d4cef8b8c2dc61bc42cbe (patch)
treeb59039e7458a75a5b5a21fb885071f489b1ea499
parente7d72b585a09f6b43df0f38ff20c74050069fb60 (diff)
downloadsamba-b85b93dcff89e18bd15d4cef8b8c2dc61bc42cbe.tar.gz
samba-b85b93dcff89e18bd15d4cef8b8c2dc61bc42cbe.tar.bz2
samba-b85b93dcff89e18bd15d4cef8b8c2dc61bc42cbe.zip
s3-spoolss: Bug #6512. Fix support for enumerating user forms.
Found while testing Xerox WorkCentre 133 PCL driver, now also tested with torture test. Guenther
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 899fed2167..1ea92b4d28 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7087,7 +7087,7 @@ static WERROR spoolss_enumforms_level1(TALLOC_CTX *mem_ctx,
/* construct the list of form structures */
for (i=0; i<num_builtin_forms; i++) {
- DEBUGADD(6,("Filling form number [%d]\n",i));
+ DEBUGADD(6,("Filling builtin form number [%d]\n",i));
result = fill_form_info_1(info, &info[i].info1,
&builtin_forms[i]);
if (!W_ERROR_IS_OK(result)) {
@@ -7095,10 +7095,10 @@ static WERROR spoolss_enumforms_level1(TALLOC_CTX *mem_ctx,
}
}
- for (; i<num_user_forms; i++) {
- DEBUGADD(6,("Filling form number [%d]\n",i));
- result = fill_form_info_1(info, &info[i].info1,
- &user_forms[i-num_builtin_forms]);
+ for (i=0; i<num_user_forms; i++) {
+ DEBUGADD(6,("Filling user form number [%d]\n",i));
+ result = fill_form_info_1(info, &info[i+num_builtin_forms].info1,
+ &user_forms[i]);
if (!W_ERROR_IS_OK(result)) {
goto out;
}