提交 83543a24 编写于 作者: J Junio C Hamano

daemon: do not die on older clients.

In the older times, the clients did not say which host they were trying
to connect, and the code we recently added did not quite handle the
older clients correctly.

Noticed by Simon Arlott.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 67aef034
......@@ -450,6 +450,8 @@ void fill_in_extra_table_entries(struct interp *itable)
* Replace literal host with lowercase-ized hostname.
*/
hp = interp_table[INTERP_SLOT_HOST].value;
if (!hp)
return;
for ( ; *hp; hp++)
*hp = tolower(*hp);
......@@ -544,8 +546,10 @@ static int execute(struct sockaddr *addr)
loginfo("Extended attributes (%d bytes) exist <%.*s>",
(int) pktlen - len,
(int) pktlen - len, line + len + 1);
if (len && line[len-1] == '\n')
if (len && line[len-1] == '\n') {
line[--len] = 0;
pktlen--;
}
/*
* Initialize the path interpolation table for this connection.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册