X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-platform.c;h=f8554c1c4851c3ce6d1d3f37960dc37d82f16347;hp=e857ca90150d304965fda56871b2ac6e1118078c;hb=28d019df4f60f67426a816fc4da9f8df51784a8d;hpb=19fa7002052588d01ffc49c6a274c24b5640602f diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index e857ca9..f8554c1 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -111,6 +111,7 @@ #define MODEST_ALARMD_APPID PACKAGE_NAME static ca_context *ca_con = NULL; +static gboolean ca_con_opened = FALSE; static void modest_platform_play_email_tone (void); @@ -2663,9 +2664,13 @@ modest_platform_play_email_tone (void) } } - if ((ret = ca_context_open(ca_con)) != CA_SUCCESS) { - g_warning("ca_context_open: %s\n", ca_strerror(ret)); - return; + if (!ca_con_opened) { + if ((ret = ca_context_open(ca_con)) != CA_SUCCESS) { + g_warning("ca_context_open: %s\n", ca_strerror(ret)); + return; + } else { + ca_con_opened = TRUE; + } } ca_proplist_create(&pl);