~foxtrotgps-team/foxtrotgps/trunk

« back to all changes in this revision

Viewing changes to src/tracks.c

  • Committer: Paul Wise
  • Author(s): Jesse Gardner
  • Date: 2021-08-17 06:01:48 UTC
  • Revision ID: pabs3@bonedaddy.net-20210817060148-340rbstk87jrj6zw
Added g_thread_unref wherever g_thead_new is used

Fixes: https://bazaar.launchpad.net/~foxtrotgps-team/foxtrotgps/trunk/revision/315
Cleanup-by: Paul Wise <pabs3@bonedaddy.net>

Show diffs side-by-side

added added

removed removed

Lines of Context:
865
865
 
866
866
        url = g_strdup_printf("http://www.yournavigation.org/api/1.0/gosmore.php?format=kml&flat=%s&flon=%s&tlat=%s&tlon=%s&v=motorcar&fast=1&layer=mapnik",startlatstr, startlonstr, endlatstr, endlonstr);
867
867
#if GLIB_CHECK_VERSION(2,34,0)
868
 
        if (!g_thread_new("fetch track thread", &fetch_track_thread, (void *)url) != 0)
 
868
        GThread *gt = g_thread_new("fetch track thread", &fetch_track_thread, (void *)url);
 
869
        if (gt != 0)
 
870
                g_thread_unref(gt);
 
871
        else
869
872
#else
870
873
        if (!g_thread_create(&fetch_track_thread, (void *)url, FALSE, NULL) != 0)
871
874
#endif
933
936
        urlAndRequest[1] = request;
934
937
 
935
938
#if GLIB_CHECK_VERSION(2,34,0)
936
 
        if (!g_thread_new("fetch open route thread", &fetch_openrouteservice_track_thread, (void *)urlAndRequest) != 0)
 
939
        GThread *gt =g_thread_new("fetch open route thread", &fetch_openrouteservice_track_thread, (void *)urlAndRequest);
 
940
        if (gt != 0)
 
941
                g_thread_unref(gt);
 
942
        else
937
943
#else
938
944
        if (!g_thread_create(&fetch_openrouteservice_track_thread, (void *)urlAndRequest, FALSE, NULL) != 0)
939
945
#endif