[mythtv] [OT] Protocol Question: QUERY_RECORDINGS

Yan-Fa Li yanfali at best.com
Wed Mar 2 19:34:38 UTC 2005


Bill Jackson wrote:
> Yan-Fa Li wrote:
> 
>> Simple question for all you protocol experts.  Version 0.17 seems to 
>> be reporting one more program in the header than it actually 
>> supplies.  Is this a bug or just an implementation detail for using 
>> loops ?
>>
>> DATA_LENGTH PROGRAM_COUNT[]:[]REST OF PROGRAM DATA
>>
>> On my backend it says 217, but when I actually process the data it 
>> comes up as 216.  Is this deliberate ? 
> 
> 
> 
> Yan,
>    I'm not an expert, but my guess is that it's not.
>    The code thats generating the response is in:
> 
>       programs/mythbackend/mainserver.cpp
> 
>    By my reading of 'HandleQueryRecordings', the logic is basically:
> 
>        // query 'recorded' table
>        outputlist << QString::number(query.size());
>        while (query.next()) {
>            ProgramInfo *proginfo = query2pginfo(query);
>            proginfo->ToStringList(outputlist);
>        }
>         SendResponse(pbssock, outputlist)
> 
>    I don't see how this code could produce the results you're seeing.
>    You might want to double check your end?
> -bj
> 

Thanks, that clears it up.  I think I'm discarding the last one I'm 
processing after exiting the loop instead of adding it to my List.  My 
bad.  I will take a look at my doofus code.  Thanks for the help.

Yan


More information about the mythtv-dev mailing list