summaryrefslogtreecommitdiffstats
path: root/hidd/fakehid.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-08-01 12:35:58 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-08-01 12:35:58 +0000
commit670e5ef72176dafc1bf2669d4c5c30e0db26dd71 (patch)
tree55320c8c6455c71248e6c6e4ac2040ddc634bdc5 /hidd/fakehid.c
parent9505d0aad9044b60d3a3f8374bf238a68055472a (diff)
Exit with non-zero exit status if fakehid functions fail
Diffstat (limited to 'hidd/fakehid.c')
-rw-r--r--hidd/fakehid.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hidd/fakehid.c b/hidd/fakehid.c
index 138d2b48..2699d3f5 100644
--- a/hidd/fakehid.c
+++ b/hidd/fakehid.c
@@ -277,7 +277,7 @@ static void sig_term(int sig)
__io_canceled = 1;
}
-void epox_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
+int epox_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
{
unsigned char buf[16];
struct sigaction sa;
@@ -287,12 +287,12 @@ void epox_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
sk = rfcomm_connect(src, dst, channel);
if (sk < 0)
- return;
+ return -1;
fd = uinput_create("Bluetooth Presenter", 0, 1);
if (fd < 0) {
close(sk);
- return;
+ return -1;
}
ba2str(dst, addr);
@@ -335,9 +335,12 @@ void epox_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
close(fd);
close(sk);
+
+ return 0;
}
-void headset_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
+int headset_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
{
printf("Not implemented\n");
+ return -1;
}