Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
409c12a8
Commit
409c12a8
authored
Mar 18, 2015
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better logic for port resolving
parent
bcdcbf20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
mongoose.c
mongoose.c
+10
-3
No files found.
mongoose.c
View file @
409c12a8
...
...
@@ -5149,11 +5149,18 @@ const char *mg_set_option(struct mg_server *server, const char *name,
error_msg
=
"Cannot bind to port"
;
break
;
}
else
{
char
buf2
[
50
];
char
buf2
[
50
],
cert
[
100
],
ca
[
100
];
union
socket_address
sa
;
int
proto
,
use_ssl
;
ns_parse_address
(
vec
.
ptr
,
&
sa
,
&
proto
,
&
use_ssl
,
cert
,
ca
);
ns_sock_to_str
(
c
->
sock
,
buf2
,
sizeof
(
buf2
),
memchr
(
vec
.
ptr
,
':'
,
vec
.
len
)
==
NULL
?
2
:
3
);
n
+=
snprintf
(
buf
+
n
,
sizeof
(
buf
)
-
n
,
"%s%s"
,
n
>
0
?
","
:
""
,
buf2
);
n
+=
snprintf
(
buf
+
n
,
sizeof
(
buf
)
-
n
,
"%s%s%s%s%s%s%s"
,
n
>
0
?
","
:
""
,
use_ssl
?
"ssl://"
:
""
,
buf2
,
cert
[
0
]
?
":"
:
""
,
cert
,
ca
[
0
]
?
":"
:
""
,
ca
);
}
}
buf
[
sizeof
(
buf
)
-
1
]
=
'\0'
;
...
...
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