| 288 | } |
| 289 | |
| 290 | bool CRPCTable::appendCommand(const std::string& name, const CRPCCommand* pcmd) |
| 291 | { |
| 292 | if (IsRPCRunning()) |
| 293 | return false; |
| 294 | |
| 295 | // don't allow overwriting for now |
| 296 | std::map<std::string, const CRPCCommand*>::const_iterator it = mapCommands.find(name); |
| 297 | if (it != mapCommands.end()) |
| 298 | return false; |
| 299 | |
| 300 | mapCommands[name] = pcmd; |
| 301 | return true; |
| 302 | } |
| 303 | |
| 304 | void StartRPC() |
| 305 | { |