[GitHub] ccollins476ad opened a new pull request #300: Re-add 128-bit iotivity service UUID.
ccollins476ad opened a new pull request #300: Re-add 128-bit iotivity service UUID. URL: https://github.com/apache/incubator-mynewt-core/pull/300 Earlier, we started using a 16-bit UUID (0x9923) instead of the 128-bit UUID for this service. The 128-bit UUID was actually the iotivity service UUID which we want to support. This commit adds the 128-bit UUID back. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] PierreKircher opened a new pull request #195: community slack link
PierreKircher opened a new pull request #195: community slack link URL: https://github.com/apache/incubator-mynewt-site/pull/195 community slack link . req by sterling This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119484188 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) +{ +#if !MYNEWT_VAL(BLE_SM_BONDING) +return 0; +#endif + +struct ble_store_status_event event; +int obj_type; +int count; +int rc; + +if (is_our_sec) { +obj_type = BLE_STORE_OBJ_TYPE_OUR_SEC; +} else { +obj_type = BLE_STORE_OBJ_TYPE_PEER_SEC; +} + +rc = ble_store_util_count(obj_type, ); +if (rc != 0) { +return rc; +} + +/* Pessimistically assume all active procs will persist bonds. */ +ble_hs_lock(); +count += ble_sm_num_procs(); Review comment: ah I see This is an automated message from the Apache Git Service. To respond to the message, please log on 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] ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow
ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119369837 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) +{ +#if !MYNEWT_VAL(BLE_SM_BONDING) +return 0; +#endif + +struct ble_store_status_event event; +int obj_type; +int count; +int rc; + +if (is_our_sec) { +obj_type = BLE_STORE_OBJ_TYPE_OUR_SEC; +} else { +obj_type = BLE_STORE_OBJ_TYPE_PEER_SEC; +} + +rc = ble_store_util_count(obj_type, ); +if (rc != 0) { +return rc; +} + +/* Pessimistically assume all active procs will persist bonds. */ +ble_hs_lock(); +count += ble_sm_num_procs(); Review comment: It is initialized by the prior call to `ble_store_util_count()`. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow
ccollins476ad commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119369396 ## File path: net/nimble/host/include/host/ble_store.h ## @@ -31,6 +31,12 @@ extern "C" { #define BLE_STORE_OBJ_TYPE_PEER_SEC 2 #define BLE_STORE_OBJ_TYPE_CCCD 3 +/** Failed to persist record; insufficient storage capacity. */ +#define BLE_STORE_EVENT_OVERFLOW1 + +/** About to execute a procedure that may fail due to overflow. */ +#define BLE_STORE_EVENT_OVERFLOW_NEXT 2 Review comment: I wasn't sure if this event would be used for other record types as well (not just bonds). Since the first one (OVERFLOW) is used for multiple record types, I opted to keep both generic. I do agree BONDING is more clear. However, my only concern is that we'll have to rename it again (change the API) if we want to use it for other record types in the future. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] IMGJulian opened a new pull request #299: PIC32: Added lazy FPU context switch
IMGJulian opened a new pull request #299: PIC32: Added lazy FPU context switch URL: https://github.com/apache/incubator-mynewt-core/pull/299 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] aditihilbert commented on issue #194: slack logo in footer
aditihilbert commented on issue #194: slack logo in footer URL: https://github.com/apache/incubator-mynewt-site/pull/194#issuecomment-305171005 Thanks - This is cool! This is an automated message from the Apache Git Service. To respond to the message, please log on 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] aditihilbert closed pull request #194: slack logo in footer
aditihilbert closed pull request #194: slack logo in footer URL: https://github.com/apache/incubator-mynewt-site/pull/194 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk closed pull request #255: BLE Host - Fix peer OTA addr and type on pairing.
rymanluk closed pull request #255: BLE Host - Fix peer OTA addr and type on pairing. URL: https://github.com/apache/incubator-mynewt-core/pull/255 This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on issue #255: BLE Host - Fix peer OTA addr and type on pairing.
rymanluk commented on issue #255: BLE Host - Fix peer OTA addr and type on pairing. URL: https://github.com/apache/incubator-mynewt-core/pull/255#issuecomment-305115006 Talked to sjanc and he don't have objections - merging. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119286680 ## File path: net/nimble/host/src/ble_sm.c ## @@ -1610,6 +1693,7 @@ ble_sm_pair_rsp_rx(uint16_t conn_handle, struct os_mbuf **om, struct ble_sm_pair_cmd *rsp; struct ble_sm_proc *proc; uint8_t ioact; +int rc; Review comment: This seems to be not related to this patch This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119285543 ## File path: net/nimble/host/include/host/ble_store.h ## @@ -31,6 +31,12 @@ extern "C" { #define BLE_STORE_OBJ_TYPE_PEER_SEC 2 #define BLE_STORE_OBJ_TYPE_CCCD 3 +/** Failed to persist record; insufficient storage capacity. */ +#define BLE_STORE_EVENT_OVERFLOW1 + +/** About to execute a procedure that may fail due to overflow. */ +#define BLE_STORE_EVENT_OVERFLOW_NEXT 2 Review comment: since for BLE_STORE_EVENT_OVERFLOW_NEXT we specify conn_handle because it is used during pairing, why not to name type BLE_STORE_EVENT_OVERFLOW_BONDING or similar? That would make clear for application what is going wrong and what to do i.e. remove old bonded devices. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119286487 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) Review comment: maybe instead of is_our_sec we could provide obj_type? But actually maybe it would be better to create helper ble_store_overflow_event(obj_type, event_code, void *event_data) and keep this function to basically check if there is a sufficient place. I see that helper could be used at least in three places in this code. This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119287662 ## File path: net/nimble/host/src/ble_store.c ## @@ -28,49 +28,98 @@ ble_store_read(int obj_type, const union ble_store_key *key, { int rc; +ble_hs_lock(); Review comment: Is this related to this patch? BTW why we need it in ble_store? This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119285625 ## File path: net/nimble/host/src/ble_sm.c ## @@ -892,6 +895,72 @@ ble_sm_key_dist(struct ble_sm_proc *proc, } } +static int +ble_sm_chk_store_overflow_once(int is_our_sec, uint16_t conn_handle) +{ +#if !MYNEWT_VAL(BLE_SM_BONDING) +return 0; +#endif + +struct ble_store_status_event event; +int obj_type; +int count; +int rc; + +if (is_our_sec) { +obj_type = BLE_STORE_OBJ_TYPE_OUR_SEC; +} else { +obj_type = BLE_STORE_OBJ_TYPE_PEER_SEC; +} + +rc = ble_store_util_count(obj_type, ); +if (rc != 0) { +return rc; +} + +/* Pessimistically assume all active procs will persist bonds. */ +ble_hs_lock(); +count += ble_sm_num_procs(); Review comment: count is not initialized This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow
rymanluk commented on a change in pull request #279: BLE Host - Policy for SM key overflow URL: https://github.com/apache/incubator-mynewt-core/pull/279#discussion_r119288035 ## File path: net/nimble/host/src/ble_store.c ## @@ -28,49 +28,98 @@ ble_store_read(int obj_type, const union ble_store_key *key, { int rc; +ble_hs_lock(); + if (ble_hs_cfg.store_read_cb == NULL) { rc = BLE_HS_ENOTSUP; } else { rc = ble_hs_cfg.store_read_cb(obj_type, key, val); } +ble_hs_unlock(); + return rc; } int ble_store_write(int obj_type, const union ble_store_value *val) { +struct ble_store_status_event event; int rc; if (ble_hs_cfg.store_write_cb == NULL) { -rc = BLE_HS_ENOTSUP; -} else { -rc = ble_hs_cfg.store_write_cb(obj_type, val); +return BLE_HS_ENOTSUP; } -return rc; +while (1) { +ble_hs_lock(); +rc = ble_hs_cfg.store_write_cb(obj_type, val); +ble_hs_unlock(); + +switch (rc) { +case 0: +return 0; +case BLE_HS_ESTORE_CAP: +/* Record didn't fit. Give the application the opportunity to free + * up some space. + */ +event.obj_type = obj_type; +event.event_code = BLE_STORE_EVENT_OVERFLOW; +event.value = val; +rc = ble_store_status(); +if (rc != 0) { +return rc; +} + +/* Application made room for the record; try again. */ +break; + +default: +return rc; +} +} } int ble_store_delete(int obj_type, const union ble_store_key *key) { int rc; +ble_hs_lock(); Review comment: same as above This is an automated message from the Apache Git Service. To respond to the message, please log on 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] ccollins476ad commented on issue #55: MYNEWT-583; newt - allow use of specific tag/repository revision.
ccollins476ad commented on issue #55: MYNEWT-583; newt - allow use of specific tag/repository revision. URL: https://github.com/apache/incubator-mynewt-newt/pull/55#issuecomment-305100811 Btw, I figured out why my playground example wasn't working. The String() function operated on a `*S`, but I was passing a plain `S` to Printf. I updated the example code and now it does work (https://play.golang.org/p/4kMNJ8NdEB): ``` package main import ( "fmt" ) type S struct { a int } func (s *S) String() string { return fmt.Sprintf("%d", s.a) } func main() { s := {5} fmt.Printf("s=%s\n", s) } ``` ``` s=5 Program exited. ``` This is an automated message from the Apache Git Service. To respond to the message, please log on 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] rymanluk commented on issue #255: BLE Host - Fix peer OTA addr and type on pairing.
rymanluk commented on issue #255: BLE Host - Fix peer OTA addr and type on pairing. URL: https://github.com/apache/incubator-mynewt-core/pull/255#issuecomment-305096812 For me it looks good. This is an automated message from the Apache Git Service. To respond to the message, please log on 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