[mythtv] Backend dies when frontend lists tuner status for a tuner not bound to an input
Philippe
p.crassous at free.fr
Fri Nov 10 21:35:47 UTC 2006
Bill,
It works for me, and the fix is better here than in the frontend.
Would someone apply this patch, please ?
Thanks to all
Philippe
Bill Cizek wrote:
>
>>
>> When a tuner is not bound to an input and the frontend status window
>> queries tuner status, the backend dies (likely in HandleRemoteEncoder)
>>
>
> I ran into a similar problem when I was playing with a slave backend a
> while back. Attached is my patch to fix it. It may or may not fix
> your problem, but it's worth a try.
>
> -Bill
> ------------------------------------------------------------------------
>
> Index: mythtv/programs/mythbackend/mainserver.cpp
> ===================================================================
> --- mythtv/programs/mythbackend/mainserver.cpp (revision 11597)
> +++ mythtv/programs/mythbackend/mainserver.cpp (working copy)
> @@ -2951,10 +2951,22 @@
> QMap<int, EncoderLink *>::Iterator iter = encoderList->find(recnum);
> if (iter == encoderList->end())
> {
> - VERBOSE(VB_IMPORTANT, "MainServer: " +
> - QString("HandleRemoteEncoder(cmd %1) ").arg(slist[1]) +
> - QString("Unknown encoder: %1, exiting").arg(recnum));
> - exit(BACKEND_BUGGY_EXIT_UNKNOWN_ENC);
> + // Encoder not found
> + QString command = slist[1];
> + if (command == "GET_STATE")
> + {
> + QStringList retlist;
> + retlist << QString::number((int) kState_Error);
> + SendResponse(pbssock, retlist);
> + return;
> + }
> + else
> + {
> + VERBOSE(VB_IMPORTANT, "MainServer: " +
> + QString("HandleRemoteEncoder(cmd %1) ").arg(slist[1]) +
> + QString("Unknown encoder: %1, exiting").arg(recnum));
> + exit(BACKEND_BUGGY_EXIT_UNKNOWN_ENC);
> + }
> }
>
> EncoderLink *enc = iter.data();
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
More information about the mythtv-dev
mailing list