diff --git a/docs/html/config_cwc.html b/docs/html/config_cwc.html
index a0f31d69..6140ffda 100644
--- a/docs/html/config_cwc.html
+++ b/docs/html/config_cwc.html
@@ -48,6 +48,9 @@
DES Key
Initial DES key.
+ Update Card
+ Forward Entitlement Management Messages (EMMs) to the server.
+
Comment
Allows the administrator to set a comment only visible in this editor.
It does not serve any active purpose.
diff --git a/src/cwc.c b/src/cwc.c
index eb3052ad..b3bc8b6c 100644
--- a/src/cwc.c
+++ b/src/cwc.c
@@ -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)
diff --git a/src/webui/static/app/cwceditor.js b/src/webui/static/app/cwceditor.js
index db507e4f..ac57f90f 100644
--- a/src/webui/static/app/cwceditor.js
+++ b/src/webui/static/app/cwceditor.js
@@ -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 'Hidden';
},
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({