diff options
author | Günther Deschner <gd@samba.org> | 2010-03-26 13:36:00 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-26 14:36:47 +0100 |
commit | dcec9322798ffb848ec70bae67220eb0526942ac (patch) | |
tree | 75d04e4ab87cf58ade882fcc96b05dd7dfd55652 | |
parent | 3da91b786ef87bd13ae1210a1bf671e2209d9c1f (diff) | |
download | samba-dcec9322798ffb848ec70bae67220eb0526942ac.tar.gz samba-dcec9322798ffb848ec70bae67220eb0526942ac.tar.bz2 samba-dcec9322798ffb848ec70bae67220eb0526942ac.zip |
s3-spoolss: return info for the correct printjob in _spoolss_GetJob().
Guenther
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 0cf1e13328..bb14c597da 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8481,9 +8481,10 @@ static WERROR getjob_level_1(TALLOC_CTX *mem_ctx, int i = 0; bool found = false; - for (i=0; i<count && found == false; i++) { + for (i=0; i<count; i++) { if (queue[i].job == (int)jobid) { found = true; + break; } } @@ -8494,7 +8495,7 @@ static WERROR getjob_level_1(TALLOC_CTX *mem_ctx, return fill_job_info1(mem_ctx, r, - &queue[i-1], + &queue[i], i, snum, ntprinter); @@ -8516,9 +8517,10 @@ static WERROR getjob_level_2(TALLOC_CTX *mem_ctx, NT_DEVICEMODE *nt_devmode; WERROR result; - for (i=0; i<count && found == false; i++) { + for (i=0; i<count; i++) { if (queue[i].job == (int)jobid) { found = true; + break; } } @@ -8549,7 +8551,7 @@ static WERROR getjob_level_2(TALLOC_CTX *mem_ctx, return fill_job_info2(mem_ctx, r, - &queue[i-1], + &queue[i], i, snum, ntprinter, |