[vlc-commits] [Git][videolan/vlc][master] access/http: fix type passed to conn_shutdown()
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Wed Jan 4 16:42:44 UTC 2023
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
3c9e8c20 by Steve Lhomme at 2023-01-04T15:38:45+00:00
access/http: fix type passed to conn_shutdown()
It expects a boolean, not a shutdown type. The boolean values are based on the
values passed before. SHUT_RD is 0, the other ones have a non-zero value.
- - - - -
1 changed file:
- modules/access/http/h1conn_test.c
Changes:
=====================================
modules/access/http/h1conn_test.c
=====================================
@@ -108,7 +108,7 @@ int main(void)
/* Test rejected connection */
conn_create();
- conn_shutdown(SHUT_RD);
+ conn_shutdown(false);
s = stream_open(false);
if (s != NULL)
/* Remote read shutdown does not result in an error on some systems. */
@@ -119,7 +119,7 @@ int main(void)
conn_create();
s = stream_open(false);
assert(s != NULL);
- conn_shutdown(SHUT_WR);
+ conn_shutdown(true);
m = vlc_http_stream_read_headers(s);
assert(m == NULL);
@@ -141,7 +141,7 @@ int main(void)
s = stream_open(false);
assert(s != NULL);
conn_send("Go away!\r\n\r\n");
- conn_shutdown(SHUT_WR);
+ conn_shutdown(true);
m = vlc_http_stream_read_headers(s);
assert(m == NULL);
@@ -159,7 +159,7 @@ int main(void)
assert(m != NULL);
conn_send("Hello world!");
- conn_shutdown(SHUT_WR);
+ conn_shutdown(true);
b = vlc_http_msg_read(m);
assert(b != NULL);
assert(b->i_buffer == 12);
@@ -179,7 +179,7 @@ int main(void)
assert(m != NULL);
conn_send("Hello again!");
- conn_shutdown(SHUT_WR);
+ conn_shutdown(true);
b = vlc_http_msg_read(m);
assert(b != NULL);
assert(b->i_buffer == 12);
@@ -243,7 +243,7 @@ int main(void)
assert(b->i_buffer == 6);
assert(!memcmp(b->p_buffer, "Hello ", 6));
block_Release(b);
- conn_shutdown(SHUT_RDWR);
+ conn_shutdown(true);
b = vlc_http_msg_read(m);
assert(b == vlc_http_error);
vlc_http_msg_destroy(m);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3c9e8c2005f0f5d3810dde925a03d5d3038e8d15
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3c9e8c2005f0f5d3810dde925a03d5d3038e8d15
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list