]> git.proxmox.com Git - libgit2.git/commitdiff
Minor error fixes
authorCarlos Martín Nieto <carlos@cmartin.tk>
Tue, 8 May 2012 12:28:21 +0000 (14:28 +0200)
committerCarlos Martín Nieto <carlos@cmartin.tk>
Tue, 8 May 2012 12:28:21 +0000 (14:28 +0200)
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.

src/netops.c
src/pkt.c

index 057aff88706503e683c1a617cad80586d1251320..4d461a0491dd4e8e5e6cfe693e11b6ba6de3dbd3 100644 (file)
@@ -35,7 +35,7 @@ static void net_set_error(const char *str)
        size = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                             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);
 }
 #else
index 00836bc34ed63c49cdacd385317624dc0ccb94c8..b9c87f169cbc431f12460d6bfff693190661088a 100644 (file)
--- a/src/pkt.c
+++ b/src/pkt.c
@@ -217,6 +217,7 @@ int git_pkt_parse_line(
                 * server is trying to send us the packfile already.
                 */
                if (bufflen >= 4 && !git__prefixcmp(line, "PACK")) {
+                       giterr_clear();
                        *out = line;
                        return pack_pkt(head);
                }