File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2009,8 +2009,9 @@ static u8_t update_ccc(const struct bt_gatt_attr *attr, void *user_data)
20092009 ccc = attr -> user_data ;
20102010
20112011 for (i = 0 ; i < ARRAY_SIZE (ccc -> cfg ); i ++ ) {
2012- /* Ignore configuration for different peer */
2013- if (bt_conn_addr_le_cmp (conn , & ccc -> cfg [i ].peer )) {
2012+ /* Ignore configuration for different peer or not active */
2013+ if (!ccc -> cfg [i ].value ||
2014+ bt_conn_addr_le_cmp (conn , & ccc -> cfg [i ].peer )) {
20142015 continue ;
20152016 }
20162017
@@ -2040,14 +2041,14 @@ static u8_t update_ccc(const struct bt_gatt_attr *attr, void *user_data)
20402041 }
20412042 }
20422043
2043- if (ccc -> cfg [i ].value ) {
2044- gatt_ccc_changed (attr , ccc );
2045- if (IS_ENABLED (CONFIG_BT_GATT_SERVICE_CHANGED ) &&
2046- ccc == & sc_ccc ) {
2047- sc_restore (conn );
2048- }
2049- return BT_GATT_ITER_CONTINUE ;
2044+ gatt_ccc_changed (attr , ccc );
2045+
2046+ if (IS_ENABLED (CONFIG_BT_GATT_SERVICE_CHANGED ) &&
2047+ ccc == & sc_ccc ) {
2048+ sc_restore (conn );
20502049 }
2050+
2051+ return BT_GATT_ITER_CONTINUE ;
20512052 }
20522053
20532054 return BT_GATT_ITER_CONTINUE ;
You can’t perform that action at this time.
0 commit comments