Fixed some minor mistakes in progressive connectors.
This commit is contained in:
parent
7211e2ee6d
commit
002b75d0c9
2 changed files with 4 additions and 14 deletions
|
@ -134,7 +134,7 @@ namespace Connector_HTTP {
|
||||||
unsigned int now = Util::epoch();
|
unsigned int now = Util::epoch();
|
||||||
if (now != lastStats){
|
if (now != lastStats){
|
||||||
lastStats = now;
|
lastStats = now;
|
||||||
ss.SendNow(conn.getStats("HTTP_Progressive").c_str());
|
ss.SendNow(conn.getStats("HTTP_Progressive_FLV").c_str());
|
||||||
}
|
}
|
||||||
if (ss.spool()){
|
if (ss.spool()){
|
||||||
while (Strm.parsePacket(ss.Received())){
|
while (Strm.parsePacket(ss.Received())){
|
||||||
|
@ -186,7 +186,7 @@ namespace Connector_HTTP {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conn.close();
|
conn.close();
|
||||||
ss.SendNow(conn.getStats("HTTP_Dynamic").c_str());
|
ss.SendNow(conn.getStats("HTTP_Progressive_FLV").c_str());
|
||||||
ss.close();
|
ss.close();
|
||||||
return 0;
|
return 0;
|
||||||
} //Progressive_Connector main function
|
} //Progressive_Connector main function
|
||||||
|
|
|
@ -50,17 +50,7 @@ namespace Connector_HTTP {
|
||||||
//Only attempt to parse input when not yet init'ed.
|
//Only attempt to parse input when not yet init'ed.
|
||||||
if ( !inited){
|
if ( !inited){
|
||||||
if (conn.Received().size() || conn.spool()){
|
if (conn.Received().size() || conn.spool()){
|
||||||
//make sure it ends in a \n
|
if (HTTP_R.Read(conn)){
|
||||||
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 DEBUG >= 5
|
#if DEBUG >= 5
|
||||||
std::cout << "Received request: " << HTTP_R.getUrl() << std::endl;
|
std::cout << "Received request: " << HTTP_R.getUrl() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +185,7 @@ namespace Connector_HTTP {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conn.close();
|
conn.close();
|
||||||
ss.SendNow(conn.getStats("HTTP_Dynamic").c_str());
|
ss.SendNow(conn.getStats("HTTP_Progressive_MP4").c_str());
|
||||||
ss.close();
|
ss.close();
|
||||||
return 0;
|
return 0;
|
||||||
} //Progressive_Connector main function
|
} //Progressive_Connector main function
|
||||||
|
|
Loading…
Add table
Reference in a new issue