diff options
Diffstat (limited to 'test/src/test-vxml-mmi-http.cpp')
-rw-r--r-- | test/src/test-vxml-mmi-http.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/src/test-vxml-mmi-http.cpp b/test/src/test-vxml-mmi-http.cpp index 0e4f5a9..2b2cd25 100644 --- a/test/src/test-vxml-mmi-http.cpp +++ b/test/src/test-vxml-mmi-http.cpp @@ -22,7 +22,7 @@ #include "XGetopt.h" #endif -#define ISSUE_REQUEST(name) {\ +#define ISSUE_REQUEST(name, block) {\ Arabica::DOM::Document<std::string> name##XML = name.toXML(true);\ name##XML.getDocumentElement().setPrefix("mmi");\ std::stringstream name##XMLSS;\ @@ -31,7 +31,8 @@ std::cout << "SEND:" << std::endl << name##XMLSS.str() << std::flush;\ name##URL.setOutContent(name##XMLSS.str());\ name##URL.addOutHeader("Content-type", "application/xml");\ - name##URL.download(false);\ + name##URL.download(block);\ + std::cout << "OK" << std::endl << std::flush;\ } using namespace uscxml; @@ -144,9 +145,10 @@ int main(int argc, char** argv) { newCtxReq.source = source; newCtxReq.target = target; newCtxReq.requestId = uscxml::UUID::getUUID(); - + Requests[newCtxReq.requestId] = &newCtxReq; - ISSUE_REQUEST(newCtxReq); + + ISSUE_REQUEST(newCtxReq, false); while(Replies.find(newCtxReq.requestId) == Replies.end()) Cond.wait(Mutex); @@ -160,7 +162,7 @@ int main(int argc, char** argv) { //"https://raw.githubusercontent.com/Roland-Taizun-Azhar/TaskAssistance-Project/master/WebContent/hello.vxml"; Requests[startReq.requestId] = &startReq; - ISSUE_REQUEST(startReq); + ISSUE_REQUEST(startReq, false); while(Replies.find(startReq.requestId) == Replies.end()) Cond.wait(Mutex); |