Skip to content
Browse files

Optimize MainServer::HandleFileTransferQuery()

  • Loading branch information...
1 parent 529853d commit d4672dde509268248660f2769651bd10fe02cd7e @stuartm stuartm committed
Showing with 17 additions and 17 deletions.
  1. +17 −17 mythtv/programs/mythbackend/mainserver.cpp
View
34 mythtv/programs/mythbackend/mainserver.cpp
@@ -5039,23 +5039,8 @@ void MainServer::HandleFileTransferQuery(QStringList &slist,
ft->IncrRef();
sockListLock.unlock();
-
- if (command == "IS_OPEN")
- {
- bool isopen = ft->isOpen();
-
- retlist << QString::number(isopen);
- }
- else if (command == "REOPEN")
- {
- retlist << QString::number(ft->ReOpen(slist[2]));
- }
- else if (command == "DONE")
- {
- ft->Stop();
- retlist << "ok";
- }
- else if (command == "REQUEST_BLOCK")
+
+ if (command == "REQUEST_BLOCK")
{
int size = slist[2].toInt();
@@ -5076,6 +5061,21 @@ void MainServer::HandleFileTransferQuery(QStringList &slist,
long long ret = ft->Seek(curpos, pos, whence);
retlist << QString::number(ret);
}
+ else if (command == "IS_OPEN")
+ {
+ bool isopen = ft->isOpen();
+
+ retlist << QString::number(isopen);
+ }
+ else if (command == "REOPEN")
+ {
+ retlist << QString::number(ft->ReOpen(slist[2]));
+ }
+ else if (command == "DONE")
+ {
+ ft->Stop();
+ retlist << "ok";
+ }
else if (command == "SET_TIMEOUT")
{
bool fast = slist[2].toInt();

0 comments on commit d4672dd

Please sign in to comment.
Something went wrong with that request. Please try again.