summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-08-06 09:47:08 +0100
committerChris Michael <cp.michael@samsung.com>2013-08-06 09:48:21 +0100
commit5be999e0f564fc071268330f0981ea11779f22de (patch)
treebe85fdaf8ce3c06c642b868bc507a9c86c5d7b13 /src/lib/ecore_audio
parent6583b83c7304dcc1cb3f6c869ba1a391770b677c (diff)
Get the 'fd' from the handler First (regardless of read or write) so
that it can be used in the below event callback. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/ecore_audio_pulse_ml.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/ecore_audio/ecore_audio_pulse_ml.c b/src/lib/ecore_audio/ecore_audio_pulse_ml.c
index 38f3d40c43..249269dc7d 100644
--- a/src/lib/ecore_audio/ecore_audio_pulse_ml.c
+++ b/src/lib/ecore_audio/ecore_audio_pulse_ml.c
@@ -47,14 +47,13 @@ _ecore_io_wrapper(void *data, Ecore_Fd_Handler *handler)
47 pa_io_event *event = (pa_io_event *)data; 47 pa_io_event *event = (pa_io_event *)data;
48 int fd = 0; 48 int fd = 0;
49 49
50 fd = ecore_main_fd_handler_fd_get(handler);
51 if (fd < 0) return ECORE_CALLBACK_RENEW;
52
50 if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ)) 53 if (ecore_main_fd_handler_active_get(handler, ECORE_FD_READ))
51 { 54 {
52
53 flags |= PA_IO_EVENT_INPUT; 55 flags |= PA_IO_EVENT_INPUT;
54 56
55 fd = ecore_main_fd_handler_fd_get(handler);
56 if (fd < 0) return ECORE_CALLBACK_RENEW;
57
58 /* Check for HUP and report */ 57 /* Check for HUP and report */
59 if (recv(fd, buf, 64, MSG_PEEK)) 58 if (recv(fd, buf, 64, MSG_PEEK))
60 { 59 {