#include <dbus/dbus-glib.h>
#include <pthread.h>
#include <dbus/dbus.h>
+#include <stdint.h>
#include "bluetooth-api.h"
#include "bluetooth-hid-api.h"
int ret = 0;
int test_id;
+#ifdef ARCH64
+ test_id = find_tc_number((uintptr_t)data);
+#else
test_id = find_tc_number((int)data);
+#endif
+ if (test_id == -1)
+ return 0;
+
TC_PRT("TC : %s[%d]", tc_table[test_id].tc_name, tc_table[test_id].tc_code);
switch (tc_table[test_id].tc_code) {
break;
case 1:
- bluetooth_register_callback(bt_event_callback, NULL);
+ ret = bluetooth_register_callback(bt_event_callback, NULL);
if (ret < 0) {
TC_PRT("%s failed with [0x%04x]", tc_table[0].tc_name, ret);
tc_result(TC_FAIL, 1);
break;
case 2:
- bluetooth_unregister_callback();
+ ret = bluetooth_unregister_callback();
if (ret < 0) {
TC_PRT("%s failed with [0x%04x]", tc_table[1].tc_name, ret);
tc_result(TC_FAIL, 1);
static gboolean key_event_cb(GIOChannel * chan, GIOCondition cond , gpointer data)
{
- char buf[10] = {0};
+ char buf[49] = {0};
+#ifdef ARCH64
+ unsigned long len = 0;
+#else
unsigned int len = 0;
+#endif
int test_id;
memset(buf, 0, sizeof(buf));
test_id = atoi(buf);
- if (test_id)
- g_idle_add(test_input_callback, (void*)test_id);
+#ifdef ARCH64
+ g_idle_add(test_input_callback, (void *)(uintptr_t)test_id);
+#else
+ g_idle_add(test_input_callback, (void *)test_id);
+#endif
return TRUE;
}