location-source: Avoid repeating location updates
Extra callbacks are attached to the "fix-*" signals of physical sources when multiple clients use the same source. Clients then receive the same location update multiple times. This is caused by an incorrect return value in GClueLocationSource.start_source().
This MR fixes the return value and adds some comments to the code on the return value purpose. It also removes the function gclue_web_source_start() from gclue-web-source.c which apparently does not do anything.
Log snippets before the patch with GPS clients:
One client:
Oct 01 09:53:09 mobian geoclue[80028]: New GPGGA trace: $GPGGA,<scrubbed>
Oct 01 09:53:09 mobian geoclue[80028]: GClueModemGPS got new heading 0.000000
Oct 01 09:53:09 mobian geoclue[80028]: New location available
Two clients:
Oct 01 09:43:14 mobian geoclue[80028]: New GPGGA trace: $GPGGA,<scrubbed>
Oct 01 09:43:14 mobian geoclue[80028]: GClueModemGPS got new heading 0.000000
Oct 01 09:43:14 mobian geoclue[80028]: New location available
Oct 01 09:43:14 mobian geoclue[80028]: New location available
Oct 01 09:43:14 mobian geoclue[80028]: GClueModemGPS got new heading 0.000000
Oct 01 09:43:14 mobian geoclue[80028]: New location available
Oct 01 09:43:14 mobian geoclue[80028]: New location available
Three clients:
Oct 01 09:47:33 mobian geoclue[80028]: New GPGGA trace: $GPGGA,<scrubbed>
Oct 01 09:47:33 mobian geoclue[80028]: GClueModemGPS got new heading 0.000000
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: GClueModemGPS got new heading 0.000000
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: GClueModemGPS got new heading 0.000000
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: New location available
Oct 01 09:47:33 mobian geoclue[80028]: New location available
After patching:
One client:
Oct 01 09:56:15 mobian geoclue[83465]: New GPGGA trace: $GPGGA,<scrubbed>
Oct 01 09:56:15 mobian geoclue[83465]: GClueModemGPS got new heading 0.000000
Oct 01 09:56:15 mobian geoclue[83465]: New location available
Two clients:
Oct 01 09:57:49 mobian geoclue[83465]: New GPGGA trace: $GPGGA,<scrubbed>
Oct 01 09:57:49 mobian geoclue[83465]: GClueModemGPS got new heading 0.000000
Oct 01 09:57:49 mobian geoclue[83465]: New location available
Oct 01 09:57:49 mobian geoclue[83465]: New location available
Three clients:
Oct 01 10:00:41 mobian geoclue[83465]: New GPGGA trace: $GPGGA,<scrubbed>
Oct 01 10:00:41 mobian geoclue[83465]: GClueModemGPS got new heading 0.000000
Oct 01 10:00:41 mobian geoclue[83465]: New location available
Oct 01 10:00:41 mobian geoclue[83465]: New location available
Oct 01 10:00:41 mobian geoclue[83465]: New location available