Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: VDR 1.3.3: fix for language codes in channels.conf



Gee, yesterday really wasn't my day...

There was yet another problem:

--- channels.c  2004/01/25 16:51:37     1.22
+++ channels.c  2004/01/26 16:22:44
@@ -322,6 +322,8 @@
         q += sprintf(q, Base == 16 ? "%s%X" : "%s%d", i ? "," : "", a[i]);
         if (a[i] && n && *n[i])
            q += sprintf(q, "=%s", n[i]);
+        if (!a[i])
+           break;
         i++;
         }
   *q = 0;

For those who would like to have the complete patch against version 1.3.3,
here it is:

--- channels.c  2004/01/25 15:32:08     1.20
+++ channels.c  2004/01/26 16:22:44
@@ -320,8 +320,10 @@
   int i = 0;
   while (a[i] || i == 0) {
         q += sprintf(q, Base == 16 ? "%s%X" : "%s%d", i ? "," : "", a[i]);
-        if (n && *n[i])
+        if (a[i] && n && *n[i])
            q += sprintf(q, "=%s", n[i]);
+        if (!a[i])
+           break;
         i++;
         }
   *q = 0;
@@ -375,8 +377,11 @@
      IntArrayToString(OldCaIdsBuf, caids, 16);
      IntArrayToString(NewCaIdsBuf, CaIds, 16);
      dsyslog("changing caids of channel %d from %s to %s", Number(), OldCaIdsBuf, NewCaIdsBuf);
-     for (int i = 0; i <= MAXCAIDS && CaIds[i]; i++) // <= to copy the terminating 0
+     for (int i = 0; i <= MAXCAIDS; i++) { // <= to copy the terminating 0
          caids[i] = CaIds[i];
+         if (!CaIds[i])
+            break;
+         }
      modification |= CHANNELMOD_CA;
      Channels.SetModified();
      }


Sorry about the inconvenience.

Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index