r7935 - /trunk/rms/src/rms.cpp
| Newsgroups | gmane.network.licq.cvs |
|---|---|
| Message-ID | <20101018193729.02CC9224B80@thejon> |
Author: flynd
Date: Tue Oct 19 04:37:28 2010
New Revision: 7935
Log:
Found a few more places in RMS where owner/user was assumed to exist.
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:37:28 2010
@@ -1366,12 +1366,14 @@
if (!myUserId.isValid())
{
Licq::OwnerWriteGuard o(LICQ_PPID);
- o->setAutoResponse(m_szText);
+ if (o.isLocked())
+ o->setAutoResponse(m_szText);
}
else
{
Licq::UserWriteGuard u(myUserId);
- u->setCustomAutoResponse(m_szText);
+ if (u.isLocked())
+ u->setCustomAutoResponse(m_szText);
}
fprintf(fs, "%d Auto response saved.\n", CODE_RESULTxSUCCESS);
@@ -1648,14 +1650,13 @@
else
{
Licq::UserReadGuard u(userId);
- if (u->Secure() == 0)
- {
- fprintf(fs, "%d Status: secure connection is closed.\n", CODE_SECURExSTAT);
- }
- if (u->Secure() == 1)
- {
- fprintf(fs, "%d Status: secure connection is open.\n", CODE_SECURExSTAT);
- }
+ if (u.isLocked())
+ {
+ if (u->Secure() == 0)
+ fprintf(fs, "%d Status: secure connection is closed.\n", CODE_SECURExSTAT);
+ if (u->Secure() == 1)
+ fprintf(fs, "%d Status: secure connection is open.\n", CODE_SECURExSTAT);
+ }
}
free(id);