Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Corrected ssize_t log printing. Cleanup.
  • Loading branch information
OuNao authored and perexg committed Aug 16, 2014
1 parent d91375d commit 9af56fd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
6 changes: 5 additions & 1 deletion src/descrambler/capmt.c
Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions src/input/mpegts/satip/satip.c
Expand Up @@ -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 );

/*
Expand Down
6 changes: 1 addition & 5 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -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 );
Expand Down
9 changes: 6 additions & 3 deletions src/timeshift/timeshift_reader.c
Expand Up @@ -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);
Expand Down
6 changes: 1 addition & 5 deletions src/upnp.c
Expand Up @@ -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;
Expand Down

0 comments on commit 9af56fd

Please sign in to comment.