Bug 30274

Summary: Underscores in errors are incorrectly squashed
Product: dbus Reporter: Christian Dywan <christian>
Component: GLibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: major    
Priority: medium CC: christian, rob.taylor, smcv
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/smcv/dbus-glib-smcv.git;a=shortlog;h=refs/heads/30274
Whiteboard:
i915 platform: i915 features:
Attachments: Untested patch to leave underscores
Add a regression test for errors containing underscores

Description Christian Dywan 2010-09-20 02:38:20 UTC
The commit 9637ed9f0c66982a06048b18ccf983881643e456 introduced squashing of ‚-‘, and implicitly ‚_‘ since uscore_to_wincaps treats both the same way. This breaks existing error naming in Maemo. According to the spec, an underscore is a valid character, unlike the hyphen.

I suggest uscore_to_wincaps should ignore underscores in this case, via an additional argument.
Comment 1 Christian Dywan 2010-09-20 02:59:41 UTC
Created attachment 38809 [details] [review]
Untested patch to leave underscores

This change should resolve this. I still need to test it.
Comment 2 Christian Dywan 2010-11-24 02:04:19 UTC
Patch was tested for a while now, it would be nice to see it reviewed.
Comment 3 Simon McVittie 2011-01-04 08:38:43 UTC
I've pushed the patch to master, thanks.

I'd have preferred it to come with a regression test; I've now written one, which I'll attach in a moment (or see my gitweb). Please review.
Comment 4 Simon McVittie 2011-01-04 08:39:44 UTC
Created attachment 41631 [details] [review]
Add a regression test for errors containing underscores
Comment 5 Will Thompson 2011-01-10 04:45:50 UTC
Review of attachment 41631 [details] [review]:

Ship it.
Comment 6 Simon McVittie 2011-01-10 05:03:22 UTC
Shipped it. Commit ID 04e11da4, for 0.94.

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.