Skip to content
Snippets Groups Projects
Commit 4fda9653 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Notify voice mails to the right account

parent 493d5562
Branches
Tags
No related merge requests found
...@@ -42,9 +42,10 @@ ...@@ -42,9 +42,10 @@
guint voice_mails; guint voice_mails;
void void
sflphone_notify_voice_mail (guint count) sflphone_notify_voice_mail ( const gchar* accountID , guint count )
{ {
voice_mails = count ; voice_mails = count ;
gchar* id = g_strdup( accountID );
if(count > 0) if(count > 0)
{ {
gchar * message = g_new0(gchar, 50); gchar * message = g_new0(gchar, 50);
...@@ -58,7 +59,7 @@ sflphone_notify_voice_mail (guint count) ...@@ -58,7 +59,7 @@ sflphone_notify_voice_mail (guint count)
// TODO: add ifdef // TODO: add ifdef
if( account_list_get_size() > 0 ) 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 ) if( acc != NULL )
notify_voice_mails( count , acc ); notify_voice_mails( count , acc );
} }
......
...@@ -63,7 +63,7 @@ void sflphone_hang_up (); ...@@ -63,7 +63,7 @@ void sflphone_hang_up ();
void sflphone_on_hold (); void sflphone_on_hold ();
void sflphone_off_hold (); void sflphone_off_hold ();
call_t * sflphone_new_call(); 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_set_transfert();
void sflphone_unset_transfert(); void sflphone_unset_transfert();
/** /**
......
...@@ -73,11 +73,11 @@ volume_changed_cb (DBusGProxy *proxy, ...@@ -73,11 +73,11 @@ volume_changed_cb (DBusGProxy *proxy,
static void static void
voice_mail_cb (DBusGProxy *proxy, voice_mail_cb (DBusGProxy *proxy,
const gchar* accountID, const gchar* accountID,
const gint nb, const guint nb,
void * foo ) void * foo )
{ {
g_print ("%d Voice mail waiting! \n",nb); g_print ("%d Voice mail waiting! \n",nb);
sflphone_notify_voice_mail (nb); sflphone_notify_voice_mail (accountID , nb);
} }
static void static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment