diff --git a/mongoose.c b/mongoose.c index ebb6a517..108b13ad 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4397,7 +4397,7 @@ int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len); static int ssl_socket_send(void *ctx, const unsigned char *buf, size_t len) { struct mg_connection *nc = (struct mg_connection *) ctx; int n = (int) MG_SEND_FUNC(nc->sock, buf, len, 0); - DBG(("%p %d -> %d", nc, (int) len, n)); + LOG(LL_DEBUG, ("%p %d -> %d", nc, (int) len, n)); if (n >= 0) return n; n = mg_get_errno(); return ((n == EAGAIN || n == EINPROGRESS) ? MBEDTLS_ERR_SSL_WANT_WRITE : -1); @@ -4406,7 +4406,7 @@ static int ssl_socket_send(void *ctx, const unsigned char *buf, size_t len) { static int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len) { struct mg_connection *nc = (struct mg_connection *) ctx; int n = (int) MG_RECV_FUNC(nc->sock, buf, len, 0); - DBG(("%p %d <- %d", nc, (int) len, n)); + LOG(LL_DEBUG, ("%p %d <- %d", nc, (int) len, n)); if (n >= 0) return n; n = mg_get_errno(); return ((n == EAGAIN || n == EINPROGRESS) ? MBEDTLS_ERR_SSL_WANT_READ : -1); @@ -14584,7 +14584,7 @@ int ssl_socket_send(void *ctx, const unsigned char *buf, size_t len) { struct mg_connection *nc = (struct mg_connection *) ctx; struct mg_lwip_conn_state *cs = (struct mg_lwip_conn_state *) nc->sock; int ret = mg_lwip_tcp_write(cs->nc, buf, len); - DBG(("%p mg_lwip_tcp_write %u = %d", cs->nc, len, ret)); + LOG(LL_DEBUG, ("%p %d -> %d", nc, len, ret)); if (ret == 0) ret = MBEDTLS_ERR_SSL_WANT_WRITE; return ret; } @@ -14610,6 +14610,7 @@ int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len) { pbuf_free(seg); cs->rx_offset = 0; } + LOG(LL_DEBUG, ("%p <- %d", nc, (int) len)); return len; }