summaryrefslogtreecommitdiff
path: root/isgps.c
diff options
context:
space:
mode:
Diffstat (limited to 'isgps.c')
-rw-r--r--isgps.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/isgps.c b/isgps.c
index dcec5d0c..2d9438b7 100644
--- a/isgps.c
+++ b/isgps.c
@@ -141,7 +141,7 @@ unsigned int isgps_parity(isgps30bits_t th)
/*@ -charint @*/
#ifdef __UNUSED__
- gpsd_report(errout, ISGPS_ERRLEVEL_BASE + 2, "ISGPS parity %u\n", p);
+ gpsd_log(errout, ISGPS_ERRLEVEL_BASE + 2, "ISGPS parity %u\n", p);
#endif /* __UNUSED__ */
return (p);
}
@@ -186,8 +186,8 @@ enum isgpsstat_t isgps_decode(struct gps_lexer_t *lexer,
{
/* ASCII characters 64-127, @ through DEL */
if ((c & MAG_TAG_MASK) != MAG_TAG_DATA) {
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
- "ISGPS word tag not correct, skipping byte\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
+ "ISGPS word tag not correct, skipping byte\n");
return ISGPS_SKIP;
}
@@ -206,19 +206,19 @@ enum isgpsstat_t isgps_decode(struct gps_lexer_t *lexer,
lexer->isgps.curr_word |=
c >> -(lexer->isgps.curr_offset);
}
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
- "ISGPS syncing at byte %lu: 0x%08x\n",
- lexer->char_counter, lexer->isgps.curr_word);
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
+ "ISGPS syncing at byte %lu: 0x%08x\n",
+ lexer->char_counter, lexer->isgps.curr_word);
if (preamble_match(&lexer->isgps.curr_word)) {
if (isgps_parityok(lexer->isgps.curr_word)) {
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
- "ISGPS preamble ok, parity ok -- locked\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
+ "ISGPS preamble ok, parity ok -- locked\n");
lexer->isgps.locked = true;
break;
}
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
- "ISGPS preamble ok, parity fail\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
+ "ISGPS preamble ok, parity fail\n");
}
lexer->isgps.curr_offset++;
} /* end while */
@@ -246,16 +246,16 @@ enum isgpsstat_t isgps_decode(struct gps_lexer_t *lexer,
* another preamble pattern in the data stream. -wsr
*/
if (preamble_match(&lexer->isgps.curr_word)) {
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
- "ISGPS preamble spotted (index: %u)\n",
- lexer->isgps.bufindex);
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
+ "ISGPS preamble spotted (index: %u)\n",
+ lexer->isgps.bufindex);
lexer->isgps.bufindex = 0;
}
#endif
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
- "ISGPS processing word %u (offset %d)\n",
- lexer->isgps.bufindex,
- lexer->isgps.curr_offset);
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
+ "ISGPS processing word %u (offset %d)\n",
+ lexer->isgps.bufindex,
+ lexer->isgps.curr_offset);
{
/*
* Guard against a buffer overflow attack. Just wait for
@@ -263,8 +263,8 @@ enum isgpsstat_t isgps_decode(struct gps_lexer_t *lexer,
*/
if (lexer->isgps.bufindex >= (unsigned)maxlen) {
lexer->isgps.bufindex = 0;
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
- "ISGPS buffer overflowing -- resetting\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
+ "ISGPS buffer overflowing -- resetting\n");
return ISGPS_NO_SYNC;
}
@@ -274,8 +274,8 @@ enum isgpsstat_t isgps_decode(struct gps_lexer_t *lexer,
/* *INDENT-OFF* */
if ((lexer->isgps.bufindex == 0) &&
!preamble_match((isgps30bits_t *) lexer->isgps.buf)) {
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
- "ISGPS word 0 not a preamble- punting\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
+ "ISGPS word 0 not a preamble- punting\n");
return ISGPS_NO_SYNC;
}
/* *INDENT-ON* */
@@ -298,22 +298,22 @@ enum isgpsstat_t isgps_decode(struct gps_lexer_t *lexer,
c >> -(lexer->isgps.curr_offset);
}
} else {
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 0,
- "ISGPS parity failure, lost lock\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 0,
+ "ISGPS parity failure, lost lock\n");
lexer->isgps.locked = false;
}
}
lexer->isgps.curr_offset -= 6;
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
- "ISGPS residual %d\n",
- lexer->isgps.curr_offset);
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 2,
+ "ISGPS residual %d\n",
+ lexer->isgps.curr_offset);
return res;
}
/*@ +shiftnegative @*/
/* never achieved lock */
- gpsd_report(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
- "ISGPS lock never achieved\n");
+ gpsd_log(&lexer->errout, ISGPS_ERRLEVEL_BASE + 1,
+ "ISGPS lock never achieved\n");
return ISGPS_NO_SYNC;
}