Hi Andreas,

On 10/09/2014 10:30 PM, Andreas Krieger wrote:
> Hello,
>
> I still have problems with the Batch Processing.
>
> I have played with the file bpIssueCertificate a bit 
> (/opt/openca/ca/lib/openca/cmds/)
>  
> So the problem is at this code:
> ## loop
>     ## there can never be a request 0
>     my $key = 0;
I think this should be:

  my $key = -1;

because in the DBI module inside getNextItem there is a part which reads:

  if (defined $arguments{KEY} and $arguments{KEY} ne "-1" ) {
    $query .= " where ". ... and so on

so, if you set $key to -1 it uses a shorter query which finds all
entries and selects the first one out of that set - and if $key is
something else,  the query is appended by a selection of a particular
serial number or something, which jumps directly to the correct row.

>     while ($request = $db->getNextItem(DATATYPE => "APPROVED_REQUEST", KEY => 
> $key)) {
>
>     $key = $request->getSerial();
>
>
> Everything within the while loop is not executed. If I set 'my $key = 256' 
> which really exists then the while loop is executed and the Batch processing 
> tries to issue certificates which requests are not only have the status 
> approved.
> Requests with the status archived will also be issued which failes because 
> they are already issued.
>
> I have a frsh installed Debian stable, OpenCA-Base 1.5.1, OpenCA-Tools 1.3.1 
> and PostgreSQL 9.1
>
> Thanky for any help :)
>                                         
best regards,
Martin



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openca-Users mailing list
Openca-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openca-users

Reply via email to