diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index cc522921e5e068417627eac375c04ad01d4da6d1..7f04c4ec3f14acc9b3121152875ff03996f2b28b 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -42,9 +42,10 @@ guint voice_mails; void -sflphone_notify_voice_mail (guint count) +sflphone_notify_voice_mail ( const gchar* accountID , guint count ) { voice_mails = count ; + gchar* id = g_strdup( accountID ); if(count > 0) { gchar * message = g_new0(gchar, 50); @@ -58,7 +59,7 @@ sflphone_notify_voice_mail (guint count) // TODO: add ifdef if( account_list_get_size() > 0 ) { - account_t* acc = account_list_get_by_state( ACCOUNT_STATE_REGISTERED ); + account_t* acc = account_list_get_by_id( id ); if( acc != NULL ) notify_voice_mails( count , acc ); } diff --git a/sflphone-gtk/src/actions.h b/sflphone-gtk/src/actions.h index 15f15aa55e1e5443308af7a2c68c265a8b3096e4..5dcbd9751bcdc7a06a0fa5772000f4bb6b0c206e 100644 --- a/sflphone-gtk/src/actions.h +++ b/sflphone-gtk/src/actions.h @@ -63,7 +63,7 @@ void sflphone_hang_up (); void sflphone_on_hold (); void sflphone_off_hold (); call_t * sflphone_new_call(); -void sflphone_notify_voice_mail (guint count); +void sflphone_notify_voice_mail ( const gchar* accountID , guint count ); void sflphone_set_transfert(); void sflphone_unset_transfert(); /** diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index df743594950ca0f47e238ef257e876e701820d78..907fb0af84e3fdd149c074a0fd0aea97850bb271 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -73,11 +73,11 @@ volume_changed_cb (DBusGProxy *proxy, static void voice_mail_cb (DBusGProxy *proxy, const gchar* accountID, - const gint nb, + const guint nb, void * foo ) { g_print ("%d Voice mail waiting! \n",nb); - sflphone_notify_voice_mail (nb); + sflphone_notify_voice_mail (accountID , nb); } static void