summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_locked.c
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-06-13 14:54:55 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-06-14 14:35:04 +0000
commit55c952ed5f56a1a478f03f8458e82530478c4359 (patch)
tree43198873060cc8b36cda93995a2f4e56810e87ff /src/vcl/vcl_locked.c
parent89d939e52c999edec66194c60bc5afb2397a2842 (diff)
vcl: improve shutdown()
This commit does following: - Change the behavior of shutdown() with SHUT_RDWR flag. - Check SHUT_RD flag when read() - Change the errno when write() after SHUT_WR - Remove unused code All the above modification passed the packetdrill test. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0c81f52e563562e58580d70976526b898e65e915
Diffstat (limited to 'src/vcl/vcl_locked.c')
-rw-r--r--src/vcl/vcl_locked.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index 69f492b8694..ea22bcd22f5 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -1314,7 +1314,7 @@ vls_close (vls_handle_t vlsh)
}
int
-vls_shutdown (vls_handle_t vlsh)
+vls_shutdown (vls_handle_t vlsh, int how)
{
vcl_locked_session_t *vls;
int rv;
@@ -1324,7 +1324,7 @@ vls_shutdown (vls_handle_t vlsh)
return VPPCOM_EBADFD;
vls_mt_guard (vls, VLS_MT_OP_SPOOL);
- rv = vppcom_session_shutdown (vls_to_sh (vls));
+ rv = vppcom_session_shutdown (vls_to_sh (vls), how);
vls_mt_unguard ();
vls_get_and_unlock (vlsh);