Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
b49a995a
Commit
b49a995a
authored
11 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
clean small additional ifdef reduction
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
aad2eac4
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/context.c
+1
-11
1 addition, 11 deletions
lib/context.c
lib/output.c
+0
-9
0 additions, 9 deletions
lib/output.c
lib/private-libwebsockets.h
+2
-0
2 additions, 0 deletions
lib/private-libwebsockets.h
lib/service.c
+0
-3
0 additions, 3 deletions
lib/service.c
with
3 additions
and
23 deletions
lib/context.c
+
1
−
11
View file @
b49a995a
...
@@ -217,17 +217,8 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
...
@@ -217,17 +217,8 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
#ifndef LWS_NO_EXTENSIONS
#ifndef LWS_NO_EXTENSIONS
context
->
extensions
=
info
->
extensions
;
context
->
extensions
=
info
->
extensions
;
#endif
#endif
context
->
last_timeout_check_s
=
0
;
context
->
user_space
=
info
->
user
;
context
->
user_space
=
info
->
user
;
#ifdef LWS_OPENSSL_SUPPORT
context
->
use_ssl
=
0
;
context
->
allow_non_ssl_on_ssl_port
=
0
;
context
->
ssl_ctx
=
NULL
;
context
->
ssl_client_ctx
=
NULL
;
openssl_websocket_private_data_index
=
0
;
#endif
strcpy
(
context
->
canonical_hostname
,
"unknown"
);
strcpy
(
context
->
canonical_hostname
,
"unknown"
);
#ifndef LWS_NO_SERVER
#ifndef LWS_NO_SERVER
...
@@ -269,11 +260,10 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
...
@@ -269,11 +260,10 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
#endif
#endif
}
}
if
(
context
->
http_proxy_address
[
0
])
{
if
(
context
->
http_proxy_address
[
0
])
lwsl_notice
(
" Proxy %s:%u
\n
"
,
lwsl_notice
(
" Proxy %s:%u
\n
"
,
context
->
http_proxy_address
,
context
->
http_proxy_address
,
context
->
http_proxy_port
);
context
->
http_proxy_port
);
}
#ifndef LWS_NO_SERVER
#ifndef LWS_NO_SERVER
if
(
info
->
port
!=
CONTEXT_PORT_NO_LISTEN
)
{
if
(
info
->
port
!=
CONTEXT_PORT_NO_LISTEN
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/output.c
+
0
−
9
View file @
b49a995a
...
@@ -231,15 +231,6 @@ handle_truncated_send:
...
@@ -231,15 +231,6 @@ handle_truncated_send:
return
n
;
return
n
;
}
}
#ifdef LWS_NO_EXTENSIONS
int
lws_issue_raw_ext_access
(
struct
libwebsocket
*
wsi
,
unsigned
char
*
buf
,
size_t
len
)
{
return
lws_issue_raw
(
wsi
,
buf
,
len
);
}
#endif
/**
/**
* libwebsocket_write() - Apply protocol then write data to client
* libwebsocket_write() - Apply protocol then write data to client
* @wsi: Websocket instance (available from user callback)
* @wsi: Websocket instance (available from user callback)
...
...
This diff is collapsed.
Click to expand it.
lib/private-libwebsockets.h
+
2
−
0
View file @
b49a995a
...
@@ -668,6 +668,7 @@ lws_ext_callback_for_each_extension_type(
...
@@ -668,6 +668,7 @@ lws_ext_callback_for_each_extension_type(
#define lws_any_extension_handled(_a, _b, _c, _d, _e) (0)
#define lws_any_extension_handled(_a, _b, _c, _d, _e) (0)
#define lws_ext_callback_for_each_active(_a, _b, _c, _d) (0)
#define lws_ext_callback_for_each_active(_a, _b, _c, _d) (0)
#define lws_ext_callback_for_each_extension_type(_a, _b, _c, _d, _e) (0)
#define lws_ext_callback_for_each_extension_type(_a, _b, _c, _d, _e) (0)
#define lws_issue_raw_ext_access lws_issue_raw
#endif
#endif
LWS_EXTERN
int
LWS_EXTERN
int
...
@@ -762,6 +763,7 @@ LWS_EXTERN int openssl_websocket_private_data_index;
...
@@ -762,6 +763,7 @@ LWS_EXTERN int openssl_websocket_private_data_index;
LWS_EXTERN
int
lws_handshake_server
(
struct
libwebsocket_context
*
context
,
LWS_EXTERN
int
lws_handshake_server
(
struct
libwebsocket_context
*
context
,
struct
libwebsocket
*
wsi
,
unsigned
char
**
buf
,
size_t
len
);
struct
libwebsocket
*
wsi
,
unsigned
char
**
buf
,
size_t
len
);
#else
#else
#define lws_server_socket_service(_a, _b, _c) (0)
#define _libwebsocket_rx_flow_control(_a) (0)
#define _libwebsocket_rx_flow_control(_a) (0)
#define lws_handshake_server(_a, _b, _c, _d) (0)
#define lws_handshake_server(_a, _b, _c, _d) (0)
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
lib/service.c
+
0
−
3
View file @
b49a995a
...
@@ -335,15 +335,12 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
...
@@ -335,15 +335,12 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
/* okay, what we came here to do... */
/* okay, what we came here to do... */
switch
(
wsi
->
mode
)
{
switch
(
wsi
->
mode
)
{
#ifndef LWS_NO_SERVER
case
LWS_CONNMODE_HTTP_SERVING
:
case
LWS_CONNMODE_HTTP_SERVING
:
case
LWS_CONNMODE_HTTP_SERVING_ACCEPTED
:
case
LWS_CONNMODE_HTTP_SERVING_ACCEPTED
:
case
LWS_CONNMODE_SERVER_LISTENER
:
case
LWS_CONNMODE_SERVER_LISTENER
:
case
LWS_CONNMODE_SSL_ACK_PENDING
:
case
LWS_CONNMODE_SSL_ACK_PENDING
:
n
=
lws_server_socket_service
(
context
,
wsi
,
pollfd
);
n
=
lws_server_socket_service
(
context
,
wsi
,
pollfd
);
goto
handled
;
goto
handled
;
#endif
case
LWS_CONNMODE_WS_SERVING
:
case
LWS_CONNMODE_WS_SERVING
:
case
LWS_CONNMODE_WS_CLIENT
:
case
LWS_CONNMODE_WS_CLIENT
:
...
...
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