Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
4120f953
Commit
4120f953
authored
8 years ago
by
Deomid Ryabkov
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Report bind error in simplest_web_server_ssl
PUBLISHED_FROM=73e7ed5dd69cbca00ad6f67125915fbfb296770b
parent
844c7787
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/simplest_web_server_ssl/simplest_web_server_ssl.c
+4
-1
4 additions, 1 deletion
examples/simplest_web_server_ssl/simplest_web_server_ssl.c
with
4 additions
and
1 deletion
examples/simplest_web_server_ssl/simplest_web_server_ssl.c
+
4
−
1
View file @
4120f953
...
@@ -29,16 +29,19 @@ int main(void) {
...
@@ -29,16 +29,19 @@ int main(void) {
struct
mg_mgr
mgr
;
struct
mg_mgr
mgr
;
struct
mg_connection
*
nc
;
struct
mg_connection
*
nc
;
struct
mg_bind_opts
bind_opts
;
struct
mg_bind_opts
bind_opts
;
const
char
*
err
;
mg_mgr_init
(
&
mgr
,
NULL
);
mg_mgr_init
(
&
mgr
,
NULL
);
memset
(
&
bind_opts
,
0
,
sizeof
(
bind_opts
));
memset
(
&
bind_opts
,
0
,
sizeof
(
bind_opts
));
bind_opts
.
ssl_cert
=
s_ssl_cert
;
bind_opts
.
ssl_cert
=
s_ssl_cert
;
bind_opts
.
ssl_key
=
s_ssl_key
;
bind_opts
.
ssl_key
=
s_ssl_key
;
bind_opts
.
error_string
=
&
err
;
printf
(
"Starting SSL server on port %s, cert from %s, key from %s
\n
"
,
printf
(
"Starting SSL server on port %s, cert from %s, key from %s
\n
"
,
s_http_port
,
bind_opts
.
ssl_cert
,
bind_opts
.
ssl_key
);
s_http_port
,
bind_opts
.
ssl_cert
,
bind_opts
.
ssl_key
);
nc
=
mg_bind_opt
(
&
mgr
,
s_http_port
,
ev_handler
,
bind_opts
);
nc
=
mg_bind_opt
(
&
mgr
,
s_http_port
,
ev_handler
,
bind_opts
);
if
(
nc
==
NULL
)
{
if
(
nc
==
NULL
)
{
printf
(
"Failed to create listener
\n
"
);
printf
(
"Failed to create listener
: %s
\n
"
,
err
);
return
1
;
return
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment