~foxtrotgps-team/foxtrotgps/trunk

« back to all changes in this revision

Viewing changes to src/friends.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:
104
104
        gtk_label_set_label (label_msg, _("Connecting..."));
105
105
 
106
106
#if GLIB_CHECK_VERSION(2,34,0)
107
 
        if (!g_thread_new("friends thread", &update_position_thread, (gpointer) NULL) != 0)
 
107
        GThread *gt = g_thread_new("friends thread", &update_position_thread, (gpointer) NULL);
 
108
        if (gt != 0)
 
109
                g_thread_unref(gt);
 
110
        else
108
111
#else
109
112
        if (!g_thread_create(&update_position_thread, NULL, FALSE, NULL) != 0)
110
113
#endif
473
476
        gtk_label_set_text (label_msg, _("Connecting..."));
474
477
 
475
478
#if GLIB_CHECK_VERSION(2,34,0)
476
 
        if (!g_thread_new("register nick thread", &register_nick_thread, (gpointer) NULL) != 0)
 
479
        GThread *gt=g_thread_new("register nick thread", &register_nick_thread, (gpointer) NULL);
 
480
        if (gt != 0)
 
481
                g_thread_unref(gt);
 
482
        else
477
483
#else
478
484
        if (!g_thread_create(&register_nick_thread, NULL, FALSE, NULL) != 0)
479
485
#endif
705
711
        postdata = create_msg_postdata(m);
706
712
 
707
713
#if GLIB_CHECK_VERSION(2,34,0)
708
 
        if (!g_thread_new("Mission thread", &thread_send_message, postdata) != 0)
 
714
        GThread *gt = g_thread_new("Mission thread", &thread_send_message, postdata);
 
715
        if (gt != 0)
 
716
                g_thread_unref(gt);
 
717
        else
709
718
#else
710
719
        if (!g_thread_create(&thread_send_message, postdata, FALSE, NULL) != 0)
711
720
#endif