windows build, add missing files.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@14 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-05-17 15:08:37 +00:00
parent f0b32746aa
commit 719bc15057
3 changed files with 41 additions and 5 deletions

View File

@ -164,10 +164,22 @@
RelativePath=".\src\hashtable_itr.c"
>
</File>
<File
RelativePath=".\src\libteletone_detect.c"
>
</File>
<File
RelativePath=".\src\libteletone_generate.c"
>
</File>
<File
RelativePath=".\src\openzap.c"
>
</File>
<File
RelativePath=".\src\zap_buffer.c"
>
</File>
<File
RelativePath=".\src\zap_config.c"
>
@ -208,6 +220,10 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\src\include\g711.h"
>
</File>
<File
RelativePath=".\src\include\hashtable.h"
>
@ -220,10 +236,26 @@
RelativePath=".\src\include\hashtable_private.h"
>
</File>
<File
RelativePath=".\src\include\libteletone.h"
>
</File>
<File
RelativePath=".\src\include\libteletone_detect.h"
>
</File>
<File
RelativePath=".\src\include\libteletone_generate.h"
>
</File>
<File
RelativePath=".\src\include\openzap.h"
>
</File>
<File
RelativePath=".\src\include\zap_buffer.h"
>
</File>
<File
RelativePath=".\src\include\zap_config.h"
>

View File

@ -74,9 +74,10 @@ static char *cut_path(char *in)
static void null_logger(char *file, const char *func, int line, int level, char *fmt, ...)
{
if (0) {
null_logger(file, func, line, level, fmt);
if (file && func && line && level && fmt) {
return;
}
return;
}
static void default_logger(char *file, const char *func, int line, int level, char *fmt, ...)

View File

@ -53,11 +53,13 @@ zap_status_t zap_buffer_create(zap_buffer_t **buffer, zap_size_t blocksize, zap_
{
zap_buffer_t *new_buffer;
if ((new_buffer = malloc(sizeof(*new_buffer)))) {
new_buffer = malloc(sizeof(*new_buffer));
if (new_buffer) {
memset(new_buffer, 0, sizeof(*new_buffer));
if (start_len) {
if (!(new_buffer->data = malloc(start_len))) {
new_buffer->data = malloc(start_len);
if (!new_buffer->data) {
free(new_buffer);
return ZAP_MEMERR;
}
@ -211,7 +213,8 @@ zap_size_t zap_buffer_write(zap_buffer_t *buffer, const void *data, zap_size_t d
new_size = new_block_size;
}
buffer->head = buffer->data;
if (!(buffer->data = realloc(buffer->data, new_size))) {
buffer->data = realloc(buffer->data, new_size);
if (!buffer->data) {
return 0;
}
buffer->head = buffer->data;