summaryrefslogtreecommitdiff
path: root/protocols/JabberG/jabber_misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-03 15:16:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-03 15:16:37 +0000
commit78f8991554dd09d2e7f7efcdd9dcacf18f75f428 (patch)
treeef50761216cd51b0da6cb17b3ca1199de10fb6cf /protocols/JabberG/jabber_misc.cpp
parentcfe2d8b10186a7ed42ba0dffd75528a38bee1435 (diff)
old svn info removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@735 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/jabber_misc.cpp')
-rw-r--r--protocols/JabberG/jabber_misc.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/protocols/JabberG/jabber_misc.cpp b/protocols/JabberG/jabber_misc.cpp
index 09e5d8f0ee..1faeaaadda 100644
--- a/protocols/JabberG/jabber_misc.cpp
+++ b/protocols/JabberG/jabber_misc.cpp
@@ -2,7 +2,7 @@
Jabber Protocol Plugin for Miranda IM
Copyright ( C ) 2002-04 Santithorn Bunchua
-Copyright ( C ) 2005-11 George Hazan
+Copyright ( C ) 2005-12 George Hazan
Copyright ( C ) 2007 Maxim Mluhov
This program is free software; you can redistribute it and/or
@@ -19,10 +19,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-Revision : $Revision: 13898 $
-Last change on : $Date: 2006-07-13 16:11:29 +0400
-Last change by : $Author: borkra $
-
*/
#include "jabber.h"
@@ -471,15 +467,10 @@ void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item)
Log("JabberUpdateMirVer: for jid " TCHAR_STR_PARAM, item->jid);
- int resource = -1;
- if (item->resourceMode == RSMODE_LASTSEEN)
- resource = item->lastSeenResource;
- else if (item->resourceMode == RSMODE_MANUAL)
- resource = item->manualResource;
- if ((resource < 0) || (resource >= item->resourceCount))
- return;
+ JABBER_RESOURCE_STATUS *resource = item->resourceMode == RSMODE_MANUAL ? item->manualResource : item->lastSeenResource;
+ if (resource == NULL) resource = &item->resource[0];
- UpdateMirVer( hContact, &item->resource[resource] );
+ UpdateMirVer( hContact, resource );
}
void CJabberProto::FormatMirVer(JABBER_RESOURCE_STATUS *resource, TCHAR *buf, int bufSize)