Corrected ssize_t log printing. Cleanup.

This commit is contained in:
Sergio Costa Fortier 2014-08-08 14:04:59 -03:00 committed by Jaroslav Kysela
parent d91375de0a
commit 9af56fd79d
5 changed files with 14 additions and 19 deletions

View 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;

View file

@ -29,15 +29,11 @@
#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 );
/*

View file

@ -24,15 +24,11 @@
#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 );

View 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);

View file

@ -34,15 +34,11 @@
#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;