Revision 7442511c hw/bt-hci.c

b/hw/bt-hci.c
564 564

  
565 565
    switch (hci->lm.inquiry_mode) {
566 566
    case 0x00:
567
        return bt_hci_inquiry_result_standard(hci, slave);
567
        bt_hci_inquiry_result_standard(hci, slave);
568
        return;
568 569
    case 0x01:
569
        return bt_hci_inquiry_result_with_rssi(hci, slave);
570
        bt_hci_inquiry_result_with_rssi(hci, slave);
571
        return;
570 572
    default:
571 573
        fprintf(stderr, "%s: bad inquiry mode %02x\n", __FUNCTION__,
572 574
                        hci->lm.inquiry_mode);
......
771 773
    struct bt_hci_s *hci = hci_from_device(link->slave);
772 774
    evt_conn_request params;
773 775

  
774
    if (hci->conn_req_host)
775
        return bt_hci_connection_reject(hci, link->host,
776
                        HCI_REJECTED_LIMITED_RESOURCES);
776
    if (hci->conn_req_host) {
777
        bt_hci_connection_reject(hci, link->host,
778
                                 HCI_REJECTED_LIMITED_RESOURCES);
779
        return;
780
    }
777 781
    hci->conn_req_host = link->host;
778 782
    /* TODO: if masked and auto-accept, then auto-accept,
779 783
     * if masked and not auto-accept, then auto-reject */
......
2125 2129
    /* TODO: notify upper layer */
2126 2130
    struct bt_hci_s *s = opaque;
2127 2131

  
2128
    return s->info.evt_recv(s->info.opaque, s->evt_buf, len);
2132
    s->info.evt_recv(s->info.opaque, s->evt_buf, len);
2129 2133
}
2130 2134

  
2131 2135
static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr)
......
2141 2145
{
2142 2146
    struct bt_hci_s *hci = hci_from_device(dev);
2143 2147

  
2144
    return bt_hci_done(&hci->info);
2148
    bt_hci_done(&hci->info);
2145 2149
}
2146 2150

  
2147 2151
struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net)
......
2196 2200
    /* Be gentle and send DISCONNECT to all connected peers and those
2197 2201
     * currently waiting for us to accept or reject a connection request.
2198 2202
     * This frees the links.  */
2199
    if (hci->conn_req_host)
2200
        return bt_hci_connection_reject(hci,
2201
                        hci->conn_req_host, HCI_OE_POWER_OFF);
2203
    if (hci->conn_req_host) {
2204
        bt_hci_connection_reject(hci,
2205
                                 hci->conn_req_host, HCI_OE_POWER_OFF);
2206
        return;
2207
    }
2202 2208

  
2203 2209
    for (handle = HCI_HANDLE_OFFSET;
2204 2210
                    handle < (HCI_HANDLE_OFFSET | HCI_HANDLES_MAX); handle ++)

Also available in: Unified diff