void osm_set_login(const gchar *user, const gchar *password)
{
- /* Allocate mutex */
- if (login_mutex == NULL)
- {
- login_mutex = g_mutex_new();
- }
g_mutex_lock(login_mutex);
g_free(osm_user); osm_user = NULL;
g_free(osm_password); osm_password = NULL;
tmp.s = "";
a_preferences_register(prefs+1, tmp, VIKING_OSM_TRACES_PARAMS_GROUP_KEY);
+ login_mutex = vik_mutex_new();
+}
+
+void osm_traces_uninit()
+{
+ vik_mutex_free(login_mutex);
}
/*
title = g_strdup_printf(_("Uploading %s to OSM"), info->name);
- /* launch the thread */
- a_background_thread(VIK_GTK_WINDOW_FROM_LAYER(vtl), /* parent window */
- title, /* description string */
- (vik_thr_func) osm_traces_upload_thread, /* function to call within thread */
- info, /* pass along data */
- (vik_thr_free_func) oti_free, /* function to free pass along data */
- (vik_thr_free_func) NULL,
- 1 );
+ // launch the thread
+ a_background_thread( BACKGROUND_POOL_REMOTE,
+ VIK_GTK_WINDOW_FROM_LAYER(vtl), /* parent window */
+ title, /* description string */
+ (vik_thr_func) osm_traces_upload_thread, /* function to call within thread */
+ info, /* pass along data */
+ (vik_thr_free_func) oti_free, /* function to free pass along data */
+ (vik_thr_free_func) NULL,
+ 1 );
g_free ( title ); title = NULL;
}
gtk_widget_destroy ( dia );