[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] [BUG/RFC] linphonec 2.0.1 : friend list management
From: |
Andreas Pretzsch |
Subject: |
[Linphone-developers] [BUG/RFC] linphonec 2.0.1 : friend list management |
Date: |
Mon, 3 Mar 2008 17:38:54 +0100 |
User-agent: |
KMail/1.9.5 |
Subject: friend list intermixing by accident
The list of friends in .linphonerc is read and filled into the internal
data structure via
void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf)
defined in
linphone-2.0.1/coreapi/friend.c
This linked list is later written to the config file on exit.
Given a friend list like:
[friend_0]
url=key0 <sip:address@hidden>
pol=accept
subscribe=0
proxy=-1
[friend_1]
url=key1 <sip:address@hidden>
pol=accept
subscribe=0
proxy=-1
[friend_2]
url=key2 <sip:address@hidden>
pol=accept
subscribe=0
proxy=-1
friend_0 and friend_1 gets interchanged on every run, which I consider
as a bug, as they are referenced via number in "friend call".
Looking at the code, the friends are inserted into the lists with
sorting. Sorting is based on the username, beside other factors:
lc->friends=ms_list_insert_sorted(lc->friends,(void*)lf,friend_compare);
The comparison key username, in this case two times "apr", leads to such
behaviour.
For now, I locally replaced the insert call with
lc->friends=ms_list_append(lc->friends,(void *)lf);
I did not check if anything breaks because of this.
Simon, I'd suggest you should think about wheter
- Sorting is sensible here at all
- Modification of the sort criteria
Best regards,
Andreas
--
carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch Tel. 0731/98588-800
Marlene-Dietrich-Strasse 5 Fax: 0731/98588-801
89231 Neu-Ulm email: address@hidden
- [Linphone-developers] [BUG/RFC] linphonec 2.0.1 : friend list management,
Andreas Pretzsch <=