summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorMichael Tatarinov <kukabu@gmail.com>2013-11-12 12:17:47 +0400
committerEric S. Raymond <esr@thyrsus.com>2013-11-12 03:20:21 -0500
commit1c7129dab44b507e907720232c2c97fa19de49e5 (patch)
treef4e1cd704b959f74f29e71d382309b776454b55a /ppsthread.c
parent8b83e44880b90f60cd9cf9c8a0039bb090fff05d (diff)
downloadgpsd-1c7129dab44b507e907720232c2c97fa19de49e5.tar.gz
Remove more duplicative logging.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ppsthread.c b/ppsthread.c
index b435dc19..8f7c19c9 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -205,9 +205,6 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
#endif /* S_SPLINT_S */
#endif /* defined(HAVE_SYS_TIMEPPS_H) */
- gpsd_report(session->context->debug, LOG_PROG,
- "PPS Create Thread gpsd_ppsmonitor\n");
-
/*
* Wait for status change on any handshake line. The only assumption here
* is that no GPS lights up more than one of these pins. By waiting on
@@ -529,6 +526,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
void pps_thread_activate(struct gps_device_t *session)
/* activate a thread to watch the device's PPS transitions */
{
+ int retval;
pthread_t pt;
#if defined(HAVE_SYS_TIMEPPS_H)
/* some operations in init_kernel_pps() require root privs */
@@ -539,9 +537,10 @@ void pps_thread_activate(struct gps_device_t *session)
}
#endif
/*@-compdef -nullpass@*/
- (void)pthread_create(&pt, NULL, gpsd_ppsmonitor, (void *)session);
+ retval = pthread_create(&pt, NULL, gpsd_ppsmonitor, (void *)session);
/*@+compdef +nullpass@*/
- gpsd_report(session->context->debug, LOG_PROG, "PPS thread launched\n");
+ gpsd_report(session->context->debug, LOG_PROG, "PPS thread %s\n",
+ (retval==0) ? "launched" : "FAILED");
}
void pps_thread_deactivate(struct gps_device_t *session)