diff options
Diffstat (limited to 'src/uscxml/plugins/ioprocessor/basichttp')
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp | 8 | ||||
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp index 6c7a8fc..ad47896 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp @@ -51,9 +51,11 @@ boost::shared_ptr<IOProcessorImpl> EventIOProcessor::create(Interpreter* interpr // register at http server std::string path = interpreter->getName(); - path += "/basichttp"; - if (!HTTPServer::registerServlet(path, io.get())) { - LOG(ERROR) << "Cannot register basichttp ioprocessor at " << path << ": " << " already taken"; + int i = 2; + while (!HTTPServer::registerServlet(path + "/basichttp", io.get())) { + std::stringstream ss; + ss << interpreter->getName() << i++; + path = ss.str(); } return io; diff --git a/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.h b/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.h index 70c6bea..9bb717b 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.h @@ -43,6 +43,8 @@ public: _url = url; } + bool canAdaptPath() { return false; } + // URLMonitor void downloadStarted(const URL& url); void downloadCompleted(const URL& url); |