| 154 | } |
| 155 | |
| 156 | void TraceSvcJrd::stopSession(ULONG id) |
| 157 | { |
| 158 | m_svc.started(); |
| 159 | |
| 160 | ConfigStorage* storage = TraceManager::getStorage(); |
| 161 | StorageGuard guard(storage); |
| 162 | |
| 163 | TraceSession session(*getDefaultMemoryPool()); |
| 164 | session.ses_id = id; |
| 165 | if (storage->getSession(session, ConfigStorage::AUTH)) |
| 166 | { |
| 167 | if (checkPrivileges(session)) |
| 168 | { |
| 169 | storage->removeSession(id); |
| 170 | m_svc.printf(false, "Trace session ID %ld stopped\n", id); |
| 171 | } |
| 172 | else |
| 173 | m_svc.printf(false, "No permissions to stop other user trace session\n"); |
| 174 | |
| 175 | return; |
| 176 | } |
| 177 | |
| 178 | m_svc.printf(false, "Trace session ID %d not found\n", id); |
| 179 | } |
| 180 | |
| 181 | void TraceSvcJrd::setActive(ULONG id, bool active) |
| 182 | { |
no test coverage detected