Commit 4fda9653 authored by Emmanuel Milou's avatar Emmanuel Milou

Notify voice mails to the right account

parent 493d5562
......@@ -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 );
}
......
......@@ -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();
/**
......
......@@ -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
......
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