File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -530,10 +530,10 @@ static void csis_connected(struct bt_conn *conn, uint8_t err)
530530 for (int i = 0 ; i < ARRAY_SIZE (csis_insts ); i ++ ) {
531531 struct bt_csis * csis = & csis_insts [i ];
532532
533- csis -> srv .conn_cnt ++ ;
533+ __ASSERT (csis -> srv .conn_cnt < CONFIG_BT_MAX_CONN ,
534+ "conn_cnt is %d" , CONFIG_BT_MAX_CONN );
534535
535- __ASSERT (csis -> srv .conn_cnt <= CONFIG_BT_MAX_CONN ,
536- "Invalid csis->srv.conn_cnt value" );
536+ csis -> srv .conn_cnt ++ ;
537537 }
538538 }
539539}
@@ -557,13 +557,14 @@ static void disconnect_adv(struct k_work *work)
557557static void handle_csis_disconnect (struct bt_csis * csis , struct bt_conn * conn )
558558{
559559#if defined(CONFIG_BT_EXT_ADV )
560- __ASSERT (csis -> srv .conn_cnt != 0 , "Invalid csis->srv. conn_cnt value " );
560+ __ASSERT (csis -> srv .conn_cnt > 0 , "conn_cnt is 0 " );
561561
562562 if (csis -> srv .conn_cnt == CONFIG_BT_MAX_CONN &&
563563 csis -> srv .adv_enabled ) {
564564 /* A connection spot opened up */
565565 k_work_submit (& csis -> srv .work );
566566 }
567+
567568 csis -> srv .conn_cnt -- ;
568569#endif /* CONFIG_BT_EXT_ADV */
569570
You can’t perform that action at this time.
0 commit comments