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
2990f932
Commit
2990f932
authored
Dec 21, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
struct linked_list_link -> struct ll
parent
a0befd65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
mongoose.c
mongoose.c
+10
-10
No files found.
mongoose.c
View file @
2990f932
...
...
@@ -117,9 +117,9 @@ typedef struct stat file_stat_t;
#include "mongoose.h"
struct
l
inked_list_link
{
struct
linked_list_link
*
prev
,
*
next
;
};
struct
l
l
{
struct
ll
*
prev
,
*
next
;
};
#define LINKED_LIST_INIT(N) ((N)->next = (N)->prev = (N))
#define LINKED_LIST_DECLARE_AND_INIT(H) struct l
inked_list_link
H = { &H, &H }
#define LINKED_LIST_DECLARE_AND_INIT(H) struct l
l
H = { &H, &H }
#define LINKED_LIST_ENTRY(P,T,N) ((T *)((char *)(P) - offsetof(T, N)))
#define LINKED_LIST_IS_EMPTY(N) ((N)->next == (N))
#define LINKED_LIST_FOREACH(H,N,T) \
...
...
@@ -171,7 +171,7 @@ struct vec {
};
struct
uri_handler
{
struct
l
inked_list_link
link
;
struct
l
l
link
;
char
*
uri
;
mg_handler_t
handler
;
};
...
...
@@ -195,8 +195,8 @@ enum {
struct
mg_server
{
sock_t
listening_sock
;
union
socket_address
lsa
;
// Listening socket address
struct
l
inked_list_link
active_connections
;
struct
l
inked_list_link
uri_handlers
;
struct
l
l
active_connections
;
struct
l
l
uri_handlers
;
char
*
config_options
[
NUM_OPTIONS
];
void
*
server_data
;
void
*
ssl_ctx
;
// SSL context
...
...
@@ -225,7 +225,7 @@ enum connection_flags {
struct
connection
{
struct
mg_connection
mg_conn
;
// XXX: Must be first
struct
l
inked_list_link
link
;
// Linkage to server->active_connections
struct
l
l
link
;
// Linkage to server->active_connections
struct
mg_server
*
server
;
sock_t
client_sock
;
// Connected client
struct
iobuf
local_iobuf
;
...
...
@@ -1709,7 +1709,7 @@ static int is_not_modified(const struct connection *conn,
static
struct
uri_handler
*
find_uri_handler
(
struct
mg_server
*
server
,
const
char
*
uri
)
{
struct
l
inked_list_link
*
lp
,
*
tmp
;
struct
l
l
*
lp
,
*
tmp
;
struct
uri_handler
*
uh
;
LINKED_LIST_FOREACH
(
&
server
->
uri_handlers
,
lp
,
tmp
)
{
...
...
@@ -3119,7 +3119,7 @@ void add_to_set(sock_t sock, fd_set *set, sock_t *max_fd) {
}
void
mg_poll_server
(
struct
mg_server
*
server
,
int
milliseconds
)
{
struct
l
inked_list_link
*
lp
,
*
tmp
;
struct
l
l
*
lp
,
*
tmp
;
struct
connection
*
conn
;
struct
timeval
tv
;
fd_set
read_set
,
write_set
;
...
...
@@ -3196,7 +3196,7 @@ void mg_poll_server(struct mg_server *server, int milliseconds) {
}
void
mg_destroy_server
(
struct
mg_server
**
server
)
{
struct
l
inked_list_link
*
lp
,
*
tmp
;
struct
l
l
*
lp
,
*
tmp
;
if
(
server
!=
NULL
&&
*
server
!=
NULL
)
{
closesocket
((
*
server
)
->
listening_sock
);
...
...
@@ -3221,7 +3221,7 @@ void mg_destroy_server(struct mg_server **server) {
int
mg_iterate_over_connections
(
struct
mg_server
*
server
,
void
(
*
func
)(
struct
mg_connection
*
,
void
*
),
void
*
param
)
{
struct
l
inked_list_link
*
lp
,
*
tmp
;
struct
l
l
*
lp
,
*
tmp
;
struct
connection
*
conn
;
int
num_connections
=
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