Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. sysmobts_mgr: Add support for gpsd < 2.96 This allows running sysmobts-mgr on systems with old gpsd releases (which may have other software depending on such old release). GPSD_API_MAJOR_VERSION define was first added in gpsd 2.39, before that it didn't exist (but this code is known to work against 2.38). GPSD_API_MAJOR_VERSION == 5 was set in version 2.96. Related gpsd commits: 3771dba081bd1175adab6096d7b6270d3822aaa1 e69bcb6b01af6b25c6a525fb1961b92ac04f5213 Related: SYS#4290 Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b --- M src/osmo-bts-sysmo/misc/sysmobts_mgr.h M src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c 2 files changed, 21 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Stefan Sperling: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h index b62707c..668263d 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.h @@ -9,6 +9,10 @@ #include +#if !defined(GPSD_API_MAJOR_VERSION) || GPSD_API_MAJOR_VERSION < 5 +#define USE_GPSD2_API 1 +#endif + #include enum { @@ -97,7 +101,9 @@ int gps_open; struct osmo_fd gpsfd; struct gps_data_t *gpsdata; +#if !USE_GPSD2_API struct gps_data_t gpsdata_buf; +#endif struct osmo_timer_list fix_timeout; /* Loop/Re-try control */ diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c index c3e821e..a0ba649 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c @@ -59,8 +59,10 @@ static inline int compat_gps_read(struct gps_data_t *data) { +#if USE_GPSD2_API + return gps_poll(data); /* API break in gpsd 6bba8b329fc7687b15863d30471d5af402467802 */ -#if GPSD_API_MAJOR_VERSION >= 7 && GPSD_API_MINOR_VERSION >= 0 +#elif GPSD_API_MAJOR_VERSION >= 7 && GPSD_API_MINOR_VERSION >= 0 return gps_read(data, NULL, 0); #else return gps_read(data); @@ -87,7 +89,9 @@ osmo_fd_unregister(>calib.gpsfd); gps_close(mgr->calib.gpsdata); +#if !USE_GPSD2_API memset(mgr->calib.gpsdata, 0, sizeof(*(mgr->calib.gpsdata))); +#endif mgr->calib.gps_open = 0; } @@ -143,8 +147,13 @@ { int rc; +#if USE_GPSD2_API + mgr->calib.gpsdata = gps_open("localhost", DEFAULT_GPSD_PORT); + rc = mgr->calib.gpsdata ? 0 : -1; +#else mgr->calib.gpsdata = >calib.gpsdata_buf; rc = gps_open("localhost", DEFAULT_GPSD_PORT, mgr->calib.gpsdata); +#endif if (rc != 0) { LOGP(DCALIB, LOGL_ERROR, "Failed to connect to GPS %d\n", rc); calib_state_reset(mgr, CALIB_FAIL_GPS); @@ -152,8 +161,12 @@ } mgr->calib.gps_open = 1; - gps_stream(mgr->calib.gpsdata, WATCH_ENABLE, NULL); +#if USE_GPSD2_API + gps_query(mgr->calib.gpsdata, "w+x"); +#else + gps_stream(mgr->calib.gpsdata, WATCH_ENABLE, NULL); +#endif mgr->calib.gpsfd.data = mgr; mgr->calib.gpsfd.cb = mgr_gps_read; mgr->calib.gpsfd.when = BSC_FD_READ | BSC_FD_EXCEPT; -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 5 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Comment-Date: Tue, 18 Dec 2018 20:27:26 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Stefan Sperling has posted comments on this change. ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. Patch Set 4: Code-Review+1 Silly of them to break the API without backwards compat... -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Comment-Date: Tue, 18 Dec 2018 17:29:46 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12340 to look at the new patch set (#4). Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. sysmobts_mgr: Add support for gpsd < 2.96 This allows running sysmobts-mgr on systems with old gpsd releases (which may have other software depending on such old release). GPSD_API_MAJOR_VERSION define was first added in gpsd 2.39, before that it didn't exist (but this code is known to work against 2.38). GPSD_API_MAJOR_VERSION == 5 was set in version 2.96. Related gpsd commits: 3771dba081bd1175adab6096d7b6270d3822aaa1 e69bcb6b01af6b25c6a525fb1961b92ac04f5213 Related: SYS#4290 Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b --- M src/osmo-bts-sysmo/misc/sysmobts_mgr.h M src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c 2 files changed, 21 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/12340/4 -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 4 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. Patch Set 3: Code-Review+2 I really have no understanding about GPSD protocol/API changes. But assuming you have tested this... -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 18 Dec 2018 13:32:43 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. Patch Set 3: Code-Review+1 don't know anything about this, but it looks sane to me -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Tue, 18 Dec 2018 13:22:28 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. Patch Set 3: Tested it builds fine against gpsd 2.38. -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 17 Dec 2018 17:49:39 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Pau Espin Pedrol has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. sysmobts_mgr: Add support for gpsd < 2.96 This allows running sysmobts-mgr on systems with old gpsd releases (which may have other software depending on such old release). GPSD_API_MAJOR_VERSION define was first added in gpsd 2.39, before that it didn't exist (but this code is known to work against 2.38). GPSD_API_MAJOR_VERSION == 5 was set in version 2.96. Related gpsd commits: 3771dba081bd1175adab6096d7b6270d3822aaa1 e69bcb6b01af6b25c6a525fb1961b92ac04f5213 Related: SYS#4290 Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b --- M src/osmo-bts-sysmo/misc/sysmobts_mgr.h M src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c 2 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/12340/3 -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 3 Gerrit-Owner: Pau Espin Pedrol
Change in osmo-bts[master]: sysmobts_mgr: Add support for gpsd < 2.96
Pau Espin Pedrol has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/12340 ) Change subject: sysmobts_mgr: Add support for gpsd < 2.96 .. sysmobts_mgr: Add support for gpsd < 2.96 This allows running sysmobts-mgr on systems with old gpsd releases (which may have other software depending on such old release). GPSD_API_MAJOR_VERSION define was first added in gpsd 2.39, before that it didn't exist (but this code is known to work against 2.38). GPSD_API_MAJOR_VERSION == 5 was set in version 2.96. Related gpsd commits: 3771dba081bd1175adab6096d7b6270d3822aaa1 e69bcb6b01af6b25c6a525fb1961b92ac04f5213 Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b --- M src/osmo-bts-sysmo/misc/sysmobts_mgr.h M src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c 2 files changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/12340/2 -- To view, visit https://gerrit.osmocom.org/12340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If3c35021a020a61d5fa3cde5eebcd09908db822b Gerrit-Change-Number: 12340 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol