X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=vss.c;h=8ca37d435a40ce049b2ddfa0875325e41b4d61c9;hp=89e06c92beb5b934b567cc48b93a91081d433931;hb=53a27fb91166a7734f0768721b2cef91f0f6172e;hpb=c8862b9e246b4ef6ff1fe103946e18cf2537ecde diff --git a/vss.c b/vss.c index 89e06c92..8ca37d43 100644 --- a/vss.c +++ b/vss.c @@ -25,6 +25,7 @@ #include "net.h" #include "server.cmdline.h" #include "vss.h" +#include "list.h" #include "send.h" #include "ipc.h" #include "fd.h" @@ -362,7 +363,7 @@ static int recv_afs_msg(int *fd, uint32_t *code, uint32_t *data) return -ERRNO_TO_PARA_ERROR(errno); afsss = AFS_SOCKET_READY; if (iov.iov_len != sizeof(buf)) - return -E_SHORT_AFS_READ; + return -E_AFS_SHORT_READ; *code = *(uint32_t*)buf; *data = *(uint32_t*)(buf + 4); for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { @@ -383,6 +384,7 @@ static void recv_afs_result(void) struct stat statbuf; struct timeval now; + mmd->afd.afhi.chunk_table = NULL; ret = recv_afs_msg(&passed_fd, &afs_code, &afs_data); if (ret < 0) goto err; @@ -419,6 +421,7 @@ static void recv_afs_result(void) tv_add(&now, &announce_tv, &data_send_barrier); return; err: + free(mmd->afd.afhi.chunk_table); if (passed_fd >= 0) close(passed_fd); PARA_ERROR_LOG("%s\n", para_strerror(-ret)); @@ -498,8 +501,8 @@ void vss_send_chunk(void) } /* * We call the send function also in case of empty chunks as they - * might have still some data queued which can be sent in this case. - */ + * might have still some data queued which can be sent in this case. + */ if (!mmd->chunks_sent) { struct timeval tmp; gettimeofday(&mmd->stream_start, NULL);