check state in gatt_client_discover_primary_services

This commit is contained in:
mila@ringwald.ch 2014-05-07 20:57:22 +00:00
parent 1fc6917658
commit a3a0b0107d

View File

@ -1046,6 +1046,7 @@ static void gatt_client_att_packet_handler(uint8_t packet_type, uint16_t handle,
le_command_status_t gatt_client_discover_primary_services(gatt_client_t *peripheral){
if (peripheral->gatt_client_state != P_READY) return BLE_PERIPHERAL_IN_WRONG_STATE;
peripheral->start_group_handle = 0x0001;
peripheral->end_group_handle = 0xffff;
peripheral->gatt_client_state = P_W2_SEND_SERVICE_QUERY;