From 2096054111a1ba6b451e8b42c21db29189075d00 Mon Sep 17 00:00:00 2001 From: Masayuki Sasaki Date: Wed, 26 Mar 2014 14:09:57 +0900 Subject: [PATCH] bug fix: It will end, if many events come from Weston continuously. Change-Id: I28f1cb5cdd4e674798170c1e00e82ecf1ac288cb Signed-off-by: Masayuki Sasaki --- gtforce/Makefile.am | 2 +- gtforce/ico_dic-gtforce.c | 4 ---- gtforce/ico_dic-wayland.c | 20 ++++++++------------ packaging/ico-uxf-device-input-controller.changes | 5 +++++ packaging/ico-uxf-device-input-controller.spec | 2 +- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/gtforce/Makefile.am b/gtforce/Makefile.am index eb093f9..3136894 100644 --- a/gtforce/Makefile.am +++ b/gtforce/Makefile.am @@ -4,7 +4,7 @@ wayland_client_lib = -lwayland-client wayland_ivi_client_lib = -lico-uxf-weston-plugin wayland_ivi_client_inc = -I/usr/include/ico-uxf-weston-plugin -AM_CFLAGS = $(GCC_CFLAGS) -I/usr/include/ico-util +AM_CFLAGS = $(GCC_CFLAGS) -D_XOPEN_SOURCE -D_BSD_SOURCE -I/usr/include/ico-util AM_CPPFLAGS = -I$(top_srcdir)/src $(wayland_ivi_client_inc) $(GLIB_CFLAGS) $(COMPOSITOR_CFLAGS) bin_PROGRAMS = \ diff --git a/gtforce/ico_dic-gtforce.c b/gtforce/ico_dic-gtforce.c index fc26062..35e819c 100644 --- a/gtforce/ico_dic-gtforce.c +++ b/gtforce/ico_dic-gtforce.c @@ -23,10 +23,6 @@ #include #include -#ifndef __USE_XOPEN -extern char *cuserid (char *__s); -#endif - #include "ico_dic-gtforce.h" /* type definition */ diff --git a/gtforce/ico_dic-wayland.c b/gtforce/ico_dic-wayland.c index dbf9480..d6fa2f4 100644 --- a/gtforce/ico_dic-wayland.c +++ b/gtforce/ico_dic-wayland.c @@ -162,7 +162,7 @@ ico_dic_wayland_iterate(struct epoll_event *ev_ret, int timeout) { int nfds; int ii; - static int errcount = 0; + static uint32_t repert = 0; memset(ev_ret, 0, sizeof(struct epoll_event) * ICO_DIC_EVENT_NUM); wl_display_flush(gIco_Dic_Mng.Wayland_Display); @@ -173,20 +173,16 @@ ico_dic_wayland_iterate(struct epoll_event *ev_ret, int timeout) for (ii = 0; ii < nfds; ii++) { if (ev_ret[ii].data.fd == gIco_Dic_Mng.WaylandFd) { wl_display_dispatch(gIco_Dic_Mng.Wayland_Display); - ICO_DBG("ico_dic_wayland_iterate: Event wayland fd"); - errcount ++; - if (errcount > 50) { - ICO_ERR("ico_dic_wayland_iterate: Error wayland disconnect"); - ICO_INF("END_MODULE GtForce device input controller" - "(Error: wayland disconnect)"); - exit(9); - } - if ((errcount % 5) == 0) { - usleep(50*1000); + repert ++; + if ((repert % 5) == 0) { + if (repert % 100) { + ICO_DBG("ico_dic_wayland_iterate: Event wayland fd"); + } + usleep(20*1000); } } else { - errcount = 0; + repert = 0; } } return nfds; diff --git a/packaging/ico-uxf-device-input-controller.changes b/packaging/ico-uxf-device-input-controller.changes index 37a3aeb..e293731 100644 --- a/packaging/ico-uxf-device-input-controller.changes +++ b/packaging/ico-uxf-device-input-controller.changes @@ -1,3 +1,8 @@ +* Wed Mar 26 2014 Shibata Makoto accepted/tizen/ivi/release/20140312.124735@9827dd3 +- Delete test_send_event tool (It is contained in weston-plugin by the name of ico_send_inputevent). +- Correction of the review indication from a Tizen team. +- bug fix: It will end, if many events come from Weston continuously. + * Fri Feb 28 2014 Shibata Makoto accepted/tizen/ivi/20140129.180655@86233eb - 0.9.06 release -- It changes so that the layer controlling function of GENIVI may be used for surface management and layer management. diff --git a/packaging/ico-uxf-device-input-controller.spec b/packaging/ico-uxf-device-input-controller.spec index 82afb81..3b1da04 100644 --- a/packaging/ico-uxf-device-input-controller.spec +++ b/packaging/ico-uxf-device-input-controller.spec @@ -3,7 +3,7 @@ Summary: Device Input Controller Version: 0.9.06 Release: 1.1 Group: System/GUI -License: Apache-2.0 +License: Apache License, Version 2.0 URL: "" Source0: %{name}-%{version}.tar.bz2 -- 2.7.4