From: Stefan Kost Date: Wed, 15 Dec 2010 21:19:54 +0000 (+0200) Subject: info: use the publicly visible address to fix the tests X-Git-Tag: RELEASE-0.10.32~181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb56687a6dfd207507a4ca000eae53f93b5e33ea;p=platform%2Fupstream%2Fgstreamer.git info: use the publicly visible address to fix the tests The -Bsymbolic change causes us to get a different address when internaly looking up the function than what application would get when the use the symbol that they see. This made removing the default loghandler to fail, as it is set internally and removed externaly. --- diff --git a/gst/gstinfo.c b/gst/gstinfo.c index e92f060..231d22a 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -351,7 +351,16 @@ _gst_debug_init (void) _GST_CAT_DEBUG = _gst_debug_category_new ("GST_DEBUG", GST_DEBUG_BOLD | GST_DEBUG_FG_YELLOW, "debugging subsystem"); - gst_debug_add_log_function (gst_debug_log_default, NULL); + /* we need to use the publicly visible address, so that one could remove it by + * the same address */ + { + GModule *module = g_module_open (NULL, 0); + gpointer ptr; + + g_module_symbol (module, "gst_debug_log_default", &ptr); + gst_debug_add_log_function (ptr, NULL); + g_module_close (module); + } /* FIXME: add descriptions here */ GST_CAT_GST_INIT = _gst_debug_category_new ("GST_INIT",