Commit a9685d37 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

Merge branch 'master' into m_savard

Conflicts:
	sflphone-common/src/managerimpl.cpp
parents 9d36298d 3b5050a5
......@@ -1418,7 +1418,7 @@ sflphone_call_state_changed( callable_obj_t * c, const gchar * description, cons
}
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr) {
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr, int size) {
struct ifreq ifr;
int fd;
......@@ -1446,7 +1446,9 @@ void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr)
tmp_addr = (char *)addr_in;
snprintf(*iface_addr, sizeof(*iface_addr), "%d.%d.%d.%d",
snprintf(*iface_addr, size, "%d.%d.%d.%d",
UC(tmp_addr[0]), UC(tmp_addr[1]), UC(tmp_addr[2]), UC(tmp_addr[3]));
close(fd);
}
......@@ -289,5 +289,5 @@ void sflphone_call_state_changed(callable_obj_t * c, const gchar * description,
/**
* Resolve an interface address given its name
*/
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr);
void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr, int size);
#endif
......@@ -641,7 +641,7 @@ static local_interface_changed_cb(GtkWidget * widget, gpointer data UNUSED) {
local_iface_name = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo));
// sflphone_get_interface_addr_from_name((char *)local_interface);
sflphone_get_interface_addr_from_name(local_iface_name, &local_iface_addr);
sflphone_get_interface_addr_from_name(local_iface_name, &local_iface_addr, 36);
gtk_entry_set_text(GTK_ENTRY(localAddressEntry), local_iface_addr);
gtk_entry_set_text (GTK_ENTRY(publishedAddressEntry), local_iface_addr);
......@@ -1007,7 +1007,7 @@ GtkWidget* create_network (account_t **a) {
gchar *local_iface_addr;
gchar *local_iface_name;
local_iface_addr= g_malloc(18);
local_iface_addr= g_malloc(36);
if (iface_list != NULL) {
......@@ -1050,7 +1050,7 @@ GtkWidget* create_network (account_t **a) {
// Fill the text entry with the ip address of local interface selected
localAddressEntry = gtk_entry_new();
local_iface_name = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo));
sflphone_get_interface_addr_from_name(local_iface_name, &local_iface_addr);
sflphone_get_interface_addr_from_name(local_iface_name, &local_iface_addr, 36);
gtk_entry_set_text(GTK_ENTRY(localAddressEntry), local_iface_addr);
gtk_widget_set_sensitive(localAddressEntry, FALSE);
gtk_table_attach ( GTK_TABLE( table ), localAddressEntry, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......
......@@ -1150,16 +1150,16 @@ void ManagerImpl::detachParticipant (const CallID& call_id,
iter_details = call_details.find("CALL_STATE");
if (iter_details->second == "RINGING") {
removeParticipant(call_id);
} else {
_debug (" ONHOLD %s", call_id.c_str());
onHoldCall(call_id);
removeParticipant(call_id);
processRemainingParticipant(current_call_id, conf);
removeParticipant(call_id);
}
else {
onHoldCall(call_id);
removeParticipant(call_id);
processRemainingParticipant(current_call_id, conf);
_dbus->getCallManager()->conferenceChanged(conf->getConfID(),
conf->getStateStr());
_dbus->getCallManager()->conferenceChanged(conf->getConfID(),
conf->getStateStr());
}
}
else {
......@@ -1225,7 +1225,8 @@ void ManagerImpl::removeParticipant (const CallID& call_id) {
void ManagerImpl::processRemainingParticipant (CallID current_call_id,
Conference *conf) {
_debug ("Manager: Process remaining participant");
_debug ("Manager: Process remaining %d participant(s) from conference %s",
conf->getNbParticipants(), conf->getConfID().c_str());
if (conf->getNbParticipants() > 1) {
......@@ -1254,7 +1255,6 @@ void ManagerImpl::processRemainingParticipant (CallID current_call_id,
ParticipantSet::iterator iter_participant = participants.begin();
// bind main participant to remaining conference call
if (iter_participant != participants.end()) {
// this call is no more a conference participant
......@@ -1272,6 +1272,7 @@ void ManagerImpl::processRemainingParticipant (CallID current_call_id,
}
removeConference(conf->getConfID());
} else {
_debug ("Manager: No remaining participant, remove conference");
......
Supports Markdown
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