Commit 65ca81a6 by Carlos Martín Nieto

Minor error fixes

Clear the error in pkt when we notice that the remote is starting to
send the packfile.

Fix the format string for Windows networking errors.
parent 8d89c8e9
...@@ -35,7 +35,7 @@ static void net_set_error(const char *str) ...@@ -35,7 +35,7 @@ static void net_set_error(const char *str)
size = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, size = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
0, error, 0, (LPSTR)&err_str, 0, 0); 0, error, 0, (LPSTR)&err_str, 0, 0);
giterr_set(GITERR_NET, "%s: $s", str, err_str); giterr_set(GITERR_NET, "%s: %s", str, err_str);
LocalFree(err_str); LocalFree(err_str);
} }
#else #else
......
...@@ -217,6 +217,7 @@ int git_pkt_parse_line( ...@@ -217,6 +217,7 @@ int git_pkt_parse_line(
* server is trying to send us the packfile already. * server is trying to send us the packfile already.
*/ */
if (bufflen >= 4 && !git__prefixcmp(line, "PACK")) { if (bufflen >= 4 && !git__prefixcmp(line, "PACK")) {
giterr_clear();
*out = line; *out = line;
return pack_pkt(head); return pack_pkt(head);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment