From 61cfefc94022c3fa8bfe1a2900bd02a3602796bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Mar 2014 20:01:15 +0000 Subject: experimental: a default sub would be used if it's not offline git-svn-id: http://svn.miranda-ng.org/main/trunk@8733 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/metacontacts/meta_api.cpp | 5 +---- src/modules/metacontacts/meta_utils.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/metacontacts/meta_api.cpp b/src/modules/metacontacts/meta_api.cpp index cfca0ed968..f1b0926ad1 100644 --- a/src/modules/metacontacts/meta_api.cpp +++ b/src/modules/metacontacts/meta_api.cpp @@ -32,10 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static INT_PTR MetaAPI_GetMostOnline(WPARAM hMetaContact, LPARAM) { DBCachedContact *cc = CheckMeta(hMetaContact); - if (cc == NULL) - return NULL; - - return Meta_GetMostOnline(cc); + return (cc == NULL) ? NULL : Meta_GetMostOnline(cc); } // wParam=(HANDLE)hContact diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index 611ba1e0cd..05fa5aa248 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -251,7 +251,7 @@ MCONTACT Meta_GetMostOnlineSupporting(DBCachedContact *cc, int pflagnum, unsigne // if our default is not offline, and option to use default is set - return default // and also if our default is online, return it - if (most_online_status == ID_STATUS_ONLINE) + if (most_online_status != ID_STATUS_OFFLINE) return most_online_contact; } else most_online_status = ID_STATUS_OFFLINE; -- cgit v1.2.3