]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm type fixes
authorMoises Silva <moy@sangoma.com>
Tue, 6 Apr 2010 16:04:46 +0000 (12:04 -0400)
committerMoises Silva <moy@sangoma.com>
Tue, 6 Apr 2010 16:04:46 +0000 (12:04 -0400)
libs/freetdm/src/ftdm_io.c
libs/freetdm/src/ftdm_threadmutex.c
libs/freetdm/src/include/freetdm.h
libs/freetdm/src/include/ftdm_types.h

index 82301c0a5ca33cc0191e242c7aa497d654d75d7c..ef58eba7db6d39cdbd553ce6a0464c11ed77a701 100644 (file)
@@ -660,10 +660,10 @@ FT_DECLARE(ftdm_status_t) ftdm_span_load_tones(ftdm_span_t *span, const char *ma
 
 #define FTDM_SLINEAR_MAX_VALUE 32767
 #define FTDM_SLINEAR_MIN_VALUE -32767
-static void reset_gain_table(unsigned char *gain_table, float new_gain, ftdm_codec_t codec_gain)
+static void reset_gain_table(uint8_t *gain_table, float new_gain, ftdm_codec_t codec_gain)
 {
        /* sample value */
-       unsigned char sv = 0;
+       uint8_t sv = 0;
        /* linear gain factor */
        float lingain = 0;
        /* linear value for each table sample */
index 34c802b1defdcf3b99230ad1ba93d706cc384671..8e9c62ff4c9e98fcf80b93ecab34cc13f10f928b 100644 (file)
@@ -258,8 +258,8 @@ FT_DECLARE(ftdm_status_t) ftdm_interrupt_create(ftdm_interrupt_t **ininterrupt,
 
        interrupt->device = device;
 #ifdef WIN32
-       interrupt->interrupt = CreateEvent(NULL, FALSE, FALSE, NULL);
-       if (!interrupt->interrupt) {
+       interrupt->event = CreateEvent(NULL, FALSE, FALSE, NULL);
+       if (!interrupt->event) {
                ftdm_log(FTDM_LOG_ERROR, "Failed to allocate interrupt event\n");
                goto failed;
        }
@@ -386,7 +386,7 @@ FT_DECLARE(ftdm_status_t) ftdm_interrupt_destroy(ftdm_interrupt_t **ininterrupt)
        ftdm_assert_return(ininterrupt != NULL, FTDM_FAIL, "Interrupt null when destroying!\n");
        interrupt = *ininterrupt;
 #ifdef WIN32
-       CloseHandle(interrupt->interrupt);
+       CloseHandle(interrupt->event);
 #else
        close(interrupt->readfd);
        close(interrupt->writefd);
index 0b8b43dbf8f7947c07d4fbdd24c950873ed3587a..dcf171b3d73711622bc058a307914e8b2578853b 100644 (file)
@@ -605,8 +605,8 @@ struct ftdm_channel {
        ftdm_hash_t *variable_hash;
        unsigned char rx_cas_bits;
        uint32_t pre_buffer_size;
-       unsigned char rxgain_table[FTDM_GAINS_TABLE_SIZE];
-       unsigned char txgain_table[FTDM_GAINS_TABLE_SIZE];
+       uint8_t rxgain_table[FTDM_GAINS_TABLE_SIZE];
+       uint8_t txgain_table[FTDM_GAINS_TABLE_SIZE];
        float rxgain;
        float txgain;
 };
index cf12bc9a2c254a4ae849fcd11a702720f9869945..a13179e856d6264c1be701b37e70923e7735e344 100644 (file)
@@ -40,8 +40,8 @@
 #define FTDM_TYPES_H
 #include "fsk.h"
 
-#define FTDM_INVALID_SOCKET -1
 #ifdef WIN32
+#define FTDM_INVALID_SOCKET INVALID_HANDLE_VALUE
 #include <windows.h>
 typedef HANDLE ftdm_socket_t;
 typedef unsigned __int64 uint64_t;
@@ -55,6 +55,7 @@ typedef __int8 int8_t;
 typedef intptr_t ftdm_ssize_t;
 typedef int ftdm_filehandle_t;
 #else
+#define FTDM_INVALID_SOCKET -1
 #include <stdint.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>