]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Actually save the CAID, not just a name representing it
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 11 Jan 2010 21:11:06 +0000 (21:11 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 11 Jan 2010 21:11:06 +0000 (21:11 +0000)
src/psi.c

index 7cd25d59e60429b70fb2f4ff8a4fc1c64714139d..58c48e49b59ad14c277b284998dfa27482c858ed 100644 (file)
--- a/src/psi.c
+++ b/src/psi.c
@@ -780,6 +780,7 @@ psi_save_transport_settings(htsmsg_t *m, th_transport_t *t)
 
     if(st->st_type == SCT_CA) {
       htsmsg_add_str(sub, "caid", psi_caid2name(st->st_caid));
+      htsmsg_add_u32(sub, "caidnum", st->st_caid);
 
       if(st->st_providerid)
        htsmsg_add_u32(sub, "caproviderid", st->st_providerid);
@@ -845,8 +846,10 @@ psi_load_transport_settings(htsmsg_t *m, th_transport_t *t)
 
     if(!htsmsg_get_u32(c, "frameduration", &u32))
       st->st_frame_duration = u32;
-     
-    if((v = htsmsg_get_str(c, "caid")) != NULL) {
+
+    if(!htsmsg_get_u32(c, "caidnum", &u32)) {
+      st->st_caid = u32;
+    } else if((v = htsmsg_get_str(c, "caid")) != NULL) {
       int i = str2val(v, caidnametab);
       st->st_caid = i < 0 ? strtol(v, NULL, 0) : i;
     }