mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 14:12:43 -04:00
JSON API service and RsThread fixups
This commit is contained in:
parent
f4d7fe4dde
commit
f12ec2b535
6 changed files with 88 additions and 53 deletions
|
@ -63,10 +63,13 @@ public:
|
|||
std::vector<std::shared_ptr<rb::Resource>> getResources() const;
|
||||
|
||||
/// @see RsJsonApi
|
||||
bool restart() override;
|
||||
void fullstop() override { RsThread::fullstop(); }
|
||||
|
||||
/// @see RsJsonApi
|
||||
bool fullstop() override;
|
||||
void restart() override;
|
||||
|
||||
/// @see RsJsonApi
|
||||
void askForStop() override { RsThread::askForStop(); }
|
||||
|
||||
/// @see RsJsonApi
|
||||
inline bool isRunning() override { return RsThread::isRunning(); }
|
||||
|
@ -193,6 +196,10 @@ private:
|
|||
std::less<const JsonApiResourceProvider> > mResourceProviders;
|
||||
|
||||
std::shared_ptr<restbed::Service> mService;
|
||||
/** Protect service only during very critical operation like resetting the
|
||||
* pointer, still not 100% thread safe, but hopefully we can avoid
|
||||
* crashes/freeze with this */
|
||||
RsMutex mServiceMutex;
|
||||
|
||||
uint16_t mListeningPort;
|
||||
std::string mBindingAddress;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue