diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-04-18 10:55:19 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-04-18 10:55:19 -0400 |
commit | a6d4b2465ace7dfc0ab10668e4ec5de5fa0cc5d8 (patch) | |
tree | 2279d2ffe38b191e000c717c9bbdc8aa8534c13d /gpsmon.c | |
parent | 31bc58a3d9c8fdb9e0ba601b969903d993fbd459 (diff) | |
download | gpsd-a6d4b2465ace7dfc0ab10668e4ec5de5fa0cc5d8.tar.gz |
Make gpsmon work again. Compare drivers by name rather than structure address.
I'm not sure I understand the bug this is fixing. It looks as though
the new build has made the location of driver pointers unstable? Perhaps
this has something to do with different handling of shared libraries.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -405,9 +405,12 @@ static bool switch_type(const struct gps_type_t *devtype) { const struct monitor_object_t **trial, **newobject; newobject = NULL; - for (trial = monitor_objects; *trial; trial++) - if ((*trial)->driver == devtype) + for (trial = monitor_objects; *trial; trial++) { + if (strcmp((*trial)->driver->type_name, devtype->type_name)==0) { newobject = trial; + break; + } + } if (newobject) { int leftover; if (LINES < (*newobject)->min_y + 1 || COLS < (*newobject)->min_x) { |