diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-30 13:58:47 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-30 13:58:47 (GMT) |
commit | 3e3c9ff5c1d0f2432283d3380a3410406f84be26 (patch) | |
tree | 7fdc15937dd155b870c776833ee293fde874e310 /src | |
parent | 0fb58c8183be355a386a2f61a2f69e20143c0be4 (diff) | |
download | uscxml-3e3c9ff5c1d0f2432283d3380a3410406f84be26.zip uscxml-3e3c9ff5c1d0f2432283d3380a3410406f84be26.tar.gz uscxml-3e3c9ff5c1d0f2432283d3380a3410406f84be26.tar.bz2 |
Content-type header with firefox and case-typo with reflectorip in miles
Diffstat (limited to 'src')
-rw-r--r-- | src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp | 17 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 4 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp index bd466b6..a15956e 100644 --- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp +++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp @@ -103,11 +103,14 @@ void MilesSessionInvoker::send(const SendRequest& req) { returnEvent(retEv); } else if (iequals(req.name, "connect")) { + + std::cout << req; + std::string email = "someSaneDefault"; Event::getParam(req.params, "email", email); - std::string reflectorIP = "127.0.0.1"; - Event::getParam(req.params, "reflectorip", reflectorIP); + std::string reflectorIp = "127.0.0.1"; + Event::getParam(req.params, "reflectorIp", reflectorIp); std::string problemName = "Generic"; Event::getParam(req.params, "problemname", problemName); @@ -115,21 +118,21 @@ void MilesSessionInvoker::send(const SendRequest& req) { return; int rv; - rv = miles_connect_reflector_session((char*)reflectorIP.c_str(), (char*)problemName.c_str()); + rv = miles_connect_reflector_session((char*)reflectorIp.c_str(), (char*)problemName.c_str()); if (!rv) { LOG(ERROR) << "Could not setup reflector session"; return; } /* Set up audio and video RTP sockets */ - video_rtp_in_socket = miles_net_setup_udp_socket((char*)reflectorIP.c_str(), video_port, video_port, 10, 16000); - audio_rtp_in_socket = miles_net_setup_udp_socket((char*)reflectorIP.c_str(), audio_port, audio_port, 10, 16000); + video_rtp_in_socket = miles_net_setup_udp_socket((char*)reflectorIp.c_str(), video_port, video_port, 10, 16000); + audio_rtp_in_socket = miles_net_setup_udp_socket((char*)reflectorIp.c_str(), audio_port, audio_port, 10, 16000); video_rtp_out_socket = video_rtp_in_socket; //miles_net_setup_udp_socket((char*)reflectorIP.c_str(), video_port, 0, 10, 16000); audio_rtp_out_socket = audio_rtp_in_socket; //miles_net_setup_udp_socket((char*)reflectorIP.c_str(), audio_port, 0, 10, 16000); /* Set up audio and video RTCP sockets */ - video_rtcp_in_socket = miles_net_setup_udp_socket((char*)reflectorIP.c_str(), video_port+1, video_port+1, 10, 16000); - audio_rtcp_in_socket = miles_net_setup_udp_socket((char*)reflectorIP.c_str(), audio_port+1, audio_port+1, 10, 16000); + video_rtcp_in_socket = miles_net_setup_udp_socket((char*)reflectorIp.c_str(), video_port+1, video_port+1, 10, 16000); + audio_rtcp_in_socket = miles_net_setup_udp_socket((char*)reflectorIp.c_str(), audio_port+1, audio_port+1, 10, 16000); video_rtcp_out_socket = video_rtcp_in_socket; //miles_net_setup_udp_socket((char*)reflectorIP.c_str(), video_port+1, 0, 10, 16000); audio_rtcp_out_socket = audio_rtcp_in_socket; //miles_net_setup_udp_socket((char*)reflectorIP.c_str(), audio_port+1, 0, 10, 16000); diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 09dc0b6..efd49a5 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -387,11 +387,11 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD key.clear(); } request.data.compound["content"].atom.clear(); - } else if (iequals(contentType, "application/json")) { + } else if (iequals(contentType.substr(0, 16), "application/json")) { request.data.compound["content"] = Data::fromJSON(request.data.compound["content"].atom); } } - + request.raw = raw.str(); // try with the handler registered for path first |