Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/bgpstream_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ static int prefetch_record(bgpstream_reader_t *reader)
// try and get the next entry from the resource (will do filtering)
reader->status = bgpstream_format_populate_record(reader->format, record);

// exit with error in case of read error
if (reader->status == BGPSTREAM_FORMAT_READ_ERROR) {
return -1;
}

// if we got any of the non-error END_OF_DUMP messages but this is a stream
// resource, then pretend we're ok. but beware that now we'll be "OK", with
// an unfilled prefetch record
Expand Down
6 changes: 3 additions & 3 deletions lib/bgpstream_resource_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ struct res_list_elem {
/** Is the reader open? (i.e. have we waited for it to open) */
int open;

/** Time when this resource should next be polled (if 0 then poll
/** Time in ms when this resource should next be polled (if 0 then poll
immediately) */
uint32_t next_poll;
uint64_t next_poll;

/** Previous list elem */
struct res_list_elem *prev;
Expand Down Expand Up @@ -651,7 +651,7 @@ static bgpstream_reader_status_t pop_record(bgpstream_resource_mgr_t *q,
bgpstream_reader_status_t rs;
struct res_list_elem *el = NULL;
struct res_group *gp = NULL;
uint32_t now;
uint64_t now;
uint64_t sleep_nsec;
struct timespec rqtp;

Expand Down
2 changes: 1 addition & 1 deletion lib/formats/bs_format_rislive.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ bs_format_rislive_populate_record(bgpstream_format_t *format,
return BGPSTREAM_FORMAT_CORRUPTED_DUMP;
} else if (STATE->json_string_buffer_len == 0) {
// end of dump
return BGPSTREAM_FORMAT_END_OF_DUMP;
return BGPSTREAM_FORMAT_READ_ERROR;
}

if ((rc = bs_format_process_json_fields(format, record)) != 0) {
Expand Down