From 670e5ef72176dafc1bf2669d4c5c30e0db26dd71 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 1 Aug 2006 12:35:58 +0000 Subject: Exit with non-zero exit status if fakehid functions fail --- hidd/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'hidd/main.c') 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; } -- cgit