引越ししました。
epgrecブランチ(もしくはフォーク)「epgrec UNA」を公開!
人柱募集中です。
*** storeProgram.inc.old.php 2010-09-04 21:08:26.074996000 +0900
--- storeProgram.inc.php 2011-07-22 23:09:27.217377015 +0900
***************
*** 65,73 ****
}
}
else {
! // 存在した場合も、とりあえずチャンネル名は更新する
$rec = new DBRecord(CHANNEL_TBL, "channel_disc", $disc );
$rec->name = $ch->{'display-name'};
}
}
catch( Exception $e ) {
--- 65,81 ----
}
}
else {
! /* // 存在した場合も、とりあえずチャンネル名は更新する
$rec = new DBRecord(CHANNEL_TBL, "channel_disc", $disc );
$rec->name = $ch->{'display-name'};
+ */
+ // チャンネル名の更新ではない場合に被害が大きいのでログを残して終了する
+ $rec = new DBRecord(CHANNEL_TBL, "channel_disc", $disc );
+ if( $rec->name != $ch->{'display-name'} ){
+ reclog( 'getepg::チャンネル名が違います('.$disc.' [OLD]'.$rec->name.' -> [NEW]'.$ch->{'display-name'}.')', E_ERROR );
+ // $new_name = $xmlfile.'.'.date("Y-m-d H:i:s", time());
+ // rename( $xmlfile, $new_name );
+ return; //信頼できないデータなので終了
}
}
catch( Exception $e ) {
--- ./org/eit.c 2009-11-18 12:23:01.000000000 +0900
+++ eit.c 2011-01-22 15:45:11.388454332 +0900
@@ -531,7 +531,7 @@
if((eith.original_network_id == original_network_id) && (eith.transport_stream_id == transport_stream_id)){
cur = searcheit(eittop, eith.service_id, eitb.event_id);
if(cur != NULL){
- cur->content_type = (unsigned char)(contentDesc.content[0] >> 4);
+ cur->content_type = *((unsigned char *)contentDesc.content) >> 4;
#if 0
fprintf(stdout, "%s:", cur->title);
fprintf(stdout, ",%02x%02x", (unsigned char)contentDesc.content[0], (unsigned char)contentDesc.content[1]);