mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
Fixed recordings menu inode numbers: ino_t is a long long on some systems
This commit is contained in:
parent
329129d9c1
commit
b25e53c867
1
HISTORY
1
HISTORY
@ -1,6 +1,7 @@
|
||||
VDR Plugin 'streamdev' Revision History
|
||||
---------------------------------------
|
||||
|
||||
- Fixed recordings menu inode numbers: ino_t is a long long on some systems
|
||||
- Updated Slovak translation (thanks to Milan Hrala)
|
||||
- Adapted Makefiles to VDR 1.7.36+ (thanks to macmenot). Old makefiles have
|
||||
been renamed to Makefile-1.7.33.
|
||||
|
@ -459,12 +459,12 @@ cRecording* cConnectionHTTP::RecordingFromString(const char *FileBase, const cha
|
||||
if (p != FileBase && l > 0L) {
|
||||
if (*p == ':') {
|
||||
// get recording by dev:inode
|
||||
unsigned long inode = strtoul(p + 1, &p, 0);
|
||||
ino_t inode = (ino_t) strtoull(p + 1, &p, 0);
|
||||
if (*p == 0 && inode > 0) {
|
||||
struct stat st;
|
||||
cThreadLock RecordingsLock(&Recordings);
|
||||
for (cRecording *rec = Recordings.First(); rec; rec = Recordings.Next(rec)) {
|
||||
if (stat(rec->FileName(), &st) == 0 && st.st_dev == (dev_t) l && st.st_ino == (ino_t) inode)
|
||||
if (stat(rec->FileName(), &st) == 0 && st.st_dev == (dev_t) l && st.st_ino == inode)
|
||||
return new cRecording(rec->FileName());
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ const cString cRecordingsIterator::ItemRessource() const
|
||||
{
|
||||
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:%llu.rec", (unsigned long) st.st_dev, (unsigned long long) st.st_ino);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user