Commit Graph

6641 Commits

Author SHA1 Message Date
Jeff Lenk f37467e054 FS-5507 this should fix but I'm not sure its the proper thing 2013-06-17 08:51:56 -05:00
Anthony Minessale 9a87ec6a52 disable dialog matching for subscribe reqs so it always uses a new handle to avoid conflicting with notify transactions
Conflicts:
	libs/sofia-sip/.update
2013-06-12 23:48:39 -05:00
Anthony Minessale 4240526ce3 add some device-state mechinism to FS to allow tracking of device-specific states where they may have more than one call from the same device 2013-06-05 11:20:11 -05:00
Brian West b4ed2f55bf Up this buffer to prevent boxes from locking up if they receive more than 1000 bytes. 2013-06-04 17:10:05 -05:00
Jeff Lenk 6739889f65 OPENZAP-214 --resolve 2013-06-03 17:27:04 -05:00
Stefan Knoblich 6ca5a02656 FreeTDM: handle_core_command() clean up
Use uint64_t and FTDM_UINT64_FMT for flagval and "%u" for unsigned int.
Extend invalid channel id check to cover chan_id == 0 case.

Use ftdm_strlen_zero() and ftdm_array_len() instead of open-coding them.
Move some variables from global scope into local subcommand scope.

Various other little format string and variable naming fixes.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-02 03:02:14 +02:00
Stefan Knoblich 23c2c751bd FreeTDM: Move I/O interface lookup code into common ftdm_global_get_io_interface()
Auto-loading can be toggled by setting the new autoload parameter
to FTDM_FALSE/FTDM_TRUE.

Update ftdm_span_create() and ftdm_api_execute() to use the new code.

NOTE: Auto-loading of missing I/O interfaces remains enabled in both cases,
      but I guess we should disable it for ftdm_api_execute().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-02 02:56:44 +02:00
Stefan Knoblich 85e2eaaf58 FreeTDM: Fix "ftdm core flags/spanflags" with flag names
"x >> 1" is _NOT_ the reverse of "1 << x"...

Use code from Sean Eron Andersen's "Bit Twiddling Hacks"
(=> http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog)
to compute the log2 value (= position in the enum) of the bitflag.

This preserves the current behaviour, which is rather odd because
it is based on the position of the value in the enum, not its
actual (bit flag) value.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-01 22:30:45 +02:00
Stefan Knoblich e857527a3b FreeTDM: Rewrite "ftdm core" print_* functions (to use new span iterator)
Simplify code by using shared string constants using bool (0/1) index,
!!-operator and negation-via-XOR.

Future optimization: Preallocate and re-use of iterators, to avoid
repeatedly allocating and freeing of memory.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-01 22:19:16 +02:00
Stefan Knoblich 5154bd847b ftmod_libpri: Fix channel iterator memory leak
Keep the original iterator around to be able to actually free it
after use.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-01 21:09:48 +02:00
Stefan Knoblich 4bc05eae68 FreeTDM: Add span iterator
Part of my ongoing effort to split ftdm_io.c into more manageable pieces.

This change (along with others in the future) allows decoupling of the
span registry and its users, in preparation of moving all span related
functions and data structures into ftdm_span.c.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-01 15:20:51 +02:00
Stefan Knoblich 9da0183352 FreeTDM: Remove unused local 'interfaces' variable
Zero-filled, but never used otherwise (and static), drop it.

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2013-05-31 19:26:36 +02:00
Steve Underwood 88587ec03b Minor tweaks from cleaning up spandsp 2013-06-01 01:05:08 +08:00
Brian West a55d70ed62 add kirk wireless servers to safe as they do not do rport 2013-05-31 11:54:05 -05:00
Jeff Lenk 24c13adfaf FS-5483 --resolve 2013-05-29 09:32:24 -05:00
Steve Underwood 4fba20c787 Something stupid that way went 2013-05-29 17:00:57 +08:00
Steve Underwood 3ea625c6ae More movement towards colour FAXing 2013-05-29 14:47:48 +08:00
Steve Underwood 3519e0f4c3 More tweaks towards colour FAXing 2013-05-29 10:07:08 +08:00
Steve Underwood 3b595efc60 More tweaks towards colour FAXing 2013-05-29 09:53:56 +08:00
Steve Underwood 0b6c53217a Moves towards colour FAX 2013-05-29 09:31:58 +08:00
Travis Cross d7b139f3b4 Avoid dereferencing potential null value 2013-05-28 03:55:48 +00:00
Travis Cross 3217442d0e Remove assignment without effect 2013-05-28 03:46:53 +00:00
Travis Cross e887cecb5e Avoid dereferencing potential null value 2013-05-28 03:41:44 +00:00
Travis Cross 2dea51ad58 Handle potential malloc failure better 2013-05-28 03:40:58 +00:00
Travis Cross ef13a63447 Fix unlikely memory leak in ESL 2013-05-28 03:01:49 +00:00
Travis Cross a5397e5980 Remove assignment without effect in fs_cli 2013-05-27 21:07:56 +00:00
Travis Cross f00b77597f Avoid dangling reference at end of fs_cli
Not that it really matters since we're returning to the OS momentarily
at that point anyway.
2013-05-27 21:07:52 +00:00
Jeff Lenk 757b792324 FS-5479 --resolve 2013-05-27 09:21:43 -05:00
Jeff Lenk d21b960899 fix unused parameter warning on windows 2013-05-27 09:18:56 -05:00
Travis Cross b30dde34ec Remove self-assignment without any effect
clang:

  error: explicitly assigning a variable of type 'uint16_t' (aka 'unsigned short') to itself [-Werror,-Wself-assign]
2013-05-27 06:09:06 +00:00
Travis Cross 8c37db140e Handle a failure of strerror_r
This fixes the build on gcc-4.7.3.  The build was breaking with:

  error: ignoring return value of 'strerror_r', declared with attribute warn_unused_result [-Werror=unused-result]
2013-05-25 19:05:34 +00:00
Travis Cross 6d5018007b Add missing text editor local variable blocks 2013-05-25 19:05:34 +00:00
Stefan Knoblich cb9090dc93 esl: Don't abort the esl_listen() loop(s) if accept() returns with errno == EINTR
ivrd doesn't use sigaction + SA_RESTART for SIGCHILD. An exiting
child process will interrupt accept() in the parent to handle
the signal, which makes accept() return -1 (errno = EINTR) after
the sighandler function returns.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-23 02:07:55 +02:00
Stefan Knoblich ca1d407921 ivrd: fflush() stdout before entering esl_listen()
Fixes repeatedly printing the 'Starting forking listener' message,
if stdout has been redirected into a logfile (for example).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-23 02:05:25 +02:00
Stefan Knoblich 8019af49a4 ftmod_libpri: Fix possible NULL-ptr dereference crash in on_restart(_ack)()
Catch single channel RESTART/RESTART ACK events for non-B-channels,
that would lead to a NULL pointer dereference, because those do not have
per-channel private data (chan->call_data = chan_priv == NULL).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-21 17:50:54 +02:00
William King b4209ca93b Theoretical memory leak where if attr_init failed, then check would have still been malloc'd but not used. 2013-05-18 20:42:03 -07:00
William King e2ea6e58c8 Minor code cleanup. calling va_start without calling va_end doesn't leak does it? Either way, it's fixed now. 2013-05-18 20:15:55 -07:00
Steve Underwood 37d109b107 Some tweaks to the image translate code 2013-05-16 02:28:20 +08:00
Anthony Minessale 75c3b8b83e FS-5325 force rebuild 2013-05-14 07:44:34 -05:00
Jeff Lenk d466316ace FS-5325 windows compile 2013-05-10 17:31:01 -05:00
Anthony Minessale 5761624f5a FS-5325 2013-05-10 12:55:26 -05:00
Jeff Lenk b85c24df08 spandsp windows fix syntax for gettimeofday 2013-05-10 12:46:03 -05:00
Stefan Knoblich 39fb4544dd FreeTDM: ftmod_misdn uses clock_gettime() which is in librt, add a check
Fixes -Wl,-z,now / -Wl,-z,defs errors about undefined symbols.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
Stefan Knoblich 80a2b76620 FreeTDM: Make libpri pri_version() check -Wunused-but-set-variable safe
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
Stefan Knoblich 284ce5407b FreeTDM: Move external ftmod_* library dependencies to _LIBADD
Making the build -Wl,--as-needed safe.
Tested on Centos 5.x + Gentoo.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
Stefan Knoblich b793ccbe43 FreeTDM: Fix implicit conversion between enumeration types error
Full clang error message:

  error: implicit conversion from enumeration type 'ftdm_bool_t' to
  different enumeration type 'ftdm_status_t' [-Werror,-Wconversion]

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
Stefan Knoblich cbf22d8a32 FreeTDM: Silence -Wtautological-compare warnings emitted by clang
Fixes "warning: comparison of unsigned expression >= 0 is always true".

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:09 +02:00
Stefan Knoblich ae58a4c1ba FreeTDM: Use ftdm_unused_arg() to silence -Wunused-argument warnings
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:09 +02:00
Steve Underwood 46ec57c415 The gettimeofday() function spandsp provided for Windows apparently falls over
after 25 hours. I guess not many people are inserting header lines on FAX pages.
Hopefully this update fixes the problem.
2013-05-10 11:54:20 +08:00
Anthony Minessale 79230a5d8a FS-5325 i'll put the nonblocking in but I still think this is a problem with openssl, a short read is not there every single time you connect, When the lib is in full blocking mode it should be handling the complicated actions internally. As complicated as socket programming is, async ssl is even worse because it requires you to do your own buffering and attemps to read may fail waiting for you to write or vice-versa which should have been handled for us in the lib. non-interruptable syscalls are getting pretty outdated and not enabling it is much less complex than making every socket app on earth be non-blocking 2013-05-09 12:56:42 -05:00