summaryrefslogtreecommitdiffstats
path: root/sockutil.c
diff options
context:
space:
mode:
authorNate Straz <nstraz@redhat.com>2006-02-24 22:05:05 +0000
committerNathan Straz <nstraz@redhat.com>2008-09-23 09:37:46 -0400
commit6900e561ff2b0f63ab3b59498d403a80865c1ac6 (patch)
treefd5d78a30a4720ca97697a1fbf4de5faf233bf5f /sockutil.c
parentb4f6606bb43e42fa741565138cb9049c2081030a (diff)
downloadqarsh-6900e561ff2b0f63ab3b59498d403a80865c1ac6.tar.gz
qarsh-6900e561ff2b0f63ab3b59498d403a80865c1ac6.tar.xz
qarsh-6900e561ff2b0f63ab3b59498d403a80865c1ac6.zip
Use the same size buffer for holding the send packet as the receive packet.
Diffstat (limited to 'sockutil.c')
-rw-r--r--sockutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sockutil.c b/sockutil.c
index a571d64..68a207d 100644
--- a/sockutil.c
+++ b/sockutil.c
@@ -125,8 +125,8 @@ send_packet(int fd, struct qa_packet *qp)
int packetsize;
ssize_t ret;
- packetbuf = malloc(1024);
- memset(packetbuf, 0, 1024);
+ packetbuf = malloc(QARSH_MAX_PACKET_SIZE);
+ memset(packetbuf, 0, QARSH_MAX_PACKET_SIZE);
packetbuf = qptostr(qp, &packetbuf, &packetsize);
ret = write(fd, packetbuf, packetsize);