- }
- else if (!checkTimeout())
- return; // continue reading
- if (valid && !checkTimeout())
- {
- // data seems consistent...
- __u32 summary_id = (data[3]<<8)|data[4];
-
- // ugly workaround to convert const __u8* to char*
- char *tmp=0;
- memcpy(&tmp, &data, sizeof(void*));
-
- len = 0;
- loop = data[12];
- pos = 13 + loop;
- loop = tmp[pos] & 0x0f;
- pos += 1;
- for( ; loop > 0; loop -- )
- {
- lenline = tmp[pos+len];
- tmp[pos+len] = ' ';
- len += lenline + 1;
- }
- if( len > 0 )
- tmp[pos+len] = 0;
- else
- tmp[pos+1] = 0;
-
- std::map<__u32, __u32>::iterator itProgid( m_program_ids.find( summary_id ) );
- if ( itProgid == m_program_ids.end() )
- { /* This part is to prevent to looping forever if some summaries are not received yet.
- There is a timeout of 4 sec. after the last successfully read summary. */
-
- if ( !m_program_ids.empty() && !checkTimeout() )
- return; // Continue reading of the current table.
- }