diff --git a/porting/nimble/src/os_mbuf.c b/porting/nimble/src/os_mbuf.c index fd972afc7..0a94ee404 100644 --- a/porting/nimble/src/os_mbuf.c +++ b/porting/nimble/src/os_mbuf.c @@ -36,6 +36,7 @@ #include "os/os.h" #include "os/os_trace_api.h" #include "modlog/modlog.h" +#include "esp_log.h" #include #include @@ -189,8 +190,8 @@ os_msys_get(uint16_t dsize, uint16_t leadingspace) return (m); err: log_count ++; - if ((log_count % 40) == 0) { - ets_printf("_os_msys_find_pool failed (size %u)\n",dsize); + if ((log_count % 100) == 0) { + ESP_LOGI("ESP_LOG_INFO","_os_msys_find_pool failed (size %u)\n",dsize); log_count = 0; } @@ -214,8 +215,8 @@ os_msys_get_pkthdr(uint16_t dsize, uint16_t user_hdr_len) return (m); err: log_count ++; - if ((log_count % 40) == 0) { - ets_printf("_os_msys_find_pool failed (size %u)\n",dsize); + if ((log_count % 100) == 0) { + ESP_LOGI("ESP_LOG_INFO","_os_msys_find_pool failed (size %u)\n",dsize); log_count = 0; } return (NULL); diff --git a/porting/nimble/src/os_mempool.c b/porting/nimble/src/os_mempool.c index 19d2b69c7..96b2992c4 100644 --- a/porting/nimble/src/os_mempool.c +++ b/porting/nimble/src/os_mempool.c @@ -41,7 +41,6 @@ STAILQ_HEAD(, os_mempool) g_os_mempool_list = STAILQ_HEAD_INITIALIZER(g_os_mempool_list); -static uint8_t log_count; #if MYNEWT_VAL(OS_MEMPOOL_POISON) static uint32_t os_mem_poison = 0xde7ec7ed; @@ -375,14 +374,6 @@ os_memblock_get(struct os_mempool *mp) os_trace_api_ret_u32(OS_TRACE_ID_MEMBLOCK_GET, (uint32_t)(uintptr_t)block); - if(!block){ - log_count ++; - if ((log_count % 40) == 0) { - ets_printf("os_memblock_get failed (size %u)\n",sizeof *block); - log_count = 0; - } - } - return (void *)block; }