summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend_svr.c12
-rw-r--r--tools/playlist.c8
-rw-r--r--tools/udp_pes_scheduler.c8
-rw-r--r--xine_frontend_lirc.c7
-rw-r--r--xine_input_vdr.c7
5 files changed, 29 insertions, 13 deletions
diff --git a/frontend_svr.c b/frontend_svr.c
index 4403a9c4..c58888f4 100644
--- a/frontend_svr.c
+++ b/frontend_svr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.c,v 1.60 2008-11-14 22:01:57 phintuka Exp $
+ * $Id: frontend_svr.c,v 1.61 2008-11-16 15:02:45 rofafor Exp $
*
*/
@@ -1688,16 +1688,22 @@ void cXinelibServer::Handle_ClientConnected(int fd)
bool accepted = SVDRPhosts.Acceptable(sin.sin_addr.s_addr);
if(!accepted) {
+ const char *msg = "Access denied.\r\n";
+ ssize_t len = strlen(msg);
LOGMSG("Address not allowed to connect (svdrphosts.conf).");
- (void)write(fd, "Access denied.\r\n", 16);
+ if(write(fd, msg, len) != len)
+ LOGERR("Write failed.");
CLOSESOCKET(fd);
return;
}
if(cli>=MAXCLIENTS) {
+ const char *msg = "Server busy.\r\n";
+ ssize_t len = strlen(msg);
// too many clients
LOGMSG("Too many clients, connection refused");
- (void)write(fd, "Server busy.\r\n", 16);
+ if(write(fd, msg, len) != len)
+ LOGERR("Write failed.");
CLOSESOCKET(fd);
return;
}
diff --git a/tools/playlist.c b/tools/playlist.c
index a9b3d2ea..cb9cbeba 100644
--- a/tools/playlist.c
+++ b/tools/playlist.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: playlist.c,v 1.20 2008-10-31 20:55:57 phintuka Exp $
+ * $Id: playlist.c,v 1.21 2008-11-16 15:02:45 rofafor Exp $
*
*/
@@ -144,8 +144,10 @@ class cID3Scanner : public cThread
{
cPlaylistItem *Item = NULL;
unsigned int Version = 0;
-
- (void)nice(10);
+ const int priority = 10;
+ errno = 0;
+ if((nice(priority) == -1) && errno)
+ LOGDBG("ID3Scanner: Can't nice to value: %d", priority);
LOGDBG("ID3Scanner Started");
while(Running()) {
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index b4e3edd1..14611afe 100644
--- a/tools/udp_pes_scheduler.c
+++ b/tools/udp_pes_scheduler.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: udp_pes_scheduler.c,v 1.35 2008-11-14 22:48:35 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.36 2008-11-16 15:02:45 rofafor Exp $
*
*/
@@ -683,9 +683,11 @@ void cUdpScheduler::Action(void)
#endif
/* UDP Scheduler needs high priority */
- SetPriority(-5);
- (void)nice(-5);
+ const int priority = -5;
+ SetPriority(priority);
errno = 0;
+ if ((nice(priority) == -1) && errno)
+ LOGDBG("cUdpScheduler: Can't nice to value: %d", priority);
m_Lock.Lock();
diff --git a/xine_frontend_lirc.c b/xine_frontend_lirc.c
index a29fad6f..12820b07 100644
--- a/xine_frontend_lirc.c
+++ b/xine_frontend_lirc.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend_lirc.c,v 1.18 2008-11-16 00:09:25 phintuka Exp $
+ * $Id: xine_frontend_lirc.c,v 1.19 2008-11-16 15:02:45 rofafor Exp $
*
*/
/*
@@ -111,7 +111,10 @@ static void *lirc_receiver_thread(void *fe_gen)
LOGMSG("lirc forwarding started");
- (void)nice(-1);
+ const int priority = -1;
+ errno = 0;
+ if((nice(priority) == -1) && errno)
+ LOGDBG("LIRC: Can't nice to value: %d", priority);
lircd_connect();
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index a6eb3e99..f15b69fe 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_input_vdr.c,v 1.193 2008-11-15 13:45:50 phintuka Exp $
+ * $Id: xine_input_vdr.c,v 1.194 2008-11-16 15:02:45 rofafor Exp $
*
*/
@@ -4680,7 +4680,10 @@ static void *vdr_data_thread(void *this_gen)
LOGDBG("Data thread started");
- (void)nice(-1);
+ const int priority = -1;
+ errno = 0;
+ if((nice(priority) == -1) && errno)
+ LOGDBG("Data thread: Can't nice to value: %d", priority);
if(this->udp || this->rtp) {
while(this->control_running) {