[Freeswitch-svn] [commit] r3916 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Sat Jan 6 11:40:46 EST 2007
Author: anthm
Date: Sat Jan 6 11:40:46 2007
New Revision: 3916
Modified:
freeswitch/trunk/src/switch_console.c
Log:
tweak
Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c (original)
+++ freeswitch/trunk/src/switch_console.c Sat Jan 6 11:40:46 2007
@@ -64,16 +64,13 @@
if ((remaining < need) && handle->alloc_len) {
switch_size_t new_len;
-
- if (need < handle->alloc_chunk) {
- need = handle->alloc_chunk;
- }
+ void *new_data;
- new_len = handle->data_size + need;
- if ((handle->data = realloc(handle->data, new_len))) {
+ new_len = handle->data_size + need + handle->alloc_chunk;
+ if ((new_data = realloc(handle->data, new_len))) {
handle->data_size = handle->alloc_len = new_len;
+ handle->data = new_data;
buf = handle->data;
-
remaining = handle->data_size - handle->data_len;
handle->end = (uint8_t *)(handle->data) + handle->data_len;
end = handle->end;
More information about the Freeswitch-svn
mailing list