From 0181b600a6deb66a346dbcbe8300cf9e2467ebbb Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Tue, 19 May 2020 06:53:59 -0400 Subject: pkt-line: define PACKET_READ_RESPONSE_END In a future commit, we will use PACKET_READ_RESPONSE_END to separate messages proxied by remote-curl. To prepare for this, add the PACKET_READ_RESPONSE_END enum value. In switch statements that need a case added, die() or BUG() when a PACKET_READ_RESPONSE_END is unexpected. Otherwise, mirror how PACKET_READ_DELIM is implemented (especially in cases where packets are being forwarded). Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- remote-curl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'remote-curl.c') diff --git a/remote-curl.c b/remote-curl.c index e020140092..d02cb547e9 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -601,6 +601,8 @@ static int rpc_read_from_out(struct rpc_state *rpc, int options, case PACKET_READ_FLUSH: memcpy(buf - 4, "0000", 4); break; + case PACKET_READ_RESPONSE_END: + die(_("remote server sent stateless separator")); } } -- cgit v1.2.3