INCLUDES +=
-DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D__STL_CONFIG_H
# VOMP-INSERT
DEFINES += -DVOMPSERVER
while (newPos < position)
{
- fgets(buffer, BUFFER_LENGTH-1, file);
+ if (!fgets(buffer, BUFFER_LENGTH-1, file)) break;
fputs(buffer, newFile);
newPos += strlen(buffer);
}
}
FILE* newFile = copyToHere(ftell(file) - lastLineLength);
- fgets(buffer, BUFFER_LENGTH-1, file);
+
+ if ( fgets(buffer, BUFFER_LENGTH-1, file) );
return copyRest(newFile);
}
return 0;
}
- fgets(buffer, BUFFER_LENGTH-1, file);
+ if ( fgets(buffer, BUFFER_LENGTH-1, file) );
fprintf(newFile, "%s = %s\n", key, newValue);
return copyRest(newFile);
}
const char *dirname=parent->getName();
//open the directory and read out the entries
DIR *d=opendir(dirname);
+ if (d == NULL) return rt;
struct dirent *e;
+
+ /* readdir_r is now deprecated in favour of readdir (which is effectively thread safe)
union { // according to "The GNU C Library Reference Manual"
struct dirent d;
char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
} u;
while (d != NULL && (readdir_r(d,&u.d,&e) == 0) && e != NULL) {
+ */
+
+ while (e = readdir(d)) {
const char * fname=e->d_name;
if ( fname == NULL) continue;
if (strcmp(fname,".") == 0) continue;
if (m) delete m;
}
}
- if (d != NULL) closedir(d);
+ closedir(d);
return rt;
- }
+}
int MediaFile::openMedium(ULONG channel, const MediaURI * uri, ULLONG * size, ULONG xsize, ULONG ysize) {
switch (req.type) {
case 0: { //serie
- if (series.seriesId != req.primary_id ||
- series.episodeId != req.secondary_id) {
+ if (series.seriesId != (int)req.primary_id ||
+ series.episodeId != (int)req.secondary_id) {
series.actors.clear();
series.posters.clear();
series.banners.clear();
return std::string("");
} break;
case 1: { //movie
- if (movie.movieId != req.primary_id ) {
+ if (movie.movieId != (int)req.primary_id ) {
movie.actors.clear();
movie.movieId = req.primary_id;
x->scraper->Service("GetMovie",&movie);
ULONG *p;
ULONG headerLength = sizeof(ULONG) * 4;
UCHAR buffer[headerLength];
- int amountReceived;
// threadSetKillable(); ??
{
if (!channel->GroupSep())
{
-// log->log("Client", Log::DEBUG, "Looking for channel %lu::: number: %i name: '%s'", channelNumber, channel->Number(), channel->Name());
-
- if (channel->Number() == (int)channelNumber)
- {
- int vpid = channel->Vpid();
-#if VDRVERSNUM < 10300
- int apid1 = channel->Apid1();
-#else
- int apid1 = channel->Apid(0);
-#endif
-// log->log("Client", Log::DEBUG, "Found channel number %lu, vpid = %i, apid1 = %i", channelNumber, vpid, apid1);
- return channel;
- }
+// log->log("Client", Log::DEBUG, "Looking for channel %lu::: number: %i name: '%s'", channelNumber, channel->Number(), channel->Name());
+ if (channel->Number() == (int)channelNumber) return channel;
}
}
cSchedulesLock MutexLock;
const cSchedules *Schedules = cSchedules::Schedules(MutexLock);
#endif
- const cSchedule * Schedule;
if (Schedules && channel)
{
const cSchedule *Schedule = Schedules->GetSchedule(channel->GetChannelID());