Added timeout to poll function in dbus mainloop
[profile/ivi/persistence-client-library.git] / src / persistence_client_library_dbus_service.c
index 694cd6a..baa1906 100644 (file)
@@ -543,7 +543,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2,
 
                   while (DBUS_DISPATCH_DATA_REMAINS==dbus_connection_dispatch(conn));
 
-                  while ((-1==(ret=poll(gPollInfo.fds, gPollInfo.nfds, -1)))&&(EINTR==errno));
+                  while ((-1==(ret=poll(gPollInfo.fds, gPollInfo.nfds, 750)))&&(EINTR==errno));
 
                   if (0>ret)
                   {
@@ -600,7 +600,7 @@ int mainLoop(DBusObjectPathVTable vtable, DBusObjectPathVTable vtable2,
                                           process_send_pas_request(conn, (buf[2]), buf[1]);
                                           break;
                                        case CMD_LC_PREPARE_SHUTDOWN:
-                                          process_prepare_shutdown((buf[2]), buf[1]);
+                                          process_prepare_shutdown(Shutdown_Full);
                                           process_send_lifecycle_request(conn, (buf[2]), buf[1]);
                                           break;
                                        case CMD_SEND_NOTIFY_SIGNAL: