Revision 7988acbf

View differences:

mongoose.c
4397 4397
static int ssl_socket_send(void *ctx, const unsigned char *buf, size_t len) {
4398 4398
  struct mg_connection *nc = (struct mg_connection *) ctx;
4399 4399
  int n = (int) MG_SEND_FUNC(nc->sock, buf, len, 0);
4400
  DBG(("%p %d -> %d", nc, (int) len, n));
4400
  LOG(LL_DEBUG, ("%p %d -> %d", nc, (int) len, n));
4401 4401
  if (n >= 0) return n;
4402 4402
  n = mg_get_errno();
4403 4403
  return ((n == EAGAIN || n == EINPROGRESS) ? MBEDTLS_ERR_SSL_WANT_WRITE : -1);
......
4406 4406
static int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len) {
4407 4407
  struct mg_connection *nc = (struct mg_connection *) ctx;
4408 4408
  int n = (int) MG_RECV_FUNC(nc->sock, buf, len, 0);
4409
  DBG(("%p %d <- %d", nc, (int) len, n));
4409
  LOG(LL_DEBUG, ("%p %d <- %d", nc, (int) len, n));
4410 4410
  if (n >= 0) return n;
4411 4411
  n = mg_get_errno();
4412 4412
  return ((n == EAGAIN || n == EINPROGRESS) ? MBEDTLS_ERR_SSL_WANT_READ : -1);
......
14584 14584
  struct mg_connection *nc = (struct mg_connection *) ctx;
14585 14585
  struct mg_lwip_conn_state *cs = (struct mg_lwip_conn_state *) nc->sock;
14586 14586
  int ret = mg_lwip_tcp_write(cs->nc, buf, len);
14587
  DBG(("%p mg_lwip_tcp_write %u = %d", cs->nc, len, ret));
14587
  LOG(LL_DEBUG, ("%p %d -> %d", nc, len, ret));
14588 14588
  if (ret == 0) ret = MBEDTLS_ERR_SSL_WANT_WRITE;
14589 14589
  return ret;
14590 14590
}
......
14610 14610
    pbuf_free(seg);
14611 14611
    cs->rx_offset = 0;
14612 14612
  }
14613
  LOG(LL_DEBUG, ("%p <- %d", nc, (int) len));
14613 14614
  return len;
14614 14615
}
14615 14616

  

Also available in: Unified diff