diff --git a/gnome/src/actions.c b/gnome/src/actions.c index 78f96a4f9b03faabdb622e1c8e1e9267dab0c452..911502eb6be96521acb0d48b771c6c8d9940911b 100644 --- a/gnome/src/actions.c +++ b/gnome/src/actions.c @@ -744,38 +744,19 @@ sflphone_keypad(guint keyval, gchar * key) sflphone_new_call(); } -static void place_direct_call(const callable_obj_t * c) -{ - g_assert(c->_state == CALL_STATE_DIALING); - dbus_place_call(c); -} - -static int place_registered_call(callable_obj_t * c) +int +sflphone_place_call(callable_obj_t * c) { account_t * account = NULL; + DEBUG("Actions: Placing call with %s @ %s and accountid %s", c->_display_name, c->_peer_number, c->_accountID); + if (c->_state != CALL_STATE_DIALING) return -1; if (!*c->_peer_number) return -1; -// No longer usefull -/* - if (account_list_get_size() == 0) { - notify_no_accounts(); - sflphone_fail(c); - return -1; - } -*/ -/* - if (account_list_get_by_state(ACCOUNT_STATE_REGISTERED) == NULL) { - DEBUG("Actions: No registered account, cannot make a call"); - notify_no_registered_accounts(); - sflphone_fail(c); - return -1; - } -*/ DEBUG("Actions: Get account for this call"); if (strlen(c->_accountID) != 0) { @@ -815,26 +796,6 @@ static int place_registered_call(callable_obj_t * c) return 0; } -void -sflphone_place_call(callable_obj_t * c) -{ - DEBUG("Actions: Placing call with %s @ %s and accountid %s", c->_display_name, c->_peer_number, c->_accountID); - if (place_registered_call(c) < 0) - DEBUG("An error occured while placing registered call in %s at %d", __FILE__, __LINE__); -/* - if (is_direct_call(c)) { - gchar *msg = g_markup_printf_escaped(_("Direct SIP call")); - statusbar_pop_message(__MSG_ACCOUNT_DEFAULT); - statusbar_push_message(msg , NULL, __MSG_ACCOUNT_DEFAULT); - g_free(msg); - - place_direct_call(c); - } else if (place_registered_call(c) < 0) - DEBUG("An error occured while placing registered call in %s at %d", __FILE__, __LINE__); -*/ -} - - void sflphone_detach_participant(const gchar* callID) { diff --git a/gnome/src/actions.h b/gnome/src/actions.h index 5dc304885850c2dcccf9772b2a6f6ed27753111a..6349c4cb8be4d410f2b833d0a173496906fb1b49 100644 --- a/gnome/src/actions.h +++ b/gnome/src/actions.h @@ -157,7 +157,7 @@ void sflphone_keypad(guint keyval, gchar * key); * Place a call with a filled callable_obj_t.to * @param c A call in CALL_STATE_DIALING state */ -void sflphone_place_call(callable_obj_t * c); +int sflphone_place_call(callable_obj_t * c); /** * Fetch the ip2ip profile through dbus and fill