{
int err = MM_ERROR_NONE;
- debug_enter("(Slot : %d)\n", param);
-
if (param < 0 || param >= MANAGER_HANDLE_MAX) {
debug_error ("Slot index param [%d] is invalid", param);
return MM_ERROR_INVALID_ARGUMENT;
}
+ debug_enter("(Slot : %d) stop-by-user : %d\n", param, g_slots[param].stop_by_user);
+
if (g_slots[param].stop_by_user == false) {
SLOT_LOCK();
}
}
#endif
- if (g_slots[param].stop_by_user == false) {
- __mm_sound_mgr_ipc_notify_play_file_end(param);
- debug_msg("Client callback msg_type (instance) : [%d]\n", (int)g_slots[param].param);
- }
+ __mm_sound_mgr_ipc_notify_play_file_end(param);
+ debug_msg("Client callback msg_type (instance) : [%d]\n", (int)g_slots[param].param);
debug_msg("Handle allocated handle : [0x%08X]\n", g_slots[param].plughandle);
err = g_plugins[g_slots[param].pluginid].Destroy(g_slots[param].plughandle);
int i=0;
GError *error = NULL;
+ debug_enter();
+
/* Create thread pool (non-exclude mode with infinite max threads) */
g_pool = g_thread_pool_new(__ThreadWork, NULL, -1, FALSE, &error);
if (g_pool == NULL && error != NULL) {
MMSoundThreadPoolDump(TRUE);
+ debug_leave();
+
return MM_ERROR_NONE;
}
{
GError *error = NULL;
+ debug_enter();
+
+ if (g_pool == NULL) {
+ debug_error("No thread pool initialized....\n");
+ return MM_ERROR_SOUND_INTERNAL;
+ }
+
/* Dump current thread pool */
MMSoundThreadPoolDump(FALSE);
return MM_ERROR_SOUND_INTERNAL;
}
+ debug_leave();
+
return MM_ERROR_NONE;
}
If wait_ is TRUE, the functions does not return before all tasks to be processed
(dependent on immediate, whether all or only the currently running) are ready.
Otherwise the function returns immediately. */
- debug_msg("thread pool will be free\n");
- g_thread_pool_free(g_pool, TRUE, FALSE);
+ debug_enter();
+
+ if (g_pool) {
+ debug_msg("thread pool will be free\n");
+ g_thread_pool_free(g_pool, TRUE, FALSE);
+ g_pool = NULL;
+ }
+ debug_leave();
return MM_ERROR_NONE;
}