/**
* Size for I/O buffers.
- */
+ */
#define BIO_BUFFER_SIZE 65536
/**
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
*/
int
-GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
+GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
const char *what,
void *result, size_t len)
{
if (0 == ret)
{
GNUNET_asprintf (&h->emsg,
- _("Error reading `%s': %s"),
+ _("Error reading `%s': %s"),
what,
_("End of file"));
return GNUNET_SYSERR;
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
*/
int
-GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
- const char *file,
+GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
+ const char *file,
int line,
- void *result,
+ void *result,
size_t len)
{
char what[1024];
int
GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
const char *what,
- char **result,
+ char **result,
size_t max_length)
{
char *buf;
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
*/
int
-GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
+GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
const char *what,
struct GNUNET_CONTAINER_MetaData **result)
{
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
-GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h,
+GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h,
const char *file,
- int line,
+ int line,
int64_t *i)
{
int64_t big;
* Underlying file handle.
*/
struct GNUNET_DISK_FileHandle *fd;
-
+
/**
* I/O buffer. Do not free, allocated at the end of the struct.
*/
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
-GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h,
+GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h,
const char *s)
{
uint32_t slen;
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
-GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h,
+GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h,
int32_t i)
{
int32_t big;
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
-GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h,
+GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h,
int64_t i)
{
int64_t big;