Ticket #2158: be.exit.on.enc.error.patch

File be.exit.on.enc.error.patch, 1.2 KB (added by anonymous, 15 years ago)
  • mythtv/programs/mythbackend/mainserver.cpp

    old new  
    29372937    QMap<int, EncoderLink *>::Iterator iter = encoderList->find(recnum);
    29382938    if (iter == encoderList->end())
    29392939    {
    2940         VERBOSE(VB_IMPORTANT, "MainServer: " +
    2941                 QString("HandleRemoteEncoder(cmd %1) ").arg(slist[1]) +
    2942                 QString("Unknown encoder: %1, exiting").arg(recnum));
    2943         exit(BACKEND_BUGGY_EXIT_UNKNOWN_ENC);
     2940        // Encoder not found
     2941        QString command = slist[1];
     2942        if (command == "GET_STATE")
     2943        {
     2944           QStringList retlist;
     2945           retlist << QString::number((int) kState_Error);
     2946           SendResponse(pbssock, retlist);
     2947           return;
     2948        }
     2949        else
     2950        {
     2951           VERBOSE(VB_IMPORTANT, "MainServer: " +
     2952                   QString("HandleRemoteEncoder(cmd %1) ").arg(slist[1]) +
     2953                   QString("Unknown encoder: %1, exiting").arg(recnum));
     2954           exit(BACKEND_BUGGY_EXIT_UNKNOWN_ENC);
     2955        }
    29442956    }
    29452957
    29462958    EncoderLink *enc = iter.data();