r7934 - /trunk/rms/src/rms.cpp

[email protected]
Newsgroups gmane.network.licq.cvs
Message-ID <20101018193108.EDBF0224B80@thejon>
Author: flynd
Date: Tue Oct 19 04:31:06 2010
New Revision: 7934

Log:
Don't crash RMS plugin if trying to set status for an invalid protocol.

Modified:
    trunk/rms/src/rms.cpp

Modified: trunk/rms/src/rms.cpp
==============================================================================
--- trunk/rms/src/rms.cpp (original)
+++ trunk/rms/src/rms.cpp Tue Oct 19 04:31:06 2010
@@ -934,6 +934,11 @@
     bool b;
     {
       Licq::OwnerReadGuard o(nPPID);
+      if (!o.isLocked())
+      {
+        fprintf(fs, "%d Invalid protocol.\n", CODE_INVALIDxUSER);
+        return -1;
+      }
       b = !o->isOnline();
     }
     unsigned long tag = gProtocolManager.setStatus(ownerId, status);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.