PIM: fix invalid call to folks_note_field_details_new
folks_note_field_details_new() takes an additional uid parameter. Passing NULL is okay, but SyncEvolution wasn't doing that due to an incorrect function type cast. Found by valgrind only after a valgrind and tool chain update. Probably we passed a valid value accidentally before. Fixed by using a wrapper function. Ideally the function typecast should get replaced entirely with just casting the returned pointer.
This commit is contained in:
parent
f3f689b857
commit
6977a261e3
|
@ -559,6 +559,8 @@ static void DBus2Addr(GDBusCXX::ExtractArgs &context,
|
|||
new GValueObjectCXX(set.get()));
|
||||
}
|
||||
|
||||
static FolksAbstractFieldDetails *my_folks_note_field_details_new_wrapper(const gchar *value, GeeMultiMap *parameters) { return FOLKS_ABSTRACT_FIELD_DETAILS(folks_note_field_details_new(value, parameters, NULL)); }
|
||||
|
||||
void DBus2PersonaDetails(GDBusCXX::ExtractArgs &context,
|
||||
GDBusCXX::reader_type &iter,
|
||||
PersonaDetails &details)
|
||||
|
@ -647,7 +649,7 @@ void DBus2PersonaDetails(GDBusCXX::ExtractArgs &context,
|
|||
DBus2SimpleAbstractField(context, valueIter, details,
|
||||
FOLKS_TYPE_NOTE_FIELD_DETAILS,
|
||||
FOLKS_PERSONA_DETAIL_NOTES,
|
||||
reinterpret_cast<FolksAbstractFieldDetails *(*)(const gchar *, GeeMultiMap *)>(folks_note_field_details_new));
|
||||
my_folks_note_field_details_new_wrapper);
|
||||
} else if (key == CONTACT_HASH_ROLES) {
|
||||
DBus2Role(context, valueIter, details);
|
||||
} else if (key == CONTACT_HASH_GROUPS) {
|
||||
|
|
Loading…
Reference in a new issue