Skip to content

Commit

Permalink
convrnx: reinitialize the raw state between passes
Browse files Browse the repository at this point in the history
  • Loading branch information
ourairquality committed Aug 25, 2024
1 parent 33b8161 commit f3fbcf8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/convrnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,19 @@ static int convrnx_s(int sess, int format, rnxopt_t *opt, const char *file,
/* open stream file */
if (!open_strfile(str,epath[i])) continue;

if (str->format == STRFMT_RTCM2 || str->format == STRFMT_RTCM3) {
/* TODO ?? */
} else if (str->format <= MAXRCVFMT) {
/* Reinitialize the raw input state. */
free_raw(&str->raw);
if (!init_raw(&str->raw, str->format)) {
showmsg("reinit raw error");
for (int i = 0; i < MAXEXFILE; i++) free(epath[i]);
free_strfile(str);
return 0;
}
strcpy(str->raw.opt, opt->rcvopt);
}
/* input message */
for (j=0;(type=input_strfile(str))>=-1;j++) {

Expand Down

0 comments on commit f3fbcf8

Please sign in to comment.