| Summary: | Account Storage commit() virtual method not optional (as claimed in docs) | ||
|---|---|---|---|
| Product: | Telepathy | Reporter: | Travis Reitter <travis.reitter> |
| Component: | mission-control | Assignee: | Telepathy bugs list <telepathy-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
| Severity: | normal | ||
| Priority: | medium | Keywords: | patch |
| Version: | git master | ||
| Hardware: | Other | ||
| OS: | All | ||
| URL: | http://git.collabora.co.uk/?p=user/wjt/telepathy-mission-control-wjt.git;a=shortlog;h=refs/heads/misc | ||
| Whiteboard: | review+ | ||
| i915 platform: | i915 features: | ||
|
Description
Travis Reitter
2010-12-06 15:58:21 UTC
m5-account-plugins != mission-control Here's the commit that broke this: http://git.collabora.co.uk/?p=telepathy-mission-control.git;a=commitdiff;h=0d914e13cc4a6e84cebb840c0be4d32abaacaddc here's a branch that fixes this, as well as fixing a number of other storage buglets and improving the test suite a bit. - old_string = mcd_storage_dup_string (storage, name, key);
new_string = g_value_get_string (value);
- if (!tp_strdiff (old_string, new_string))
- {
- g_free (old_string);
- return SET_RESULT_UNCHANGED;
+ if (*new_string == '\0') {
+ new_string = NULL;
}
What if the value GValue hasn't had a string set to it yet? g_value_get_string will return NULL and *NULL isn't so cool.
(In reply to comment #4) > - old_string = mcd_storage_dup_string (storage, name, key); > new_string = g_value_get_string (value); > > - if (!tp_strdiff (old_string, new_string)) > - { > - g_free (old_string); > - return SET_RESULT_UNCHANGED; > + if (*new_string == '\0') { > + new_string = NULL; > } > > What if the value GValue hasn't had a string set to it yet? g_value_get_string > will return NULL and *NULL isn't so cool. As discussed IRL this is actually safe because dbus-glib never gives you GValues containing NULL strings. But I've amended the patch to use tp_str_empty; and merged it. Cheers! This fix will be in 5.7.2 Released in 5.7.2 |
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.