gpio: fix the bug that interrupted callback is not called 59/154559/1 accepted/tizen/unified/20171010.163342 submit/tizen/20171010.131453
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 10 Oct 2017 11:28:43 +0000 (20:28 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Tue, 10 Oct 2017 11:29:31 +0000 (20:29 +0900)
- because "link" is just only the temporary iterator, it should be changed to
  interrupt_cb_in_list pointer.

Change-Id: Ifa0f39c6e963f022fefec80f4fc1f64ffc8ad805
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/peripheral_gpio.c
src/peripheral_io.xml

index 93d123142046fce0be5cb040cd8ad65e1aa8112b..a93bd546dda456ea680e480bc13f08cc7477b03c 100644 (file)
@@ -95,7 +95,7 @@ static int __interrupted_cb_info_list_append(peripheral_gpio_h gpio, peripheral_
                        return PERIPHERAL_ERROR_OUT_OF_MEMORY;
                }
 
-               link = g_list_append(link, cb_info);
+               interrupted_cb_info_list = g_list_append(interrupted_cb_info_list, cb_info);
        }
 
        cb_info->handle = gpio;
index 9b556d6c9fc8ab090beb23d5abfbd771fa848cc2..466efac26db3187e0bba513f30b1025778fa6719 100644 (file)
                        <arg type="u" name="handle" direction="in"/>
                        <arg type="i" name="result" direction="out"/>
                </method>
-               <signal name='InterruptedCb'>
-                       <arg type='i' name='pin'/>
-                       <arg type='i' name='value'/>
-                       <arg type='t' name='timestamp'/>
+               <signal name="InterruptedCb">
+                       <arg type="i" name="pin"/>
+                       <arg type="i" name="value"/>
+                       <arg type="t" name="timestamp"/>
                </signal>
                <method name="Read">
                        <arg type="u" name="handle" direction="in"/>