bool SessionManager::isEncryptionEnabled( std::string addr ) { lockSessions(); SessionEntry* entry = findSessionByAddress( addr ); if ( entry == NULL ) { unlockSessions(); return false; // this doesn't quite make sense - should throw some other // kind of error for session not found? } bool ret = entry->isEncryptionEnabled(); unlockSessions(); return ret; }