[packagekit] [PATCH] Remove debug limits in pk-debug

Tom Parker palfrey at tevp.net
Thu Aug 30 11:16:52 PDT 2007


Hiya everyone,

The attached patch is a little bit non-trivial, and I shouldn't really 
be throwing massive messages into pk_debug (but the code that does so 
won't get committed, it's a temporary hack), so some feedback would be 
welcomed before I commit this one. Major reason I think it should be 
committed: I just spent a good 20 minutes digging around the apt code 
before I thought about looking at pk-debug.c and found this.

pk_{debug,warning,error} currently uses g_vsnprintf with a fixed 1024 
byte buffer. Admittedly, using pk_debug with things exceeding that  is a 
bit silly, but still. The attached patch converts the debug functions to 
using g_vasprintf, which means we can throw away the fixed buffer 
entirely and get effectively unlimited length debug messages.

Thoughts?

Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Convert-debug-to-using-g_vasprintf-for-long-debug.patch
Type: text/x-patch
Size: 2572 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20070830/f9803565/attachment-0004.bin>


More information about the PackageKit mailing list