diff options
author | bustico | 2008-03-21 09:03:34 +0000 |
---|---|---|
committer | bustico | 2008-03-21 09:03:34 +0000 |
commit | 6ca781b8a38474ab428d5fcb3b489dfe3e974334 (patch) | |
tree | 8c8725c88c3fd031d632a9f2b1f7376d1cb3c75b /src/ivybuffer.c | |
parent | 50236114f04a0050625bedee7c4c02b36b1213ae (diff) | |
download | ivy-c-6ca781b8a38474ab428d5fcb3b489dfe3e974334.zip ivy-c-6ca781b8a38474ab428d5fcb3b489dfe3e974334.tar.gz ivy-c-6ca781b8a38474ab428d5fcb3b489dfe3e974334.tar.bz2 ivy-c-6ca781b8a38474ab428d5fcb3b489dfe3e974334.tar.xz |
- numerous fixes
- socket in non blocking mode (resolve some deadlock, and agent are immune to another agent beeing blocked)
Diffstat (limited to 'src/ivybuffer.c')
-rw-r--r-- | src/ivybuffer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ivybuffer.c b/src/ivybuffer.c index 7228f55..9504bbf 100644 --- a/src/ivybuffer.c +++ b/src/ivybuffer.c @@ -23,10 +23,9 @@ #include <stdarg.h> #include <string.h> +#include "param.h" #include "ivybuffer.h" -#define BUFFER_SIZE 4096 /* taille buffer initiale on multiple par deux a chaque realloc */ - /* fonction de formtage a la printf d'un buffer avec reallocation dynamique */ int make_message(IvyBuffer* buffer, const char *fmt, va_list ap) { @@ -35,9 +34,9 @@ int make_message(IvyBuffer* buffer, const char *fmt, va_list ap) va_list ap_copy; if ( buffer->size == 0 || buffer->data == NULL ) { - buffer->size = BUFFER_SIZE; + buffer->size = IVY_BUFFER_SIZE; buffer->offset = 0; - buffer->data = malloc (BUFFER_SIZE); + buffer->data = malloc (IVY_BUFFER_SIZE); if ( buffer->data == NULL ) { perror(" Ivy make message MALLOC error: " ); |