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
095d303b
Commit
095d303b
authored
10 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
http2 fix build when http2 disabled
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
3faf44e1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/handshake.c
+2
-0
2 additions, 0 deletions
lib/handshake.c
lib/output.c
+2
-0
2 additions, 0 deletions
lib/output.c
lib/service.c
+3
-3
3 additions, 3 deletions
lib/service.c
with
7 additions
and
3 deletions
lib/handshake.c
+
2
−
0
View file @
095d303b
...
@@ -65,6 +65,7 @@ libwebsocket_read(struct libwebsocket_context *context,
...
@@ -65,6 +65,7 @@ libwebsocket_read(struct libwebsocket_context *context,
unsigned
char
*
last_char
;
unsigned
char
*
last_char
;
switch
(
wsi
->
state
)
{
switch
(
wsi
->
state
)
{
#ifdef LWS_USE_HTTP2
case
WSI_STATE_HTTP2_AWAIT_CLIENT_PREFACE
:
case
WSI_STATE_HTTP2_AWAIT_CLIENT_PREFACE
:
case
WSI_STATE_HTTP2_ESTABLISHED_PRE_SETTINGS
:
case
WSI_STATE_HTTP2_ESTABLISHED_PRE_SETTINGS
:
case
WSI_STATE_HTTP2_ESTABLISHED
:
case
WSI_STATE_HTTP2_ESTABLISHED
:
...
@@ -86,6 +87,7 @@ libwebsocket_read(struct libwebsocket_context *context,
...
@@ -86,6 +87,7 @@ libwebsocket_read(struct libwebsocket_context *context,
goto
bail
;
goto
bail
;
}
}
break
;
break
;
#endif
http_new:
http_new:
case
WSI_STATE_HTTP
:
case
WSI_STATE_HTTP
:
wsi
->
hdr_parsing_completed
=
0
;
wsi
->
hdr_parsing_completed
=
0
;
...
...
This diff is collapsed.
Click to expand it.
lib/output.c
+
2
−
0
View file @
095d303b
...
@@ -432,12 +432,14 @@ send_raw:
...
@@ -432,12 +432,14 @@ send_raw:
case
LWS_WRITE_HTTP_HEADERS
:
case
LWS_WRITE_HTTP_HEADERS
:
case
LWS_WRITE_PONG
:
case
LWS_WRITE_PONG
:
case
LWS_WRITE_PING
:
case
LWS_WRITE_PING
:
#ifdef LWS_USE_HTTP2
if
(
wsi
->
mode
==
LWS_CONNMODE_HTTP2_SERVING
)
{
if
(
wsi
->
mode
==
LWS_CONNMODE_HTTP2_SERVING
)
{
n
=
LWS_HTTP2_FRAME_TYPE_DATA
;
n
=
LWS_HTTP2_FRAME_TYPE_DATA
;
if
(
protocol
==
LWS_WRITE_HTTP_HEADERS
)
if
(
protocol
==
LWS_WRITE_HTTP_HEADERS
)
n
=
LWS_HTTP2_FRAME_TYPE_HEADERS
;
n
=
LWS_HTTP2_FRAME_TYPE_HEADERS
;
return
lws_http2_frame_write
(
wsi
,
n
,
0
,
wsi
->
u
.
http2
.
my_stream_id
,
len
,
buf
);
return
lws_http2_frame_write
(
wsi
,
n
,
0
,
wsi
->
u
.
http2
.
my_stream_id
,
len
,
buf
);
}
}
#endif
return
lws_issue_raw
(
wsi
,
(
unsigned
char
*
)
buf
-
pre
,
return
lws_issue_raw
(
wsi
,
(
unsigned
char
*
)
buf
-
pre
,
len
+
pre
+
post
);
len
+
pre
+
post
);
default:
default:
...
...
This diff is collapsed.
Click to expand it.
lib/service.c
+
3
−
3
View file @
095d303b
...
@@ -47,10 +47,10 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
...
@@ -47,10 +47,10 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
lwsl_info
(
"***** %x signalling to close in POLLOUT handler
\n
"
,
wsi
);
lwsl_info
(
"***** %x signalling to close in POLLOUT handler
\n
"
,
wsi
);
return
-
1
;
/* retry closing now */
return
-
1
;
/* retry closing now */
}
}
#ifdef LWS_USE_HTTP2
/* protocol packets are next */
/* protocol packets are next */
if
(
wsi
->
pps
)
{
if
(
wsi
->
pps
)
{
lwsl_
err
(
"servicing pps %d
\n
"
,
wsi
->
pps
);
lwsl_
info
(
"servicing pps %d
\n
"
,
wsi
->
pps
);
switch
(
wsi
->
pps
)
{
switch
(
wsi
->
pps
)
{
case
LWS_PPS_HTTP2_MY_SETTINGS
:
case
LWS_PPS_HTTP2_MY_SETTINGS
:
case
LWS_PPS_HTTP2_ACK_SETTINGS
:
case
LWS_PPS_HTTP2_ACK_SETTINGS
:
...
@@ -64,7 +64,7 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
...
@@ -64,7 +64,7 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
return
0
;
/* leave POLLOUT active */
return
0
;
/* leave POLLOUT active */
}
}
#endif
/* pending control packets have next priority */
/* pending control packets have next priority */
if
(
wsi
->
state
==
WSI_STATE_ESTABLISHED
&&
wsi
->
u
.
ws
.
ping_payload_len
)
{
if
(
wsi
->
state
==
WSI_STATE_ESTABLISHED
&&
wsi
->
u
.
ws
.
ping_payload_len
)
{
...
...
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