Change-Id: Ieb3dffe9548530baa89c114c8ab5b9ac8c09cf52
Signed-off-by: pr.jung <pr.jung@samsung.com>
if (h->fd != g_io_channel_unix_get_fd(source))
return TRUE;
- if (condition != G_IO_IN)
+
+ if (condition & G_IO_ERR)
+ _E("udev_monitor_set_receive_buffer_size overflow");
+
+ if (!(condition & G_IO_IN)) {
+ _D("udev have a bad behavior");
return TRUE;
+ }
ret = true;
if (h->changed)
return -ENOMEM;
}
- id = g_io_add_watch(ch, G_IO_IN,
+ id = g_io_add_watch(ch, G_IO_IN | G_IO_ERR,
channel_changed, h);
if (id == 0) {
_E("Failed to add watch for GIOChannel");
#define SIGNAL_POWEROFF_STATE "ChangeState"
-#define UDEV_MONITOR_SIZE (10*1024)
+#define UDEV_MONITOR_SIZE (100*1024)
struct uevent_info {
struct udev_monitor *mon;
goto stop;
}
+ _I("Set udev monitor buffer size %d", UDEV_MONITOR_SIZE);
ret = udev_monitor_set_receive_buffer_size(info->mon,
UDEV_MONITOR_SIZE);
if (ret != 0) {