Commit f9a2ebb9 authored by John Brooks's avatar John Brooks

[mms-engine] Fix incorrect parameter in mms_engine_handle_cancel

The cancel method should take a string id, but currently a few functions
are still defined with integer ids, including sendMessage and cancel.
sendMessage correctly converts the integer to a string, but cancel had a
bad cast that resulted in a crash when called with an integer id.

We should fix the parameter types on these methods at some point, which
will require a coordinated change with the MmsHandler. Until then, this
prevents the crash and makes the cancel method work as expected.
parent 7abc9889
......@@ -288,12 +288,15 @@ gboolean
OrgNemomobileMmsEngine* proxy,
GDBusMethodInvocation* call,
const char* id,
int database_id,
MMSEngine* engine)
const char *id = NULL;
if (database_id > 0) id = g_strdup_printf("%u", database_id);
MMS_DEBUG_("%s", id);
mms_dispatcher_cancel(engine->dispatcher, id);
org_nemomobile_mms_engine_complete_cancel(proxy, call);
return TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment