summaryrefslogtreecommitdiff
path: root/src/protocol.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-04-30 13:32:09 -0700
committerRussell Belfer <rb@github.com>2012-04-30 13:32:09 -0700
commit0dc8e95e1940017a9d6e8f5b13cf9a9ad644fc08 (patch)
tree49eed9a80b9e506953d18271bd03ae23558f29da /src/protocol.c
parent8b9ec201edf157f84735b8d220c10edafd9f4b5a (diff)
parent2de0652bb6d719eb937656153a920f20342bd5a4 (diff)
downloadlibgit2-0dc8e95e1940017a9d6e8f5b13cf9a9ad644fc08.tar.gz
Merge pull request #652 from nulltoken/topic/diff-callbacks
diff: provide more context to the consumer of the callbacks
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol.c b/src/protocol.c
index 4c4a7f79b..a7df961a9 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -17,7 +17,7 @@ int git_protocol_store_refs(git_protocol *p, const char *data, size_t len)
const char *line_end, *ptr;
if (len == 0) { /* EOF */
- if (buf->size != 0) {
+ if (git_buf_len(buf) != 0) {
giterr_set(GITERR_NET, "Unexpected EOF");
return p->error = -1;
} else {
@@ -30,10 +30,10 @@ int git_protocol_store_refs(git_protocol *p, const char *data, size_t len)
while (1) {
git_pkt *pkt;
- if (buf->size == 0)
+ if (git_buf_len(buf) == 0)
return 0;
- error = git_pkt_parse_line(&pkt, ptr, &line_end, buf->size);
+ error = git_pkt_parse_line(&pkt, ptr, &line_end, git_buf_len(buf));
if (error == GIT_ESHORTBUFFER)
return 0; /* Ask for more */
if (error < 0)