pkt-line: move LARGE_PACKET_MAX definition from sideband
Having the packet sizes defined near the packet read/write functions makes more sense. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Feb 20, 2013 at 15:02 UTC
047ec60205b5ae8b180386579749d143db4c9be3
3 files changed
+4
-3
http.c
+1
@@ -5,6 +5,7 @@
5
#include "url.h"
6
#include "credential.h"
7
#include "version.h"
8
+#include "pkt-line.h"
9
10
int active_requests;
11
int http_is_verbose;
pkt-line.h
+3
@@ -58,6 +58,9 @@ int packet_read(int fd, char *buffer, unsigned size, int options);
58
*/
59
int packet_read_line(int fd, char *buffer, unsigned size);
60
61
+#define DEFAULT_PACKET_MAX 1000
62
+#define LARGE_PACKET_MAX 65520
63
+
64
int packet_get_line(struct strbuf *out, char **src_buf, size_t *src_len);
65
66
#endif
sideband.h
-3
@@ -4,9 +4,6 @@
4
#define SIDEBAND_PROTOCOL_ERROR -2
5
#define SIDEBAND_REMOTE_ERROR -1
6
7
-#define DEFAULT_PACKET_MAX 1000
8
-#define LARGE_PACKET_MAX 65520
9
-
7
int recv_sideband(const char *me, int in_stream, int out);
8
ssize_t send_sideband(int fd, int band, const char *data, ssize_t sz, int packet_max);
9