Fixed some minor mistakes in progressive connectors.

This commit is contained in:
Thulinma 2013-10-08 14:03:33 +02:00
parent 7211e2ee6d
commit 002b75d0c9
2 changed files with 4 additions and 14 deletions

View file

@ -134,7 +134,7 @@ namespace Connector_HTTP {
unsigned int now = Util::epoch();
if (now != lastStats){
lastStats = now;
ss.SendNow(conn.getStats("HTTP_Progressive").c_str());
ss.SendNow(conn.getStats("HTTP_Progressive_FLV").c_str());
}
if (ss.spool()){
while (Strm.parsePacket(ss.Received())){
@ -186,7 +186,7 @@ namespace Connector_HTTP {
}
}
conn.close();
ss.SendNow(conn.getStats("HTTP_Dynamic").c_str());
ss.SendNow(conn.getStats("HTTP_Progressive_FLV").c_str());
ss.close();
return 0;
} //Progressive_Connector main function

View file

@ -50,17 +50,7 @@ namespace Connector_HTTP {
//Only attempt to parse input when not yet init'ed.
if ( !inited){
if (conn.Received().size() || conn.spool()){
//make sure it ends in a \n
if ( *(conn.Received().get().rbegin()) != '\n'){
std::string tmp = conn.Received().get();
conn.Received().get().clear();
if (conn.Received().size()){
conn.Received().get().insert(0, tmp);
}else{
conn.Received().append(tmp);
}
}
if (HTTP_R.Read(conn.Received().get())){
if (HTTP_R.Read(conn)){
#if DEBUG >= 5
std::cout << "Received request: " << HTTP_R.getUrl() << std::endl;
#endif
@ -195,7 +185,7 @@ namespace Connector_HTTP {
}
}
conn.close();
ss.SendNow(conn.getStats("HTTP_Dynamic").c_str());
ss.SendNow(conn.getStats("HTTP_Progressive_MP4").c_str());
ss.close();
return 0;
} //Progressive_Connector main function