aboutsummaryrefslogtreecommitdiff
path: root/src/util/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/bio.c')
-rw-r--r--src/util/bio.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/util/bio.c b/src/util/bio.c
index 0a1c213f3..2514a266f 100644
--- a/src/util/bio.c
+++ b/src/util/bio.c
@@ -30,7 +30,7 @@
30 30
31/** 31/**
32 * Size for I/O buffers. 32 * Size for I/O buffers.
33 */ 33 */
34#define BIO_BUFFER_SIZE 65536 34#define BIO_BUFFER_SIZE 65536
35 35
36/** 36/**
@@ -135,7 +135,7 @@ GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h,
135 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 135 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
136 */ 136 */
137int 137int
138GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, 138GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
139 const char *what, 139 const char *what,
140 void *result, size_t len) 140 void *result, size_t len)
141{ 141{
@@ -175,7 +175,7 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
175 if (0 == ret) 175 if (0 == ret)
176 { 176 {
177 GNUNET_asprintf (&h->emsg, 177 GNUNET_asprintf (&h->emsg,
178 _("Error reading `%s': %s"), 178 _("Error reading `%s': %s"),
179 what, 179 what,
180 _("End of file")); 180 _("End of file"));
181 return GNUNET_SYSERR; 181 return GNUNET_SYSERR;
@@ -199,10 +199,10 @@ GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
199 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 199 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
200 */ 200 */
201int 201int
202GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, 202GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
203 const char *file, 203 const char *file,
204 int line, 204 int line,
205 void *result, 205 void *result,
206 size_t len) 206 size_t len)
207{ 207{
208 char what[1024]; 208 char what[1024];
@@ -225,7 +225,7 @@ GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
225int 225int
226GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, 226GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
227 const char *what, 227 const char *what,
228 char **result, 228 char **result,
229 size_t max_length) 229 size_t max_length)
230{ 230{
231 char *buf; 231 char *buf;
@@ -272,7 +272,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
272 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 272 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
273 */ 273 */
274int 274int
275GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, 275GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
276 const char *what, 276 const char *what,
277 struct GNUNET_CONTAINER_MetaData **result) 277 struct GNUNET_CONTAINER_MetaData **result)
278{ 278{
@@ -345,9 +345,9 @@ GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
345 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 345 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
346 */ 346 */
347int 347int
348GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, 348GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h,
349 const char *file, 349 const char *file,
350 int line, 350 int line,
351 int64_t *i) 351 int64_t *i)
352{ 352{
353 int64_t big; 353 int64_t big;
@@ -368,7 +368,7 @@ struct GNUNET_BIO_WriteHandle
368 * Underlying file handle. 368 * Underlying file handle.
369 */ 369 */
370 struct GNUNET_DISK_FileHandle *fd; 370 struct GNUNET_DISK_FileHandle *fd;
371 371
372 /** 372 /**
373 * I/O buffer. Do not free, allocated at the end of the struct. 373 * I/O buffer. Do not free, allocated at the end of the struct.
374 */ 374 */
@@ -504,7 +504,7 @@ GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
504 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 504 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
505 */ 505 */
506int 506int
507GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, 507GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h,
508 const char *s) 508 const char *s)
509{ 509{
510 uint32_t slen; 510 uint32_t slen;
@@ -562,7 +562,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
562 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 562 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
563 */ 563 */
564int 564int
565GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, 565GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h,
566 int32_t i) 566 int32_t i)
567{ 567{
568 int32_t big; 568 int32_t big;
@@ -580,7 +580,7 @@ GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h,
580 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 580 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
581 */ 581 */
582int 582int
583GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, 583GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h,
584 int64_t i) 584 int64_t i)
585{ 585{
586 int64_t big; 586 int64_t big;