summaryrefslogtreecommitdiff
path: root/examples/network
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-07-24 14:23:16 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-07-30 20:25:10 +0200
commit64d01de8a7802ebec031f921496747bf09426df1 (patch)
tree92827c074298b1a21c50f72d43a99a573b1c720b /examples/network
parent50364dd892ae6726ff34e1842711e29d0f20c51d (diff)
downloadlibgit2-64d01de8a7802ebec031f921496747bf09426df1.tar.gz
remote: start moving the protocol to a common area
For the transition, http is going to keep its own logic until the git/common code catches up with the implied multi_ack that http has. This also has the side-effect of making the code cleaner and more correct regardingt he protocol.
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/fetch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/network/fetch.c b/examples/network/fetch.c
index 73bfbddd0..157f91423 100644
--- a/examples/network/fetch.c
+++ b/examples/network/fetch.c
@@ -99,6 +99,9 @@ int fetch(git_repository *repo, int argc, char **argv)
printf("\rReceived %d/%d objects in %d bytes", stats.processed, stats.total, bytes);
} while (!data.finished);
+ if (data.ret < 0)
+ goto on_error;
+
printf("\rReceived %d/%d objects in %d bytes\n", stats.processed, stats.total, bytes);
// Disconnect the underlying connection to prevent from idling.