summaryrefslogtreecommitdiff
path: root/src/gateway
diff options
context:
space:
mode:
authorManikandanC <Manikandan.Chockalingam@in.bosch.com>2017-10-06 11:37:31 +0530
committerChristoph Lipka <clipka@users.noreply.github.com>2018-11-30 12:17:59 +0100
commit73180fc762f015935950f697822710af3f5bd23d (patch)
treeffcd8407d8ab55d63544af33ade7efd120381728 /src/gateway
parent13803189600c724341148af34f33688497d71991 (diff)
downloadDLT-daemon-73180fc762f015935950f697822710af3f5bd23d.tar.gz
Use poll in the dlt-daemon for POSIX compliance
The poll system call is now used in the daemon to enable DLT use in POSIX compliant systems. Also added introduced new unregister_app macro to avoid missing of logs in startup buffer. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/dlt_gateway.c12
-rw-r--r--src/gateway/dlt_gateway.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gateway/dlt_gateway.c b/src/gateway/dlt_gateway.c
index c5203db..4236d23 100644
--- a/src/gateway/dlt_gateway.c
+++ b/src/gateway/dlt_gateway.c
@@ -868,11 +868,11 @@ STATIC int dlt_gateway_add_to_event_loop(DltDaemonLocal *daemon_local,
con->timeout_cnt = 0;
con->sendtime_cnt = 0;
- /* setup dlt connection and add to epoll event loop here */
+ /* setup dlt connection and add to poll event loop here */
if (dlt_connection_create(daemon_local,
&daemon_local->pEvent,
con->client.sock,
- EPOLLIN,
+ POLLIN,
DLT_CONNECTION_GATEWAY) != 0)
{
dlt_log(LOG_ERR, "Gateway connection creation failed\n");
@@ -947,7 +947,7 @@ int dlt_gateway_establish_connections(DltGateway *gateway,
if (ret == 0)
{
- /* setup dlt connection and add to epoll event loop here */
+ /* setup dlt connection and add to poll event loop here */
if (dlt_gateway_add_to_event_loop(daemon_local, con, verbose) != DLT_RETURN_OK)
{
dlt_log(LOG_ERR, "Gateway connection creation failed\n");
@@ -972,11 +972,11 @@ int dlt_gateway_establish_connections(DltGateway *gateway,
else if ((con->status == DLT_GATEWAY_CONNECTED) &&
(con->trigger != DLT_GATEWAY_DISABLED))
{
- /* setup dlt connection and add to epoll event loop here */
+ /* setup dlt connection and add to poll event loop here */
if (dlt_connection_create(daemon_local,
&daemon_local->pEvent,
con->client.sock,
- EPOLLIN,
+ POLLIN,
DLT_CONNECTION_GATEWAY) != 0)
{
dlt_log(LOG_ERR, "Gateway connection creation failed\n");
@@ -1672,7 +1672,7 @@ int dlt_gateway_process_on_demand_request(DltGateway *gateway,
{
if (dlt_client_connect(&con->client, verbose) == 0)
{
- /* setup dlt connection and add to epoll event loop here */
+ /* setup dlt connection and add to poll event loop here */
if (dlt_gateway_add_to_event_loop(daemon_local, con, verbose) != DLT_RETURN_OK)
{
dlt_log(LOG_ERR, "Gateway connection creation failed\n");
diff --git a/src/gateway/dlt_gateway.h b/src/gateway/dlt_gateway.h
index 2da2118..c3c7324 100644
--- a/src/gateway/dlt_gateway.h
+++ b/src/gateway/dlt_gateway.h
@@ -84,7 +84,7 @@ void dlt_gateway_deinit(DltGateway *g, int verbose);
* on daemon startup and add this connections to the main event loop.
*
* TODO: This function is called during gateway initialization and in main loop
- * whenever the epoll returns. This may need to be improved.
+ * whenever the poll returns. This may need to be improved.
*
* @param g DltGateway
* @param daemon_local DltDaemonLocal