apache-mynewt-bot commented on PR #1338:
URL: https://github.com/apache/mynewt-nimble/pull/1338#issuecomment-1235168293

   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### apps/ext_central/src/main.c
   <details>
   
   ```diff
   @@ -133,42 +133,42 @@
    conn_event(struct ble_gap_event *event, void *arg)
    {
        switch (event->type) {
   -        case BLE_GAP_EVENT_CONNECT:
   -            if (event->connect.status == 0) {
   -                MODLOG_DFLT(INFO,"Connection was established %d\n", 
current_scan);
   -                ble_gap_terminate(event->connect.conn_handle, 0x13);
   -            } else {
   -                MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
   +    case BLE_GAP_EVENT_CONNECT:
   +        if (event->connect.status == 0) {
   +            MODLOG_DFLT(INFO,"Connection was established %d\n", 
current_scan);
   +            ble_gap_terminate(event->connect.conn_handle, 0x13);
   +        } else {
   +            MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
                                event->connect.status);
   -                resume_scan();
   -            }
   -            break;
   -        case BLE_GAP_EVENT_DISCONNECT:
   -            MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
   +            resume_scan();
   +        }
   +        break;
   +    case BLE_GAP_EVENT_DISCONNECT:
   +        MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
                            event->disconnect.reason);
   -            if (current_scan == 2) {
   -                current_scan = 0;
   -            } else {
   -                ++current_scan;
   -            }
   -            resume_scan();
   -            break;
   -        case BLE_GAP_EVENT_CONN_UPDATE_REQ:
   -            MODLOG_DFLT(INFO,"Connection update request received\n");
   -            break;
   -        case BLE_GAP_EVENT_CONN_UPDATE:
   -            if (event->conn_update.status == 0) {
   -                MODLOG_DFLT(INFO,"Connection update successful\n");
   -            } else {
   -                MODLOG_DFLT(INFO,"Connection update failed; reason: %d\n",
   +        if (current_scan == 2) {
   +            current_scan = 0;
   +        } else {
   +            ++current_scan;
   +        }
   +        resume_scan();
   +        break;
   +    case BLE_GAP_EVENT_CONN_UPDATE_REQ:
   +        MODLOG_DFLT(INFO,"Connection update request received\n");
   +        break;
   +    case BLE_GAP_EVENT_CONN_UPDATE:
   +        if (event->conn_update.status == 0) {
   +            MODLOG_DFLT(INFO,"Connection update successful\n");
   +        } else {
   +            MODLOG_DFLT(INFO,"Connection update failed; reason: %d\n",
                                event->conn_update.status);
   -            }
   -            break;
   -        default:
   -            MODLOG_DFLT(INFO,"Connection event type not supported, %d\n",
   +        }
   +        break;
   +    default:
   +        MODLOG_DFLT(INFO,"Connection event type not supported, %d\n",
                            event->type);
   -            resume_scan();
   -            break;
   +        resume_scan();
   +        break;
        }
        return 0;
    }
   ```
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to