Bug 27358

Summary: tp-ssip 0.6.2 fails to build with --disable-debug
Product: Telepathy Reporter: Olivier Crête <olivier.crete>
Component: rakiaAssignee: Mikhail Zabaluev <mikhail.zabaluev>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: high Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Olivier Crête 2010-03-28 09:44:43 UTC
Log:

telepathy-sofiasip.c: In function ‘sofia_log_handler’:
telepathy-sofiasip.c:56: warning: implicit declaration of function ‘tpsip_log’
telepathy-sofiasip.c:56: error: ‘TPSIP_DEBUG_SOFIA’ undeclared (first use in this function)

Downstream bug (with possible patch):
https://bugs.gentoo.org/show_bug.cgi?id=311585


I'm more favorable to the idea of removing --disable-debug because we now have the Debug interface, so it is useful to have it even on production systems.
Comment 1 Mikhail Zabaluev 2010-03-29 01:38:46 UTC
(In reply to comment #0)
> Downstream bug (with possible patch):
> https://bugs.gentoo.org/show_bug.cgi?id=311585

You should tell them that their patch will hog memory with every debug statement.
Should come up with a proper fix.
I think --disable-debug is useful (for ultra-embedded performance freaks?) as long as the default is to enable debug logging.
Comment 2 Olivier Crête 2010-03-29 07:09:01 UTC
You can just put the #ifdef right at the beginning of the function and it should be fine I think ?
Comment 4 Olivier Crête 2010-03-29 10:54:19 UTC
Why don't you just not all su_log_redirect when debug is disable, will it just print everything to stderr?

The rest look good to go.
Comment 5 Mikhail Zabaluev 2010-03-29 11:01:33 UTC
The fix has been merged to branches master and telepathy-sofiasip-0.6; it will be available in the next respective releases.
Comment 6 Mikhail Zabaluev 2010-03-29 11:04:24 UTC
(In reply to comment #4)
> Why don't you just not all su_log_redirect when debug is disable,

The code in the branch does the redirect in any case, but without ENABLE_DEBUG the log handler is a no-op. So no stderr printouts in this case. I think this is more logical than logging Sofia messages one way with --enable-debug, and another way with --disable-debug.

Comment 7 Simon McVittie 2010-04-12 08:07:15 UTC
(In reply to comment #5)
> The fix has been merged to branches master and telepathy-sofiasip-0.6; it will
> be available in the next respective releases.

No longer needs fixing or review, then :-)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.