vdr_streamdev: use full 64-bit from stat for recordings.
[people/teissler/ipfire-2.x.git] / src / patches / vdr-streamdev_recordings-64.patch
index 00baf89f3187b4323ef05a188a1ab18e475ee83a..2dc5250b4897d4c2dd72eb95662553c646ece7d6 100644 (file)
@@ -1,12 +1,29 @@
+diff -Naur vdr-streamdev-10db11ac.org/server/connectionHTTP.c vdr-streamdev-10db11ac/server/connectionHTTP.c
+--- vdr-streamdev-10db11ac.org/server/connectionHTTP.c 2013-02-18 12:43:02.000000000 +0100
++++ vdr-streamdev-10db11ac/server/connectionHTTP.c     2013-04-29 15:16:40.049168127 +0200
+@@ -455,11 +455,11 @@
+               return NULL;
+       char *p = NULL;
+-      unsigned long l = strtoul(FileBase, &p, 0);
++      unsigned long long l = strtoull(FileBase, &p, 0);
+       if (p != FileBase && l > 0L) {
+               if (*p == ':') {
+                       // get recording by dev:inode
+-                      unsigned long inode = strtoul(p + 1, &p, 0);
++                      unsigned long long inode = strtoull(p + 1, &p, 0);
+                       if (*p == 0 && inode > 0) {
+                               struct stat st;
+                               cThreadLock RecordingsLock(&Recordings);
 diff -Naur vdr-streamdev-10db11ac.org/server/menuHTTP.c vdr-streamdev-10db11ac/server/menuHTTP.c
 --- vdr-streamdev-10db11ac.org/server/menuHTTP.c       2013-02-18 12:43:02.000000000 +0100
-+++ vdr-streamdev-10db11ac/server/menuHTTP.c   2013-04-29 13:34:11.818857417 +0200
++++ vdr-streamdev-10db11ac/server/menuHTTP.c   2013-04-29 15:15:30.352502787 +0200
 @@ -28,7 +28,7 @@
  {
        struct stat st;
        if (stat(current->FileName(), &st) == 0)
 -              return cString::sprintf("%lu:%lu.rec", st.st_dev, st.st_ino);
-+              return cString::sprintf("%lu:%lu.rec", (unsigned long) st.st_dev, (unsigned long) st.st_ino);
++              return cString::sprintf("%llu:%llu.rec", (unsigned long long) st.st_dev, (unsigned long long) st.st_ino);
        return "";
  }