Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
7d0df41e
Commit
7d0df41e
authored
Oct 17, 2011
by
Tristan Matthews
Browse files
* #7178: remove conference_next_participant
parent
5926a7c3
Changes
6
Hide whitespace changes
Inline
Side-by-side
gnome/src/accountlist.c
View file @
7d0df41e
...
...
@@ -229,9 +229,7 @@ account_list_get_registered_accounts(void)
gchar
*
account_list_get_current_id
(
void
)
{
account_t
*
current
;
current
=
account_list_get_current
();
account_t
*
current
=
account_list_get_current
();
if
(
current
)
return
current
->
accountID
;
...
...
gnome/src/actions.c
View file @
7d0df41e
...
...
@@ -95,7 +95,7 @@ static gchar ** sflphone_order_history_hash_table(GHashTable *result)
GSList
*
llist
=
(
GSList
*
)
value
;
while
(
llist
)
{
ordered_list
=
(
void
*
)
g_realloc
(
ordered_list
,
(
size
+
1
)
*
sizeof
(
void
*
));
ordered_list
=
(
gchar
*
*
)
g_realloc
(
ordered_list
,
(
size
+
1
)
*
sizeof
(
gchar
*
));
*
(
ordered_list
+
size
)
=
g_strdup
((
gchar
*
)
llist
->
data
);
size
++
;
llist
=
g_slist_next
(
llist
);
...
...
@@ -105,8 +105,8 @@ static gchar ** sflphone_order_history_hash_table(GHashTable *result)
}
}
ordered_list
=
(
void
*
)
g_realloc
(
ordered_list
,
(
size
+
1
)
*
sizeof
(
void
*
));
*
(
ordered_list
+
size
)
=
NULL
;
ordered_list
=
(
gchar
*
*
)
g_realloc
(
ordered_list
,
(
size
+
1
)
*
sizeof
(
gchar
*
));
ordered_list
[
size
]
=
NULL
;
return
ordered_list
;
}
...
...
@@ -258,7 +258,7 @@ void sflphone_fill_account_list(void)
gchar
**
array
=
dbus_account_list
();
if
(
array
)
{
for
(
gchar
**
accountID
=
array
;
*
accountID
;
accountID
++
)
{
for
(
gchar
**
accountID
=
array
;
accountID
&&
*
accountID
;
accountID
++
)
{
account_t
*
a
=
g_new0
(
account_t
,
1
);
a
->
accountID
=
g_strdup
(
*
accountID
);
a
->
credential_information
=
NULL
;
...
...
@@ -290,29 +290,28 @@ void sflphone_fill_account_list(void)
gchar
*
status
=
g_hash_table_lookup
(
details
,
REGISTRATION_STATUS
);
if
(
g_strcmp0
(
status
,
"REGISTERED"
)
==
0
)
{
if
(
g_strcmp0
(
status
,
"REGISTERED"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_REGISTERED
;
}
else
if
(
g_strcmp0
(
status
,
"UNREGISTERED"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"UNREGISTERED"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_UNREGISTERED
;
}
else
if
(
g_strcmp0
(
status
,
"TRYING"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"TRYING"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_TRYING
;
}
else
if
(
g_strcmp0
(
status
,
"ERROR"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"ERROR"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_ERROR
;
}
else
if
(
g_strcmp0
(
status
,
"ERROR_AUTH"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"ERROR_AUTH"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_ERROR_AUTH
;
}
else
if
(
g_strcmp0
(
status
,
"ERROR_NETWORK"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"ERROR_NETWORK"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_ERROR_NETWORK
;
}
else
if
(
g_strcmp0
(
status
,
"ERROR_HOST"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"ERROR_HOST"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_ERROR_HOST
;
}
else
if
(
g_strcmp0
(
status
,
"ERROR_CONF_STUN"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"ERROR_CONF_STUN"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_ERROR_CONF_STUN
;
}
else
if
(
g_strcmp0
(
status
,
"ERROR_EXIST_STUN"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"ERROR_EXIST_STUN"
)
==
0
)
a
->
state
=
ACCOUNT_STATE_ERROR_EXIST_STUN
;
}
else
if
(
g_strcmp0
(
status
,
"READY"
)
==
0
)
{
else
if
(
g_strcmp0
(
status
,
"READY"
)
==
0
)
a
->
state
=
IP2IP_PROFILE_STATUS
;
}
else
{
else
a
->
state
=
ACCOUNT_STATE_INVALID
;
}
gchar
*
code
=
g_hash_table_lookup
(
details
,
REGISTRATION_STATE_CODE
);
...
...
@@ -355,7 +354,7 @@ gboolean sflphone_init(GError **error)
sflphone_fill_ip2ip_profile
();
// Fetch the conference list
//
sflphone_fill_conference_list();
sflphone_fill_conference_list
();
return
TRUE
;
}
...
...
@@ -1182,15 +1181,12 @@ static void hist_free_elt(gpointer list)
void
sflphone_save_history
(
void
)
{
QueueElement
*
current
;
conference_obj_t
*
conf
;
GHashTable
*
result
=
g_hash_table_new_full
(
NULL
,
g_str_equal
,
g_free
,
hist_free_elt
);
gint
size
=
calllist_get_size
(
history_tab
);
for
(
gint
i
=
0
;
i
<
size
;
i
++
)
{
current
=
calllist_get_nth
(
history_tab
,
i
);
QueueElement
*
current
=
calllist_get_nth
(
history_tab
,
i
);
if
(
!
current
)
{
WARN
(
"SFLphone: Warning: %dth element is null"
,
i
);
...
...
@@ -1217,7 +1213,7 @@ void sflphone_save_history(void)
size
=
conferencelist_get_size
(
history_tab
);
for
(
gint
i
=
0
;
i
<
size
;
i
++
)
{
conf
=
conferencelist_get_nth
(
history_tab
,
i
);
conference_obj_t
*
conf
=
conferencelist_get_nth
(
history_tab
,
i
);
if
(
!
conf
)
{
DEBUG
(
"SFLphone: Error: Could not get %dth conference"
,
i
);
...
...
gnome/src/conference_obj.c
View file @
7d0df41e
...
...
@@ -139,12 +139,6 @@ void conference_remove_participant(const gchar* call_id, conference_obj_t* conf)
}
GSList
*
conference_next_participant
(
GSList
*
participant
)
{
return
g_slist_next
(
participant
);
}
void
conference_participant_list_update
(
gchar
**
participants
,
conference_obj_t
*
conf
)
{
DEBUG
(
"Conference: Participant list update"
);
...
...
@@ -154,8 +148,8 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
return
;
}
for
(
gchar
**
part
=
participants
;
part
&&
*
part
;
part
++
)
{
gchar
*
call_id
=
(
gchar
*
)(
*
part
);
for
(
gchar
**
part
=
participants
;
part
&&
*
part
;
++
part
)
{
gchar
*
call_id
=
(
gchar
*
)
(
*
part
);
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
if
(
call
->
_confID
!=
NULL
)
{
...
...
@@ -169,8 +163,8 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
conf
->
participant_list
=
NULL
;
}
for
(
gchar
**
part
=
participants
;
part
&&
*
part
;
part
++
)
{
gchar
*
call_id
=
(
gchar
*
)(
*
part
);
for
(
gchar
**
part
=
participants
;
part
&&
*
part
;
++
part
)
{
gchar
*
call_id
=
(
gchar
*
)
(
*
part
);
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
call
->
_confID
=
g_strdup
(
conf
->
_confID
);
conference_add_participant
(
call_id
,
conf
);
...
...
@@ -191,7 +185,7 @@ gchar *serialize_history_conference_entry(conference_obj_t *entry)
gchar
*
participantstr
=
NULL
;
for
(
gint
i
=
0
;
i
<
length
;
++
i
)
{
const
gchar
*
const
tmp
=
g_slist_nth_data
(
participant_list
,
i
);
const
gchar
*
const
tmp
=
(
gchar
*
)
g_slist_nth_data
(
participant_list
,
i
);
if
(
!
tmp
)
WARN
(
"Conference: Peer number is NULL in conference list"
);
...
...
gnome/src/conference_obj.h
View file @
7d0df41e
...
...
@@ -77,8 +77,6 @@ void conference_add_participant (const gchar*, conference_obj_t *);
void
conference_remove_participant
(
const
gchar
*
,
conference_obj_t
*
);
GSList
*
conference_next_participant
(
GSList
*
participant
);
void
conference_participant_list_update
(
gchar
**
,
conference_obj_t
*
);
gchar
*
serialize_history_conference_entry
(
conference_obj_t
*
entry
);
...
...
gnome/src/contacts/calltree.c
View file @
7d0df41e
...
...
@@ -267,7 +267,7 @@ calltree_create_conf_from_participant_list(GSList *list)
/* build the list up */
for
(
gint
i
=
0
;
i
<
list_length
;
++
i
)
{
gchar
*
participant_id
=
g_slist_nth_data
(
list
,
i
);
gchar
*
participant_id
=
(
gchar
*
)
g_slist_nth_data
(
list
,
i
);
callable_obj_t
*
call
=
calllist_get_call
(
history_tab
,
participant_id
);
/* allocate memory for the participant number */
...
...
@@ -759,8 +759,8 @@ calltree_update_call_recursive(calltab_t* tab, callable_obj_t * c, GtkTreeIter *
}
gtk_tree_store_set
(
store
,
&
iter
,
COLUMN_ACCOUNT_PIXBUF
,
pixbuf
,
// Icon
COLUMN_ACCOUNT_DESC
,
description
,
// Description
COLUMN_ACCOUNT_PIXBUF
,
pixbuf
,
COLUMN_ACCOUNT_DESC
,
description
,
COLUMN_ACCOUNT_SECURITY_PIXBUF
,
pixbuf_security
,
COLUMN_ACCOUNT_PTR
,
c
,
-
1
);
...
...
@@ -887,14 +887,10 @@ void calltree_add_history_entry(callable_obj_t *c, GtkTreeIter *parent)
if
(
!
eel_gconf_get_integer
(
HISTORY_ENABLED
))
return
;
GtkTreeIter
iter
;
// New call in the list
gchar
*
date
=
NULL
;
gchar
*
duration
=
NULL
;
gchar
*
description
=
calltree_display_call_info
(
c
,
DISPLAY_TYPE_HISTORY
,
""
);
GtkTreeIter
iter
;
gtk_tree_store_prepend
(
history_tab
->
store
,
&
iter
,
parent
);
GdkPixbuf
*
pixbuf
=
NULL
;
...
...
@@ -917,8 +913,8 @@ void calltree_add_history_entry(callable_obj_t *c, GtkTreeIter *parent)
}
else
// participant to a conference
pixbuf
=
gdk_pixbuf_new_from_file
(
ICONS_DIR
"/current.svg"
,
NULL
);
date
=
get_formatted_start_timestamp
(
c
->
_time_start
);
duration
=
get_call_duration
(
c
);
gchar
*
date
=
get_formatted_start_timestamp
(
c
->
_time_start
);
gchar
*
duration
=
get_call_duration
(
c
);
gchar
*
full_duration
=
g_strconcat
(
date
,
duration
,
NULL
);
g_free
(
date
);
g_free
(
duration
);
...
...
@@ -1011,8 +1007,8 @@ void calltree_add_conference_to_current_calls(conference_obj_t* conf)
if
(
conf
->
participant_list
)
{
DEBUG
(
"Calltree: Determine if at least one participant uses SRTP"
);
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
conference_next_participan
t
(
part
))
{
const
gchar
*
const
call_id
=
part
->
data
;
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
g_slist_nex
t
(
part
))
{
const
gchar
*
const
call_id
=
(
gchar
*
)
part
->
data
;
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
if
(
call
==
NULL
)
...
...
@@ -1038,8 +1034,8 @@ void calltree_add_conference_to_current_calls(conference_obj_t* conf)
DEBUG
(
"Calltree: Determine if all conference participants are secured"
);
if
(
conf
->
_conf_srtp_enabled
)
{
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
conference_next_participan
t
(
part
))
{
const
gchar
*
const
call_id
=
part
->
data
;
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
g_slist_nex
t
(
part
))
{
const
gchar
*
const
call_id
=
(
gchar
*
)
part
->
data
;
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
if
(
call
)
{
...
...
@@ -1080,8 +1076,8 @@ void calltree_add_conference_to_current_calls(conference_obj_t* conf)
g_object_unref
(
pixbuf_security
);
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
conference_next_participan
t
(
part
))
{
const
gchar
*
const
call_id
=
part
->
data
;
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
g_slist_nex
t
(
part
))
{
const
gchar
*
const
call_id
=
(
gchar
*
)
part
->
data
;
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
calltree_remove_call
(
current_calls_tab
,
call
);
...
...
@@ -1193,8 +1189,8 @@ void calltree_add_conference_to_history(conference_obj_t *conf)
g_object_unref
(
G_OBJECT
(
pixbuf
));
for
(
GSList
*
part
=
conf
->
participant_list
;
part
;
part
=
conference_next_participan
t
(
part
))
{
const
gchar
*
const
call_id
=
part
->
data
;
part
=
g_slist_nex
t
(
part
))
{
const
gchar
*
const
call_id
=
(
gchar
*
)
part
->
data
;
callable_obj_t
*
call
=
calllist_get_call
(
history_tab
,
call_id
);
if
(
call
)
...
...
gnome/src/dbus/dbus.c
View file @
7d0df41e
...
...
@@ -308,7 +308,7 @@ conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo
im_widget_update_state
(
IM_WIDGET
(
c
->
_im_widget
),
FALSE
);
// remove all participants for this conference
for
(
GSList
*
p
=
c
->
participant_list
;
p
;
p
=
conference_next_participan
t
(
p
))
{
for
(
GSList
*
p
=
c
->
participant_list
;
p
;
p
=
g_slist_nex
t
(
p
))
{
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
p
->
data
);
if
(
call
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment