summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorPer Persson <per.xb.persson@stericsson.com>2011-07-04 10:19:53 +0200
committerJimmy RUBIN <jimmy.rubin@stericsson.com>2011-07-05 10:02:30 +0200
commitf5784d2722df6d09dcf09f13a316531bf80fa973 (patch)
tree456720a1e992d08c0ff3e36df49211b7e2f2c125 /src/socket.c
parent23362b8dfcd202b097c48753f6167b428818ca53 (diff)
HDMIservice: Prepare for lbp build
Makefile for building lbp is added. Compiler warnings are removed. ST-Ericsson ID: 350562 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10177 Change-Id: I32dd6de5eeaedb0a9aaae7dfb3f0dc0713c8e2d5 Signed-off-by: Per Persson <per.xb.persson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/26488 Reviewed-by: QATEST Reviewed-by: QATOOLS Reviewed-by: Robert LIND <robert.lind@stericsson.com> Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/socket.c b/src/socket.c
index a677cdd..b029e11 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -7,6 +7,7 @@
#include <unistd.h> /* Symbolic Constants */
#include <sys/types.h> /* Primitive System Data Types */
+#include <linux/types.h>
#include <errno.h> /* Errors */
#include <stdarg.h>
#include <stdio.h> /* Input/Output */
@@ -18,7 +19,9 @@
#include <ctype.h>
#include <sys/socket.h>
#include <sys/un.h>
+#ifdef ANDROID
#include <utils/Log.h>
+#endif
#include "../include/hdmi_service_api.h"
#include "../include/hdmi_service_local.h"
@@ -54,7 +57,7 @@ int clientsocket_get(void)
}
/* Client socket thread. Handles incoming socket messages */
-static void thread_sockclient_fn(void *arg)
+static void thread_sockclient_fn(int *arg)
{
int bytes = 0;
char buffer[SOCKET_DATA_MAX];
@@ -65,7 +68,7 @@ static void thread_sockclient_fn(void *arg)
LOGHDMILIB("%s begin", __func__);
- sock = (int)arg;
+ sock = *arg;
clientsocket_set(sock);
LOGHDMILIB("clisock:%d", sock);
@@ -154,8 +157,6 @@ void thread_socklisten_fn(void *arg)
struct sockaddr_un serv_addr;
struct sockaddr_un cli_addr;
int res;
- fd_set descr;
- struct timeval timeout;
int sockl;
LOGHDMILIB("%s begin", __func__);
@@ -201,7 +202,7 @@ void thread_socklisten_fn(void *arg)
if (socknew >= 0)
/* Create a client thread */
pthread_create(&thread_sockclient, NULL,
- (void *)thread_sockclient_fn, (void *)socknew);
+ (void *)thread_sockclient_fn, (void *)&socknew);
}
thread_socklisten_fn_end:
@@ -275,7 +276,6 @@ int serversocket_create(int avoid_return_msg)
int sock;
int len;
struct sockaddr_un addr;
- int result;
int n;
LOGHDMILIB("%s begin", __func__);