Bug#889563: linphone: Wrong contact list sort order

Rob van der Putten rob at sput.nl
Sun Feb 4 14:52:02 UTC 2018


Package: linphone
Version: 3.6.1-3
Severity: normal

Dear Maintainer,


Linphone sorts contacts by username (EG: <sip:jdoe at example.org>) as
opposed to display_name (EG: "John Doe"). Below a small patch by a friend
which fixes this problem;


--- friendlist.c.bak    2013-05-15 13:02:23.606072868 +0200
+++ friendlist.c        2018-02-03 19:54:22.712164226 +0100
@@ -588,8 +588,15 @@
                const LinphoneAddress *addr1,*addr2;
                addr1=linphone_friend_get_address(lf1);
                addr2=linphone_friend_get_address(lf2);
-               u1=linphone_address_get_username(addr1);
-               u2=linphone_address_get_username(addr2);
+               /*    Fix by Simon IJskes    */
+               u1=linphone_address_get_display_name(addr1);
+               if (u1 == NULL) {
+                       u1=linphone_address_get_username(addr1);
+               }
+               u2=linphone_address_get_display_name(addr2);
+               if (u2 == NULL) {
+                       u2=linphone_address_get_username(addr2);
+               }
                if (u1 && u2) return strcasecmp(u1,u2);
                if (u1) return 1;
                else return -1;
@@ -1077,4 +1084,4 @@
 void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
        /*refresh the entire list*/
        linphone_gtk_show_friends();
-}
\ No newline at end of file
+}


It's not known if the tests u1 == NULL and u2 == NULL are really
necessary, but it can't hurt.


Rgards,
Rob

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages linphone depends on:
ii  libasound2                1.1.3-5
ii  libatk1.0-0               2.22.0-1
ii  libavcodec57              7:3.2.10-1~deb9u1
ii  libavutil55               7:3.2.10-1~deb9u1
ii  libc6                     2.24-11+deb9u1
ii  libcairo2                 1.14.8-1
ii  libexosip2-11             4.1.0-2.1
ii  libfontconfig1            2.11.0-6.7+b1
ii  libfreetype6              2.6.3-3.2
ii  libgdk-pixbuf2.0-0        2.36.5-2+deb9u2
ii  libgl1-mesa-glx [libgl1]  13.0.6-1+b2
ii  libglew2.0                2.0.0-3+b1
ii  libglib2.0-0              2.50.3-2
ii  libglu1-mesa [libglu1]    9.0.0-2.1
ii  libgtk2.0-0               2.24.31-2
ii  liblinphone5              3.6.1-3
ii  libmediastreamer-base3    3.6.1-3
ii  libnotify4                0.7.7-2
ii  libogg0                   1.3.2-1
ii  libopus0                  1.2~alpha2-1
ii  libortp9                  3.6.1-3
ii  libosip2-11               4.1.0-2.1
ii  libpango-1.0-0            1.40.5-1
ii  libpangocairo-1.0-0       1.40.5-1
ii  libpangoft2-1.0-0         1.40.5-1
ii  libpulse0                 10.0-1+deb9u1
ii  libsoup2.4-1              2.56.0-2+deb9u1
ii  libspandsp2               0.0.6+dfsg-0.1
ii  libspeex1                 1.2~rc1.2-1+b2
ii  libspeexdsp1              1.2~rc1.2-1+b2
ii  libsqlite3-0              3.16.2-5+deb9u1
ii  libswscale4               7:3.2.10-1~deb9u1
ii  libtheora0                1.1.1+dfsg.1-14+b1
ii  libudev1                  232-25+deb9u1
ii  libupnp6                  1:1.6.19+git20160116-1.2
ii  libv4l-0                  1.12.3-1
ii  libvpx4                   1.6.1-3
ii  libx11-6                  2:1.6.4-3
ii  libxv1                    2:1.0.11-1
ii  linphone-nogtk            3.6.1-3

linphone recommends no packages.

Versions of packages linphone suggests:
ii  yelp  3.22.0-1

-- no debconf information



More information about the Pkg-voip-maintainers mailing list