[mynewt-core] branch master updated: Adding a version into newt compatilibilty map, for version: 0.0.1

2020-04-03 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new f57b528  Adding a version into newt compatilibilty map, for version: 
0.0.1
f57b528 is described below

commit f57b528b578ddd1187e032b4c61567fab37145d1
Author: Robertino Benis 
AuthorDate: Fri Apr 3 15:29:02 2020 -0700

Adding a version into newt compatilibilty map, for version: 0.0.1

- this removes newt warning when building JDP, since newt picks 0.0.1 for 
commit from master
- and warns that 0.0.1 is not listed in compatibility map.
---
 repository.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/repository.yml b/repository.yml
index eef1e38..f6b4609 100644
--- a/repository.yml
+++ b/repository.yml
@@ -60,6 +60,8 @@ repo.newt_compatibility:
 # present.
 0.0.0:
 0.0.0: good
+0.0.1:
+0.0.1: good
 
 # Core 1.1.0+ requires newt 1.1.0+ (feature: self-overrides).
 # Core 1.4.0+ requires newt 1.4.0+ (feature: sync repo deps).



[GitHub] [mynewt-core] ccollins476ad merged pull request #2261: Adding a version into newt compatilibilty map, for version: 0.0.1

2020-04-03 Thread GitBox
ccollins476ad merged pull request #2261: Adding a version into newt 
compatilibilty map, for version: 0.0.1
URL: https://github.com/apache/mynewt-core/pull/2261
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2261: Adding a version into newt compatilibilty map, for version: 0.0.1

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #2261: Adding a version into newt 
compatilibilty map, for version: 0.0.1
URL: https://github.com/apache/mynewt-core/pull/2261#issuecomment-608771335
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] tinocyngn opened a new pull request #2261: Adding a version into newt compatilibilty map, for version: 0.0.1

2020-04-03 Thread GitBox
tinocyngn opened a new pull request #2261: Adding a version into newt 
compatilibilty map, for version: 0.0.1
URL: https://github.com/apache/mynewt-core/pull/2261
 
 
   This removes 'newt' warning when building JDP, since newt upgrade picks 
0.0.1 for commit from master and keeps warning that 0.0.1 is not listed in 
compatibility map.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608526892
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -326,7 +326,7 @@
case BLE_STORE_OBJ_TYPE_PEER_SEC:
return ble_gap_unpair_oldest_peer();
case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
/* No peer to unpair in overflow event. Here bonds do not
 * exist but CCCDs are stored. Need to delete CCCDs of
 * other peer address to make space.*/
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608547695
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608526892
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -326,7 +326,7 @@
case BLE_STORE_OBJ_TYPE_PEER_SEC:
return ble_gap_unpair_oldest_peer();
case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
/* No peer to unpair in overflow event. Here bonds do not
 * exist but CCCDs are stored. Need to delete CCCDs of
 * other peer address to make space.*/
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608445002
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -322,36 +322,36 @@
switch (event->event_code) {
case BLE_STORE_EVENT_OVERFLOW:
switch (event->overflow.obj_type) {
   -case BLE_STORE_OBJ_TYPE_OUR_SEC:
   -case BLE_STORE_OBJ_TYPE_PEER_SEC:
   -return ble_gap_unpair_oldest_peer();
   -case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   -/* No peer to unpair in overflow event. Here bonds do 
not
   - * exist but CCCDs are stored. Need to delete CCCDs of
   - * other peer address to make space.*/
   -rc = ble_store_util_subscribed_cccds(_id_addr,
   +case BLE_STORE_OBJ_TYPE_OUR_SEC:
   +case BLE_STORE_OBJ_TYPE_PEER_SEC:
   +return ble_gap_unpair_oldest_peer();
   +case BLE_STORE_OBJ_TYPE_CCCD:
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +/* No peer to unpair in overflow event. Here bonds do not
   + * exist but CCCDs are stored. Need to delete CCCDs of
   + * other peer address to make space.*/
   +rc = ble_store_util_subscribed_cccds(_id_addr,
 _peers, 1,
   - (void *) 
>overflow.value->cccd.peer_addr);
   -if (rc != 0) {
   -return rc;
   -} else if (num_peers == 0) {
   -return BLE_HS_ENOMEM;
   -}
   -
   -union ble_store_key key = {0};
   -key.cccd.peer_addr = peer_id_addr;
   -
   -rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   -if (rc != 0) {
   -return rc;
   -}
   + (void *) 
>overflow.value->cccd.peer_addr);
   +if (rc != 0) {
   +return rc;
   +} else if (num_peers == 0) {
   +return BLE_HS_ENOMEM;
}

   -return rc;
   -
   -default:
   -return BLE_HS_EUNKNOWN;
   +union ble_store_key key = {0};
   +key.cccd.peer_addr = peer_id_addr;
   +
   +rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   +if (rc != 0) {
   +return rc;
   +}
   +}
   +
   +return rc;
   +
   +default:
   +return BLE_HS_EUNKNOWN;
}

case BLE_STORE_EVENT_FULL:
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[mynewt-core] branch master updated: const correctness log name

2020-04-03 Thread ccollins
This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 98cb076  const correctness log name
98cb076 is described below

commit 98cb07656920a360f141a38dc32c97f9f2d042e9
Author: Simon Frank <521620+5fr...@users.noreply.github.com>
AuthorDate: Fri Apr 3 16:01:41 2020 +0200

const correctness log name

const recently added to struct os_dev name (which is great) but using
that name with the log module currently gives compile error.
---
 sys/log/full/include/log/log.h | 4 ++--
 sys/log/full/src/log.c | 2 +-
 sys/log/stub/include/log/log.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/log/full/include/log/log.h b/sys/log/full/include/log/log.h
index 7a1f98f..7ca34c1 100644
--- a/sys/log/full/include/log/log.h
+++ b/sys/log/full/include/log/log.h
@@ -202,7 +202,7 @@ STATS_SECT_END
 #endif
 
 struct log {
-char *l_name;
+const char *l_name;
 const struct log_handler *l_log;
 void *l_arg;
 STAILQ_ENTRY(log) l_next;
@@ -248,7 +248,7 @@ uint8_t log_module_register(uint8_t id, const char *name);
 const char *log_module_get_name(uint8_t id);
 
 /* Log functions, manipulate a single log */
-int log_register(char *name, struct log *log, const struct log_handler *,
+int log_register(const char *name, struct log *log, const struct log_handler *,
  void *arg, uint8_t level);
 
 /**
diff --git a/sys/log/full/src/log.c b/sys/log/full/src/log.c
index 13e4a3d..473618e 100644
--- a/sys/log/full/src/log.c
+++ b/sys/log/full/src/log.c
@@ -371,7 +371,7 @@ log_read_last_hdr(struct log *log, struct log_entry_hdr 
*out_hdr)
  * Associate an instantiation of a log with the logging infrastructure
  */
 int
-log_register(char *name, struct log *log, const struct log_handler *lh,
+log_register(const char *name, struct log *log, const struct log_handler *lh,
  void *arg, uint8_t level)
 {
 struct log_entry_hdr hdr;
diff --git a/sys/log/stub/include/log/log.h b/sys/log/stub/include/log/log.h
index 2b1a17f..0729c1d 100644
--- a/sys/log/stub/include/log/log.h
+++ b/sys/log/stub/include/log/log.h
@@ -40,7 +40,7 @@ struct log_handler {
 };
 
 static inline int
-log_register(char *name, struct log *log, const struct log_handler *h,
+log_register(const char *name, struct log *log, const struct log_handler *h,
  void *arg, uint8_t level)
 {
 return 0;



[GitHub] [mynewt-core] ccollins476ad merged pull request #2260: const correctness log name

2020-04-03 Thread GitBox
ccollins476ad merged pull request #2260: const correctness log name
URL: https://github.com/apache/mynewt-core/pull/2260
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2260: const correctness log name

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #2260: const correctness log name
URL: https://github.com/apache/mynewt-core/pull/2260#issuecomment-608456651
 
 
   
   
   
   ## Style check summary
   
    No suggestions at this time!
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] 5frank opened a new pull request #2260: const correctness log name

2020-04-03 Thread GitBox
5frank opened a new pull request #2260: const correctness log name
URL: https://github.com/apache/mynewt-core/pull/2260
 
 
   `const` recently added to `struct os_dev:od_name` (which is great) but using 
that name with the log module currently gives a compile error.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608441257
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -322,34 +322,34 @@
switch (event->event_code) {
case BLE_STORE_EVENT_OVERFLOW:
switch (event->overflow.obj_type) {
   -case BLE_STORE_OBJ_TYPE_OUR_SEC:
   -case BLE_STORE_OBJ_TYPE_PEER_SEC:
   -return ble_gap_unpair_oldest_peer();
   -case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   -/* No peer to unpair in overflow event. Here bonds do 
not
   - * exist but CCCDs are stored. Need to delete CCCDs of
   - * other peer address to make space.*/
   -rc = ble_store_util_subscribed_cccds(_id_addr,
   +case BLE_STORE_OBJ_TYPE_OUR_SEC:
   +case BLE_STORE_OBJ_TYPE_PEER_SEC:
   +return ble_gap_unpair_oldest_peer();
   +case BLE_STORE_OBJ_TYPE_CCCD:
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +/* No peer to unpair in overflow event. Here bonds do not
   + * exist but CCCDs are stored. Need to delete CCCDs of
   + * other peer address to make space.*/
   +rc = ble_store_util_subscribed_cccds(_id_addr,
 _peers, 1,
   - (void *) 
>overflow.value->cccd.peer_addr);
   -if ((rc != 0) || (num_peers == 0)) {
   -return rc;
   -}
   -
   -union ble_store_key key = {0};
   -key.cccd.peer_addr = peer_id_addr;
   -
   -rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   -if (rc != 0) {
   -return rc;
   -}
   + (void *) 
>overflow.value->cccd.peer_addr);
   +if ((rc != 0) || (num_peers == 0)) {
   +return rc;
}

   -return rc;
   -
   -default:
   -return BLE_HS_EUNKNOWN;
   +union ble_store_key key = {0};
   +key.cccd.peer_addr = peer_id_addr;
   +
   +rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   +if (rc != 0) {
   +return rc;
   +}
   +}
   +
   +return rc;
   +
   +default:
   +return BLE_HS_EUNKNOWN;
}

case BLE_STORE_EVENT_FULL:
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608445002
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -322,36 +322,36 @@
switch (event->event_code) {
case BLE_STORE_EVENT_OVERFLOW:
switch (event->overflow.obj_type) {
   -case BLE_STORE_OBJ_TYPE_OUR_SEC:
   -case BLE_STORE_OBJ_TYPE_PEER_SEC:
   -return ble_gap_unpair_oldest_peer();
   -case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   -/* No peer to unpair in overflow event. Here bonds do 
not
   - * exist but CCCDs are stored. Need to delete CCCDs of
   - * other peer address to make space.*/
   -rc = ble_store_util_subscribed_cccds(_id_addr,
   +case BLE_STORE_OBJ_TYPE_OUR_SEC:
   +case BLE_STORE_OBJ_TYPE_PEER_SEC:
   +return ble_gap_unpair_oldest_peer();
   +case BLE_STORE_OBJ_TYPE_CCCD:
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +/* No peer to unpair in overflow event. Here bonds do not
   + * exist but CCCDs are stored. Need to delete CCCDs of
   + * other peer address to make space.*/
   +rc = ble_store_util_subscribed_cccds(_id_addr,
 _peers, 1,
   - (void *) 
>overflow.value->cccd.peer_addr);
   -if (rc != 0) {
   -return rc;
   -} else if (num_peers == 0) {
   -return BLE_HS_ENOMEM;
   -}
   -
   -union ble_store_key key = {0};
   -key.cccd.peer_addr = peer_id_addr;
   -
   -rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   -if (rc != 0) {
   -return rc;
   -}
   + (void *) 
>overflow.value->cccd.peer_addr);
   +if (rc != 0) {
   +return rc;
   +} else if (num_peers == 0) {
   +return BLE_HS_ENOMEM;
}

   -return rc;
   -
   -default:
   -return BLE_HS_EUNKNOWN;
   +union ble_store_key key = {0};
   +key.cccd.peer_addr = peer_id_addr;
   +
   +rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   +if (rc != 0) {
   +return rc;
   +}
   +}
   +
   +return rc;
   +
   +default:
   +return BLE_HS_EUNKNOWN;
}

case BLE_STORE_EVENT_FULL:
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #790: nimble/store: Fix nimble store 
behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-608441257
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -322,34 +322,34 @@
switch (event->event_code) {
case BLE_STORE_EVENT_OVERFLOW:
switch (event->overflow.obj_type) {
   -case BLE_STORE_OBJ_TYPE_OUR_SEC:
   -case BLE_STORE_OBJ_TYPE_PEER_SEC:
   -return ble_gap_unpair_oldest_peer();
   -case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   -/* No peer to unpair in overflow event. Here bonds do 
not
   - * exist but CCCDs are stored. Need to delete CCCDs of
   - * other peer address to make space.*/
   -rc = ble_store_util_subscribed_cccds(_id_addr,
   +case BLE_STORE_OBJ_TYPE_OUR_SEC:
   +case BLE_STORE_OBJ_TYPE_PEER_SEC:
   +return ble_gap_unpair_oldest_peer();
   +case BLE_STORE_OBJ_TYPE_CCCD:
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +/* No peer to unpair in overflow event. Here bonds do not
   + * exist but CCCDs are stored. Need to delete CCCDs of
   + * other peer address to make space.*/
   +rc = ble_store_util_subscribed_cccds(_id_addr,
 _peers, 1,
   - (void *) 
>overflow.value->cccd.peer_addr);
   -if ((rc != 0) || (num_peers == 0)) {
   -return rc;
   -}
   -
   -union ble_store_key key = {0};
   -key.cccd.peer_addr = peer_id_addr;
   -
   -rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   -if (rc != 0) {
   -return rc;
   -}
   + (void *) 
>overflow.value->cccd.peer_addr);
   +if ((rc != 0) || (num_peers == 0)) {
   +return rc;
}

   -return rc;
   -
   -default:
   -return BLE_HS_EUNKNOWN;
   +union ble_store_key key = {0};
   +key.cccd.peer_addr = peer_id_addr;
   +
   +rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   +if (rc != 0) {
   +return rc;
   +}
   +}
   +
   +return rc;
   +
   +default:
   +return BLE_HS_EUNKNOWN;
}

case BLE_STORE_EVENT_FULL:
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
apache-mynewt-bot removed a comment on issue #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#issuecomment-606821185
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    nimble/host/src/ble_store_util.c
   
   
   ```diff
   @@ -306,31 +306,31 @@
switch (event->event_code) {
case BLE_STORE_EVENT_OVERFLOW:
switch (event->overflow.obj_type) {
   -case BLE_STORE_OBJ_TYPE_OUR_SEC:
   -case BLE_STORE_OBJ_TYPE_PEER_SEC:
   -case BLE_STORE_OBJ_TYPE_CCCD:
   -if (( rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   -/* No peer to unpair. Here bonds do not exist but CCCDs 
are
   - * stored. Need to delete CCCDs to make space. */
   -rc = ble_store_util_subscribed_cccds(_id_addr,
   +case BLE_STORE_OBJ_TYPE_OUR_SEC:
   +case BLE_STORE_OBJ_TYPE_PEER_SEC:
   +case BLE_STORE_OBJ_TYPE_CCCD:
   +if ((rc = ble_gap_unpair_oldest_peer()) == BLE_HS_ENOENT) {
   +/* No peer to unpair. Here bonds do not exist but CCCDs are
   + * stored. Need to delete CCCDs to make space. */
   +rc = ble_store_util_subscribed_cccds(_id_addr,
 _peers, 1);
   -if ((rc != 0) || (num_peers == 0)) {
   -return rc;
   -}
   -
   -union ble_store_key key = {0};
   -key.cccd.peer_addr = peer_id_addr;
   -
   -rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   -if (rc != 0) {
   -return rc;
   -}
   +if ((rc != 0) || (num_peers == 0)) {
   +return rc;
}

   -return rc;
   -
   -default:
   -return BLE_HS_EUNKNOWN;
   +union ble_store_key key = {0};
   +key.cccd.peer_addr = peer_id_addr;
   +
   +rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, 
);
   +if (rc != 0) {
   +return rc;
   +}
   +}
   +
   +return rc;
   +
   +default:
   +return BLE_HS_EUNKNOWN;
}

case BLE_STORE_EVENT_FULL:
   ```
   
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] prasad-alatkar commented on a change in pull request #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
prasad-alatkar commented on a change in pull request #790: nimble/store: Fix 
nimble store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#discussion_r403012231
 
 

 ##
 File path: nimble/host/src/ble_store_util.c
 ##
 @@ -230,13 +299,35 @@ ble_store_util_delete_oldest_peer(void)
 int
 ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
 {
+int rc = BLE_HS_EUNKNOWN;
+ble_addr_t peer_id_addr;
+int num_peers;
+
 switch (event->event_code) {
 case BLE_STORE_EVENT_OVERFLOW:
 switch (event->overflow.obj_type) {
 case BLE_STORE_OBJ_TYPE_OUR_SEC:
 case BLE_STORE_OBJ_TYPE_PEER_SEC:
 case BLE_STORE_OBJ_TYPE_CCCD:
-return ble_gap_unpair_oldest_peer();
 
 Review comment:
   @rymanluk agreed !! I have made relevant changes. For CCCD,  if 
`ble_gap_unpair_oldest_peer` is unable to delete any peer, we continue to find 
other peers occupying CCCDs in storage. I have also modified callback function 
(`ble_store_util_iter_peer_cccd`) to skip the current (i.e. for which CCCDs 
need to be stored) peer entry.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] prasad-alatkar commented on a change in pull request #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
prasad-alatkar commented on a change in pull request #790: nimble/store: Fix 
nimble store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#discussion_r403009539
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -5594,7 +5594,7 @@ ble_gap_unpair_oldest_peer(void)
 }
 
 if (num_peers == 0) {
-return 0;
+return BLE_HS_ENOENT;
 
 Review comment:
   Done !!


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-core] apache-mynewt-bot commented on issue #2259: ARM semihosting console on pinetime

2020-04-03 Thread GitBox
apache-mynewt-bot commented on issue #2259: ARM semihosting console on pinetime
URL: https://github.com/apache/mynewt-core/pull/2259#issuecomment-608275979
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/semihosting/include/semihosting/mbed_semihost_api.h
   
   
   ```diff
   @@ -1,4 +1,3 @@
   -
/* mbed Microcontroller Library
 * Copyright (c) 2006-2019 ARM Limited
 * SPDX-License-Identifier: Apache-2.0
   @@ -27,7 +26,8 @@
#if !defined(__ARMCC_VERSION)

#if defined(__ICCARM__)
   -static inline int __semihost(int reason, const void *arg)
   +static inline int
   +__semihost(int reason, const void *arg)
{
return __semihosting(reason, (void *)arg);
}
   @@ -43,19 +43,20 @@
#   define AngelSWIAsm  swi
#endif

   -static inline int __semihost(int reason, const void *arg)
   +static inline int
   +__semihost(int reason, const void *arg)
{
int value;

   -asm volatile(
   +asm volatile (
"mov r0, %1"  "\n\t"
"mov r1, %2"  "\n\t"
AngelSWIInsn " %a3"   "\n\t"
"mov %0, r0"
   -: "=r"(value)  /* output 
operands */
   -: "r"(reason), "r"(arg), "i"(AngelSWI) /* input 
operands  */
   +: "=r" (value)  /* output 
operands */
   +: "r" (reason), "r" (arg), "i" (AngelSWI) /* input 
operands  */
: "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"   /* list of 
clobbered registers */
   -);
   +);

return value;
}
   ```
   
   
   
    hw/drivers/semihosting/src/mbed_semihost_api.c
   
   
   ```diff
   @@ -20,7 +20,7 @@
#include 
#include 

   -// ARM Semihosting Commands
   +/* ARM Semihosting Commands */
#define SYS_OPEN   (0x1)
#define SYS_CLOSE  (0x2)
#define SYS_WRITE  (0x5)
   @@ -33,7 +33,8 @@
#define SYS_RENAME (0xf)
#define SYS_EXIT   (0x18)

   -FILEHANDLE semihost_open(const char *name, int openmode)
   +FILEHANDLE
   +semihost_open(const char *name, int openmode)
{
uint32_t args[3];
args[0] = (uint32_t)name;
   @@ -42,12 +43,14 @@
return __semihost(SYS_OPEN, args);
}

   -int semihost_close(FILEHANDLE fh)
   +int
   +semihost_close(FILEHANDLE fh)
{
return __semihost(SYS_CLOSE, );
}

   -int semihost_write(FILEHANDLE fh, const unsigned char *buffer, unsigned int 
length, int mode)
   +int
   +semihost_write(FILEHANDLE fh, const unsigned char *buffer, unsigned int 
length, int mode)
{
if (length == 0) {
return 0;
   @@ -60,7 +63,8 @@
return __semihost(SYS_WRITE, args);
}

   -int semihost_read(FILEHANDLE fh, unsigned char *buffer, unsigned int 
length, int mode)
   +int
   +semihost_read(FILEHANDLE fh, unsigned char *buffer, unsigned int length, 
int mode)
{
uint32_t args[3];
args[0] = (uint32_t)fh;
   @@ -69,12 +73,14 @@
return __semihost(SYS_READ, args);
}

   -int semihost_istty(FILEHANDLE fh)
   +int
   +semihost_istty(FILEHANDLE fh)
{
return __semihost(SYS_ISTTY, );
}

   -int semihost_seek(FILEHANDLE fh, long position)
   +int
   +semihost_seek(FILEHANDLE fh, long position)
{
uint32_t args[2];
args[0] = (uint32_t)fh;
   @@ -82,17 +88,20 @@
return __semihost(SYS_SEEK, args);
}

   -int semihost_ensure(FILEHANDLE fh)
   +int
   +semihost_ensure(FILEHANDLE fh)
{
return __semihost(SYS_ENSURE, );
}

   -long semihost_flen(FILEHANDLE fh)
   +long
   +semihost_flen(FILEHANDLE fh)
{
return __semihost(SYS_FLEN, );
}

   -int semihost_remove(const char *name)
   +int
   +semihost_remove(const char *name)
{
uint32_t args[2];
args[0] = (uint32_t)name;
   @@ -100,7 +109,8 @@
return __semihost(SYS_REMOVE, args);
}

   -int semihost_rename(const char *old_name, const char *new_name)
   +int
   +semihost_rename(const char *old_name, const char *new_name)
{
uint32_t args[4];
args[0] = (uint32_t)old_name;
   @@ -110,13 +120,15 @@
return __semihost(SYS_RENAME, args);
}

   -int semihost_exit(void)
   +int
   +semihost_exit(void)
{
uint32_t args[4];
return __semihost(SYS_EXIT, args);
}

   -int semihost_connected(void)
   +int
   +semihost_connected(void)
{
return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) ? 1 : 0;
}
   ```
   
   


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 

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on issue #2259: ARM semihosting console on pinetime

2020-04-03 Thread GitBox
apache-mynewt-bot removed a comment on issue #2259: ARM semihosting console on 
pinetime
URL: https://github.com/apache/mynewt-core/pull/2259#issuecomment-608018497
 
 
   
   
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
    hw/drivers/semihosting/include/semihosting/mbed_semihost_api.h
   
   
   ```diff
   @@ -1,4 +1,3 @@
   -
/* mbed Microcontroller Library
 * Copyright (c) 2006-2019 ARM Limited
 * SPDX-License-Identifier: Apache-2.0
   @@ -27,7 +26,8 @@
#if !defined(__ARMCC_VERSION)

#if defined(__ICCARM__)
   -static inline int __semihost(int reason, const void *arg)
   +static inline int
   +__semihost(int reason, const void *arg)
{
return __semihosting(reason, (void *)arg);
}
   @@ -43,19 +43,20 @@
#   define AngelSWIAsm  swi
#endif

   -static inline int __semihost(int reason, const void *arg)
   +static inline int
   +__semihost(int reason, const void *arg)
{
int value;

   -asm volatile(
   +asm volatile (
"mov r0, %1"  "\n\t"
"mov r1, %2"  "\n\t"
AngelSWIInsn " %a3"   "\n\t"
"mov %0, r0"
   -: "=r"(value)  /* output 
operands */
   -: "r"(reason), "r"(arg), "i"(AngelSWI) /* input 
operands  */
   +: "=r" (value)  /* output 
operands */
   +: "r" (reason), "r" (arg), "i" (AngelSWI) /* input 
operands  */
: "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"   /* list of 
clobbered registers */
   -);
   +);

return value;
}
   ```
   
   
   
    hw/drivers/semihosting/src/mbed_semihost_api.c
   
   
   ```diff
   @@ -20,7 +20,7 @@
#include 
#include 

   -// ARM Semihosting Commands
   +/* ARM Semihosting Commands */
#define SYS_OPEN   (0x1)
#define SYS_CLOSE  (0x2)
#define SYS_WRITE  (0x5)
   @@ -33,7 +33,8 @@
#define SYS_RENAME (0xf)
#define SYS_EXIT   (0x18)

   -FILEHANDLE semihost_open(const char *name, int openmode)
   +FILEHANDLE
   +semihost_open(const char *name, int openmode)
{
uint32_t args[3];
args[0] = (uint32_t)name;
   @@ -42,12 +43,14 @@
return __semihost(SYS_OPEN, args);
}

   -int semihost_close(FILEHANDLE fh)
   +int
   +semihost_close(FILEHANDLE fh)
{
return __semihost(SYS_CLOSE, );
}

   -int semihost_write(FILEHANDLE fh, const unsigned char *buffer, unsigned int 
length, int mode)
   +int
   +semihost_write(FILEHANDLE fh, const unsigned char *buffer, unsigned int 
length, int mode)
{
if (length == 0) {
return 0;
   @@ -60,7 +63,8 @@
return __semihost(SYS_WRITE, args);
}

   -int semihost_read(FILEHANDLE fh, unsigned char *buffer, unsigned int 
length, int mode)
   +int
   +semihost_read(FILEHANDLE fh, unsigned char *buffer, unsigned int length, 
int mode)
{
uint32_t args[3];
args[0] = (uint32_t)fh;
   @@ -69,12 +73,14 @@
return __semihost(SYS_READ, args);
}

   -int semihost_istty(FILEHANDLE fh)
   +int
   +semihost_istty(FILEHANDLE fh)
{
return __semihost(SYS_ISTTY, );
}

   -int semihost_seek(FILEHANDLE fh, long position)
   +int
   +semihost_seek(FILEHANDLE fh, long position)
{
uint32_t args[2];
args[0] = (uint32_t)fh;
   @@ -82,17 +88,20 @@
return __semihost(SYS_SEEK, args);
}

   -int semihost_ensure(FILEHANDLE fh)
   +int
   +semihost_ensure(FILEHANDLE fh)
{
return __semihost(SYS_ENSURE, );
}

   -long semihost_flen(FILEHANDLE fh)
   +long
   +semihost_flen(FILEHANDLE fh)
{
return __semihost(SYS_FLEN, );
}

   -int semihost_remove(const char *name)
   +int
   +semihost_remove(const char *name)
{
uint32_t args[2];
args[0] = (uint32_t)name;
   @@ -100,7 +109,8 @@
return __semihost(SYS_REMOVE, args);
}

   -int semihost_rename(const char *old_name, const char *new_name)
   +int
   +semihost_rename(const char *old_name, const char *new_name)
{
uint32_t args[4];
args[0] = (uint32_t)old_name;
   @@ -110,13 +120,15 @@
return __semihost(SYS_RENAME, args);
}

   -int semihost_exit(void)
   +int
   +semihost_exit(void)
{
uint32_t args[4];
return __semihost(SYS_EXIT, args);
}

   -int semihost_connected(void)
   +int
   +semihost_connected(void)
{
return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) ? 1 : 0;
}
   ```
   
   
   
    sys/console/full/src/semihosting_console.c
   
   
   ```diff
   @@ -25,7 +25,7 @@
static unsigned char 
semihosting_tx_buffer[MYNEWT_VAL(CONSOLE_SEMIHOSTING_TX_BUF_SIZE)];

[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
rymanluk commented on a change in pull request #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#discussion_r402780122
 
 

 ##
 File path: nimble/host/src/ble_store_util.c
 ##
 @@ -230,13 +299,35 @@ ble_store_util_delete_oldest_peer(void)
 int
 ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
 {
+int rc = BLE_HS_EUNKNOWN;
+ble_addr_t peer_id_addr;
+int num_peers;
+
 switch (event->event_code) {
 case BLE_STORE_EVENT_OVERFLOW:
 switch (event->overflow.obj_type) {
 case BLE_STORE_OBJ_TYPE_OUR_SEC:
 case BLE_STORE_OBJ_TYPE_PEER_SEC:
 case BLE_STORE_OBJ_TYPE_CCCD:
-return ble_gap_unpair_oldest_peer();
 
 Review comment:
   I believe that for CCCD we should have different handling and if we want to 
unpair older peer we should not unpair peer for which we store CCCD.  If there 
is nothing to unpair just return the error.
   
   In the CCCD event there is and ble_addr we should use to make sure that one 
is no unpaired.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [mynewt-nimble] rymanluk commented on a change in pull request #790: nimble/store: Fix nimble store behavior when CCCDs exceed static defined limit

2020-04-03 Thread GitBox
rymanluk commented on a change in pull request #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#discussion_r402775932
 
 

 ##
 File path: nimble/host/src/ble_gap.c
 ##
 @@ -5594,7 +5594,7 @@ ble_gap_unpair_oldest_peer(void)
 }
 
 if (num_peers == 0) {
-return 0;
+return BLE_HS_ENOENT;
 
 Review comment:
   Can we make it as separate patch?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services