- my($conn, $state, $rs, $event) = @_;
- print $conn->option("host"), ": found ", $rs->size(), " records\n";
- $state->{next_to_fetch} = 0;
- $state->{next_to_show} = 0;
- request_record($conn, $rs, $state);
+ my($conn, $arg, $rs, $event) = @_;
+
+ my $host = $conn->option("host");
+ print "$host : found ", $rs->size(), " records\n";
+ my %state = (next_to_show => 0, next_to_fetch => 0);
+ request_records($conn, $rs, \%state, 2);
+ $arg->{$host} = \%state;