diff options
Diffstat (limited to 'src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp')
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp | 8 |
1 files changed, 5 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; |