Diff
Modified: freeswitch/trunk/libs/freetdm/src/ftdm_io.c (17225 => 17226)
--- freeswitch/trunk/libs/freetdm/src/ftdm_io.c 2010-04-06 01:07:45 UTC (rev 17225)
+++ freeswitch/trunk/libs/freetdm/src/ftdm_io.c 2010-04-06 16:04:46 UTC (rev 17226)
@@ -660,10 +660,10 @@
#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 */
Modified: freeswitch/trunk/libs/freetdm/src/ftdm_threadmutex.c (17225 => 17226)
--- freeswitch/trunk/libs/freetdm/src/ftdm_threadmutex.c 2010-04-06 01:07:45 UTC (rev 17225)
+++ freeswitch/trunk/libs/freetdm/src/ftdm_threadmutex.c 2010-04-06 16:04:46 UTC (rev 17226)
@@ -258,8 +258,8 @@
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 @@
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);
Modified: freeswitch/trunk/libs/freetdm/src/include/freetdm.h (17225 => 17226)
--- freeswitch/trunk/libs/freetdm/src/include/freetdm.h 2010-04-06 01:07:45 UTC (rev 17225)
+++ freeswitch/trunk/libs/freetdm/src/include/freetdm.h 2010-04-06 16:04:46 UTC (rev 17226)
@@ -605,8 +605,8 @@
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;
};
Modified: freeswitch/trunk/libs/freetdm/src/include/ftdm_types.h (17225 => 17226)
--- freeswitch/trunk/libs/freetdm/src/include/ftdm_types.h 2010-04-06 01:07:45 UTC (rev 17225)
+++ freeswitch/trunk/libs/freetdm/src/include/ftdm_types.h 2010-04-06 16:04:46 UTC (rev 17226)
@@ -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 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>