Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
7988acbf
Commit
7988acbf
authored
Jan 26, 2017
by
Deomid Ryabkov
Committed by
Cesanta Bot
Jan 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise log level of mbedTLS socket evs to LL_DEBUG
PUBLISHED_FROM=ed0ac4133342c733977e7884a6bbadab7ee74127
parent
b8c37404
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
mongoose.c
mongoose.c
+4
-3
No files found.
mongoose.c
View file @
7988acbf
...
@@ -4397,7 +4397,7 @@ int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len);
...
@@ -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
)
{
static
int
ssl_socket_send
(
void
*
ctx
,
const
unsigned
char
*
buf
,
size_t
len
)
{
struct
mg_connection
*
nc
=
(
struct
mg_connection
*
)
ctx
;
struct
mg_connection
*
nc
=
(
struct
mg_connection
*
)
ctx
;
int
n
=
(
int
)
MG_SEND_FUNC
(
nc
->
sock
,
buf
,
len
,
0
);
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
;
if
(
n
>=
0
)
return
n
;
n
=
mg_get_errno
();
n
=
mg_get_errno
();
return
((
n
==
EAGAIN
||
n
==
EINPROGRESS
)
?
MBEDTLS_ERR_SSL_WANT_WRITE
:
-
1
);
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) {
...
@@ -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
)
{
static
int
ssl_socket_recv
(
void
*
ctx
,
unsigned
char
*
buf
,
size_t
len
)
{
struct
mg_connection
*
nc
=
(
struct
mg_connection
*
)
ctx
;
struct
mg_connection
*
nc
=
(
struct
mg_connection
*
)
ctx
;
int
n
=
(
int
)
MG_RECV_FUNC
(
nc
->
sock
,
buf
,
len
,
0
);
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
;
if
(
n
>=
0
)
return
n
;
n
=
mg_get_errno
();
n
=
mg_get_errno
();
return
((
n
==
EAGAIN
||
n
==
EINPROGRESS
)
?
MBEDTLS_ERR_SSL_WANT_READ
:
-
1
);
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) {
...
@@ -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_connection
*
nc
=
(
struct
mg_connection
*
)
ctx
;
struct
mg_lwip_conn_state
*
cs
=
(
struct
mg_lwip_conn_state
*
)
nc
->
sock
;
struct
mg_lwip_conn_state
*
cs
=
(
struct
mg_lwip_conn_state
*
)
nc
->
sock
;
int
ret
=
mg_lwip_tcp_write
(
cs
->
nc
,
buf
,
len
);
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
;
if
(
ret
==
0
)
ret
=
MBEDTLS_ERR_SSL_WANT_WRITE
;
return
ret
;
return
ret
;
}
}
...
@@ -14610,6 +14610,7 @@ int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len) {
...
@@ -14610,6 +14610,7 @@ int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len) {
pbuf_free
(
seg
);
pbuf_free
(
seg
);
cs
->
rx_offset
=
0
;
cs
->
rx_offset
=
0
;
}
}
LOG
(
LL_DEBUG
,
(
"%p <- %d"
,
nc
,
(
int
)
len
));
return
len
;
return
len
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment