diff --git a/src/convrnx.c b/src/convrnx.c index 61b901677..f57365ead 100644 --- a/src/convrnx.c +++ b/src/convrnx.c @@ -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++) {