]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Corrected ssize_t log printing. Cleanup.
authorSergio Costa Fortier <sergiofortier@yahoo.com.br>
Fri, 8 Aug 2014 17:04:59 +0000 (14:04 -0300)
committerJaroslav Kysela <perex@perex.cz>
Sat, 16 Aug 2014 13:54:08 +0000 (15:54 +0200)
src/descrambler/capmt.c
src/input/mpegts/satip/satip.c
src/input/mpegts/satip/satip_frontend.c
src/timeshift/timeshift_reader.c
src/upnp.c

index e9a62acedd5bcfbaa77fcfedfc3ec4ca6f1b6cb8..8d9d4b6dc97526aa0dc3728f0df1a2245c0e1ca6 100644 (file)
@@ -627,7 +627,11 @@ capmt_write_msg(capmt_t *capmt, int adapter, int sid, const uint8_t *buf, size_t
 
   res = send(fd, buf, len, MSG_DONTWAIT);
   if (res < len) {
-    tvhlog(LOG_DEBUG, "capmt", "Message send failed to socket %i (%li)", fd, res);
+#if ENABLE_ANDROID
+    tvhlog(LOG_DEBUG, "capmt", "Message send failed to socket %i (%li)", fd, res); // Android bug, ssize_t is long int
+#else
+    tvhlog(LOG_DEBUG, "capmt", "Message send failed to socket %i (%zi)", fd, res);
+#endif
     if (capmt->capmt_oscam != CAPMT_OSCAM_SO_WRAPPER) {
       capmt_socket_close_lock(capmt, i);
       return -1;
index 901a00923eba38354e71d52089147c78e116a139..0f65b599bf7ff9c21d4d7ae559c739874c899a76 100644 (file)
 #include <arpa/inet.h>
 #include <openssl/sha.h>
 
-#if defined(PLATFORM_FREEBSD)
+#if defined(PLATFORM_FREEBSD) || ENABLE_ANDROID
 #include <sys/types.h>
 #include <sys/socket.h>
 #endif
 
-#if ENABLE_ANDROID
-#include <sys/socket.h>
-#endif
-
 static void satip_device_discovery_start( void );
 
 /*
index a735e504eb012a019e68b235eced8fb58d022d53..ea0459d6ba066520682480c3ac86f75c78f0964f 100644 (file)
 #include "http.h"
 #include "satip_private.h"
 
-#if defined(PLATFORM_FREEBSD)
+#if defined(PLATFORM_FREEBSD) || ENABLE_ANDROID
 #include <sys/types.h>
 #include <sys/socket.h>
 #endif
 
-#if ENABLE_ANDROID
-#include <sys/socket.h>
-#endif
-
 static int
 satip_frontend_tune1
   ( satip_frontend_t *lfe, mpegts_mux_instance_t *mmi );
index fb94957dbb1bab9ecd7f1d3fa5bad13a409f7ae0..44c6ac4e49315ced7b50376d1e2249cdfe2ef4ed 100644 (file)
@@ -336,9 +336,12 @@ static int _timeshift_read
       tvhlog(LOG_ERR, "timeshift", "ts %d could not read buffer", ts->id);
       return -1;
     }
-    tvhtrace("timeshift", "ts %d read msg %p (%ld)",
-             ts->id, *sm, r);
-
+#if ENABLE_ANDROID
+    tvhtrace("timeshift", "ts %d read msg %p (%ld)", ts->id, *sm, r);  // Android bug, ssize_t is long int
+#else
+    tvhtrace("timeshift", "ts %d read msg %p (%zd)", ts->id, *sm, r);
+#endif
+    
     /* Incomplete */
     if (r == 0) {
       lseek(*fd, *cur_off, SEEK_SET);
index 25713d09966c8d1e6fd2420725b57c3303df5dd5..7d8c1ab8266faa2f610b081ca68df599c40066e5 100644 (file)
 #include "tvhpoll.h"
 #include "upnp.h"
 
-#if defined(PLATFORM_FREEBSD)
+#if defined(PLATFORM_FREEBSD) || ENABLE_ANDROID
 #include <sys/types.h>
 #include <sys/socket.h>
 #endif
 
-#if ENABLE_ANDROID
-#include <sys/socket.h>
-#endif
-
 int              upnp_running;
 static pthread_t upnp_tid;
 pthread_mutex_t  upnp_lock;