Commit 07787027 authored by Committed by KevinBrowse files
Interpret missing kCBMsgArgResult as success. (#5)
This commit addresses a panic that occurs in older versions of MacOS (tested with 10.11.5). The problem occurs because, on this machine, the DiscoverDescriptors response lacks a `kCBMsgArgResult` field. This missing field must have gotten fixed in a subsequent version of MacOS. Here are the contents of the DiscoverDescriptors response: ``` map[kCBMsgArgCharacteristicHandle:17 kCBMsgArgDeviceUUID:3e8e65b72da94f70bbbe2d8f1a2524ee kCBMsgArgDescriptors:] ``` The fix is to treat a response that lacks the `kCBMsgArgResult` field as indicating success. That is, pretend `kCBMsgArgResult` is 0.