diff options
| author | Russell Belfer <rb@github.com> | 2012-04-30 13:32:09 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-04-30 13:32:09 -0700 |
| commit | 0dc8e95e1940017a9d6e8f5b13cf9a9ad644fc08 (patch) | |
| tree | 49eed9a80b9e506953d18271bd03ae23558f29da /src/protocol.c | |
| parent | 8b9ec201edf157f84735b8d220c10edafd9f4b5a (diff) | |
| parent | 2de0652bb6d719eb937656153a920f20342bd5a4 (diff) | |
| download | libgit2-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.c | 6 |
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) |
