Various little cleanups in spandsp

This commit is contained in:
Steve Underwood
2015-06-18 21:15:41 +08:00
parent 33c723e839
commit 0eada8dc77
26 changed files with 191 additions and 88 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
+1 -1
View File
@@ -23,7 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
+1 -1
View File
@@ -23,7 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
+1 -1
View File
@@ -23,7 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
+1 -1
View File
@@ -61,7 +61,7 @@
struct iphdr
{
#ifdef _HPUX_LI
#if defined(_HPUX_LI)
unsigned int ihl:4;
unsigned int version:4;
#else
+2 -2
View File
@@ -95,7 +95,7 @@ int socket_harness_run(socket_harness_state_t *s)
{
//if (s->modem->event)
// modem_event(s->modem);
#ifdef SIMULATE_RING
#if defined(SIMULATE_RING)
tmo.tv_sec = 0;
tmo.tv_usec= 1000000/RING_HZ;
#else
@@ -135,7 +135,7 @@ int socket_harness_run(socket_harness_state_t *s)
if (ret == 0)
{
/* Timeout */
#ifdef SIMULATE_RING
#if defined(SIMULATE_RING)
if (!modem->modem->started)
{
rcount++;
+1 -1
View File
@@ -222,7 +222,7 @@ int write_file(meta_t *meta, int page, const uint8_t buf[])
TIFFSetField(tif, TIFFTAG_MAKE, "soft-switch.org");
TIFFSetField(tif, TIFFTAG_MODEL, "spandsp");
TIFFSetField(tif, TIFFTAG_HOSTCOMPUTER, "i7.coppice.org");
#if defined(SPANDSP_SUPPORT_TIFF_FX) && defined(HAVE_TIF_DIR_H)
#if defined(SPANDSP_SUPPORT_TIFF_FX)
/* Make space for this to be filled in later */
TIFFSetField(tif, TIFFTAG_GLOBALPARAMETERSIFD, 0);
#endif
+6
View File
@@ -237,6 +237,12 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
{
if ((stat = decode_length(buf, len, &ptr, &count)) < 0)
return -1;
if ((total_count + count) >= 16)
{
/* There is too much stuff here to be real, and it would overflow the bufs array
if we continue */
return -1;
}
for (i = 0; i < count; i++)
{
if (decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i]) != 0)
+2 -2
View File
@@ -8905,13 +8905,13 @@ int main(int argc, char *argv[])
break;
}
}
argc -= optind;
argv += optind;
if (decode_test_file)
{
decode_test_data_file(test_standard, decode_test_file);
exit(0);
}
argc -= optind;
argv += optind;
if (argc > 0)
match = argv[0];