From de95f551305b810203353023c3f3f93bbffccb95 Mon Sep 17 00:00:00 2001 From: phintuka Date: Sat, 16 Sep 2006 22:30:52 +0000 Subject: Fix unloading of all plugins (even "static" plugins given on command line are unloaded) Fix unloading all post plugins (every second was left unloaded) Fixed debug output when name=null --- xine/post.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xine/post.c b/xine/post.c index 24bd99bc..43a1c8d0 100644 --- a/xine/post.c +++ b/xine/post.c @@ -842,11 +842,11 @@ static int _pplugin_unload_post(post_plugins_t *fe, const char *name, if(!*post_elements || !*post_elements_num) return 0; - for(i=0; i < *post_elements_num; i++) - if((*post_elements)[i]) + for(i=0; i < *post_elements_num; i++) { + if((*post_elements)[i]) { if(!name || !strcmp((*post_elements)[i]->name, name)) { - if((*post_elements)[i]->enable == 0) { + if((*post_elements)[i]->enable == 0 || !name) { xine_post_dispose(fe->xine, (*post_elements)[i]->post); free((*post_elements)[i]->name); @@ -863,10 +863,15 @@ static int _pplugin_unload_post(post_plugins_t *fe, const char *name, (*post_elements)[(*post_elements_num)] = 0; result = 1; + i--; + } else { - LOGDBG("Unload %s failed: plugin enabled and in use", name); + LOGDBG("Unload %s failed: plugin enabled and in use", + (*post_elements)[i]->name); } } + } + } if(*post_elements_num <= 0) { if(*post_elements) -- cgit v1.2.3