emulator: Change feature check to attend HFP 1.6
authorPaulo Borges <paulo.borges@openbossa.org>
Fri, 12 Apr 2013 20:41:02 +0000 (17:41 -0300)
committerDenis Kenzior <denkenz@gmail.com>
Mon, 15 Apr 2013 12:23:28 +0000 (07:23 -0500)
HFP 1.6 adds a new feature called Codec Negotitation. For the HF Role,
this feature is stored in bit 8 of the supported features
bitmap.

This patch changes the range of valid HF feature bitmaps to 2^8-1.

src/emulator.c

index 0817b5d..70505b5 100644 (file)
@@ -453,7 +453,7 @@ static void brsf_cb(GAtServer *server, GAtServerRequestType type,
                if (g_at_result_iter_next_number(&iter, &val) == FALSE)
                        goto fail;
 
-               if (val < 0 || val > 127)
+               if (val < 0 || val > 255)
                        goto fail;
 
                em->r_features = val;