summaryrefslogtreecommitdiff
path: root/src/lib/spy/spy_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/spy/spy_file.c')
-rw-r--r--src/lib/spy/spy_file.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/spy/spy_file.c b/src/lib/spy/spy_file.c
index 646115a..765f162 100644
--- a/src/lib/spy/spy_file.c
+++ b/src/lib/spy/spy_file.c
@@ -136,6 +136,7 @@ _spy_file_cb(void *data,
136 if (sf->read.fd == -1) 136 if (sf->read.fd == -1)
137 { 137 {
138 ERR("Failed to open %s : %s", sf->name, strerror(errno)); 138 ERR("Failed to open %s : %s", sf->name, strerror(errno));
139 sf->read.error = EINA_TRUE;
139 return; 140 return;
140 } 141 }
141 142
@@ -151,6 +152,7 @@ _spy_file_cb(void *data,
151 close(sf->read.fd); 152 close(sf->read.fd);
152 free(sf->read.databuf); 153 free(sf->read.databuf);
153 sf->read.databuf = NULL; 154 sf->read.databuf = NULL;
155 sf->read.error = EINA_TRUE;
154 return; 156 return;
155 } 157 }
156 158
@@ -183,7 +185,10 @@ _spy_file_end_cb(void *data,
183 185
184 sf->poll.running = EINA_FALSE; 186 sf->poll.running = EINA_FALSE;
185 187
186 ecore_job_add(_spy_file_job, sf); 188 if (!sf->read.error)
189 ecore_job_add(_spy_file_job, sf);
190 else
191 sf->read.error = EINA_FALSE;
187} 192}
188 193
189/** 194/**
@@ -254,6 +259,7 @@ spy_file_poll(void *data)
254 sf->read.length = toread; 259 sf->read.length = toread;
255 260
256 sf->poll.running = EINA_TRUE; 261 sf->poll.running = EINA_TRUE;
262 sf->read.error = EINA_FALSE;
257 et = ecore_thread_run(_spy_file_cb, 263 et = ecore_thread_run(_spy_file_cb,
258 _spy_file_end_cb, 264 _spy_file_end_cb,
259 _spy_file_cancel_cb, 265 _spy_file_cancel_cb,