Add config option whether or not we sound send EMM to card server

This commit is contained in:
Andreas Öman 2009-11-15 21:19:06 +00:00
parent 385eff6053
commit 1778b4edd3
3 changed files with 27 additions and 5 deletions

View file

@ -48,6 +48,9 @@
<dt>DES Key
<dd>Initial DES key.
<dt>Update Card
<dd>Forward Entitlement Management Messages (EMMs) to the server.
<dt>Comment
<dd>Allows the administrator to set a comment only visible in this editor.
It does not serve any active purpose.

View file

@ -181,6 +181,7 @@ typedef struct cwc {
char *cwc_hostname;
int cwc_port;
char *cwc_id;
int cwc_emm;
const char *cwc_errtxt;
@ -487,6 +488,11 @@ cwc_decode_card_data_reply(cwc_t *cwc, uint8_t *msg, int len)
cwc->cwc_provider_ids[i] = id;
msg += 11;
}
tvhlog(LOG_INFO, "cwc", "%s: Will %sforward EMMs",
cwc->cwc_hostname,
cwc->cwc_emm ? "" : "not ");
return 0;
}
@ -932,8 +938,10 @@ cwc_table_input(struct th_descrambler *td, struct th_transport *t,
break;
default:
/* EMM */
cwc_send_msg(cwc, data, len, sid);
if (cwc->cwc_emm) {
/* EMM */
cwc_send_msg(cwc, data, len, sid);
}
break;
}
}
@ -1151,7 +1159,7 @@ cwc_record_build(cwc_t *cwc)
cwc->cwc_confedkey[0xd]);
htsmsg_add_str(e, "deskey", buf);
htsmsg_add_u32(e, "emm", cwc->cwc_emm);
htsmsg_add_str(e, "comment", cwc->cwc_comment ?: "");
return e;
@ -1237,6 +1245,9 @@ cwc_entry_update(void *opaque, const char *id, htsmsg_t *values, int maycreate)
memcpy(cwc->cwc_confedkey, key, 14);
}
if(!htsmsg_get_u32(values, "emm", &u32))
cwc->cwc_emm = u32;
cwc->cwc_reconfigure = 1;
if(cwc->cwc_fd != -1)

View file

@ -8,6 +8,12 @@ tvheadend.cwceditor = function() {
width: 60
});
var emmColumn = new Ext.grid.CheckColumn({
header: "Update Card",
dataIndex: 'emm',
width: 100
});
function setMetaAttr(meta, record){
var enabled = record.get('enabled');
if(!enabled) return;
@ -64,7 +70,9 @@ tvheadend.cwceditor = function() {
return '<span class="tvh-grid-unset">Hidden</span>';
},
editor: new fm.TextField({allowBlank: false})
},{
},
emmColumn,
{
header: "Comment",
dataIndex: 'comment',
width: 400,
@ -77,7 +85,7 @@ tvheadend.cwceditor = function() {
]);
var rec = Ext.data.Record.create([
'enabled','connected','hostname','port','username','password','deskey','comment'
'enabled','connected','hostname','port','username','password','deskey','emm','comment'
]);
store = new Ext.data.JsonStore({