use same docroot in retroshare-nogui as in retroshare-gui

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8188 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-04-29 17:45:33 +00:00
parent fd5c53fad7
commit 4c5d8c2ede

View File

@ -75,7 +75,7 @@ int main(int argc, char **argv)
{ {
#ifdef ENABLE_WEBUI #ifdef ENABLE_WEBUI
std::string docroot = "./"; std::string docroot = "";
uint16_t httpPort = 0; uint16_t httpPort = 0;
std::string listenAddress; std::string listenAddress;
bool allowAllIps = false; bool allowAllIps = false;
@ -93,6 +93,9 @@ int main(int argc, char **argv)
std::cerr << args.usage() << std::endl; std::cerr << args.usage() << std::endl;
} }
if(docroot.empty())
docroot = resource_api::getDefaultDocroot();
resource_api::ApiServer api; resource_api::ApiServer api;
resource_api::RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true); resource_api::RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true);
api.addResourceHandler("control", dynamic_cast<resource_api::ResourceRouter*>(&ctrl_mod), &resource_api::RsControlModule::handleRequest); api.addResourceHandler("control", dynamic_cast<resource_api::ResourceRouter*>(&ctrl_mod), &resource_api::RsControlModule::handleRequest);