summaryrefslogtreecommitdiffstats
path: root/hidd/main.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/main.c
parent9505d0aad9044b60d3a3f8374bf238a68055472a (diff)
Exit with non-zero exit status if fakehid functions fail
Diffstat (limited to 'hidd/main.c')
-rw-r--r--hidd/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hidd/main.c b/hidd/main.c
index b1fe2cb4..4ececd5a 100644
--- a/hidd/main.c
+++ b/hidd/main.c
@@ -438,12 +438,18 @@ static void do_connect(int ctl, bdaddr_t *src, bdaddr_t *dst, uint8_t subclass,
goto connect;
case SERIAL_PORT_SVCLASS_ID:
- epox_presenter(src, dst, channel);
+ if (epox_presenter(src, dst, channel) < 0) {
+ close(ctl);
+ exit(1);
+ }
break;
case HEADSET_SVCLASS_ID:
case HANDSFREE_SVCLASS_ID:
- headset_presenter(src, dst, channel);
+ if (headset_presenter(src, dst, channel) < 0) {
+ close(ctl);
+ exit(1);
+ }
break;
}