-/*
- * Copyright (C) 2012-2013 Andre Noll <maan@systemlinux.org>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2012 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
/** \file sideband.c Implementation of the sideband API. */
#include <regex.h>
-#include <sys/uio.h>
#include "para.h"
#include "error.h"
struct sb_context *sb_new_recv(size_t max_size, sb_transformation t,
void *trafo_context)
{
- struct sb_context *c = para_calloc(sizeof(*c));
+ struct sb_context *c = zalloc(sizeof(*c));
c->max_size = max_size;
c->trafo = t;
struct sb_context *sb_new_send(struct sb_buffer *sbb, bool dont_free,
sb_transformation t, void *trafo_context)
{
- struct sb_context *c = para_calloc(sizeof(*c));
+ struct sb_context *c = zalloc(sizeof(*c));
struct iovec src, dst, *srcp, *dstp;
assert(sbb);
*/
if (sbb->iov.iov_len == (size_t)-1)
return -E_SB_PACKET_SIZE;
- sbb->iov.iov_base = para_malloc(sbb->iov.iov_len + 1);
+ sbb->iov.iov_base = alloc(sbb->iov.iov_len + 1);
return 0; /* ready to read body */
success:
*result = c->sbb;