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
e8db81e3
Commit
e8db81e3
authored
May 28, 2010
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SSL error logging my Martin Lamb
parent
57157edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
mongoose.c
mongoose.c
+5
-4
No files found.
mongoose.c
View file @
e8db81e3
...
@@ -477,7 +477,8 @@ cry(struct mg_connection *conn, const char *fmt, ...)
...
@@ -477,7 +477,8 @@ cry(struct mg_connection *conn, const char *fmt, ...)
(
void
)
fprintf
(
fp
,
"%s"
,
buf
);
(
void
)
fprintf
(
fp
,
"%s"
,
buf
);
fputc
(
'\n'
,
fp
);
fputc
(
'\n'
,
fp
);
funlockfile
(
fp
);
funlockfile
(
fp
);
if
(
fp
!=
stderr
)
fclose
(
fp
);
if
(
fp
!=
stderr
)
fclose
(
fp
);
}
}
}
}
conn
->
request_info
.
log_message
=
NULL
;
conn
->
request_info
.
log_message
=
NULL
;
...
@@ -488,16 +489,16 @@ cry(struct mg_connection *conn, const char *fmt, ...)
...
@@ -488,16 +489,16 @@ cry(struct mg_connection *conn, const char *fmt, ...)
*/
*/
static
void
ssl_cry
(
struct
mg_connection
*
conn
,
const
char
*
fmt
,
...)
{
static
void
ssl_cry
(
struct
mg_connection
*
conn
,
const
char
*
fmt
,
...)
{
char
buf
[
BUFSIZ
];
char
buf
[
BUFSIZ
];
unsigned
long
err
;
va_list
ap
;
va_list
ap
;
/*
first just log the mongoose-level error message passed in via fmt, etc.
*/
/*
Log Mongoose message
*/
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
(
void
)
vsnprintf
(
buf
,
sizeof
(
buf
),
fmt
,
ap
);
(
void
)
vsnprintf
(
buf
,
sizeof
(
buf
),
fmt
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
cry
(
conn
,
buf
);
cry
(
conn
,
buf
);
/* then loop through any unlogged OpenSSL errors */
/* Loop through any unlogged OpenSSL errors */
unsigned
long
err
;
while
((
err
=
ERR_get_error
())
!=
0
)
{
while
((
err
=
ERR_get_error
())
!=
0
)
{
cry
(
conn
,
" --> OpenSSL: %s"
,
ERR_error_string
(
err
,
NULL
));
cry
(
conn
,
" --> OpenSSL: %s"
,
ERR_error_string
(
err
,
NULL
));
}
}
...
...
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