Travis Cross
a0e9ddf589
Convert esl_true and esl_false to functions
...
Prior to this commit, an expression such as:
esl_true("true") ? 42 : 0
...would return 1 rather than 42.
2014-06-04 12:00:31 +00:00
William King
7ce2009fad
Fix compiler warning about possibly uninitialized variable in libs/esl
2014-06-02 08:33:05 -07:00
Michael Jerris
e992c4c4d8
CID:1216560 Unchecked return value from ioctl
2014-06-02 14:11:07 +00:00
Anthony Minessale
dc671d9d82
fix name of fs_ivrd
2014-05-22 16:41:21 -04:00
Jeff Lenk
e6ac87f5f1
fixes for VS2010 code analysis - hope these are OK else-ware
2014-05-20 22:54:32 -05:00
Natanael Copa
317f4b1442
Fix building with musl libc
...
POSIX says poll.h and signal.h should not be prefixed with sys/ (ie
poll.h instead of sys/poll.h)
limits.h also defines a TZNAME_MAX so we change name of the define for
spandsp.
2014-05-02 11:20:36 -04:00
Travis Cross
2b1ae831d1
Remove some dead assignments in ESL
2014-05-02 03:57:07 +00:00
Michael Jerris
a1a397420e
fix leaked body in error case
2014-04-30 16:10:08 -04:00
Michael Jerris
ba6b9c5a11
ESL-91: --resolve bigger buffer for args
2014-04-21 13:33:47 -04:00
Brian West
bf093e9dc1
Dispatch will call you on register, and call you back if you hangup on next register
2014-04-17 20:35:57 -05:00
Brian West
8ce6198bf9
fix bug in dispatch
2014-04-17 20:19:39 -05:00
Travis Cross
f754057c2a
Avoid crash on event without content-type
...
If we received an event without a content-type header we were
dereferencing a null pointer leading to a seg fault.
Reported-by: Ico <ico@voip-io.org>
ESL-90 --resolve
2014-04-09 01:20:07 +00:00
Travis Cross
c6acddf928
Fix typo in comment
2014-04-08 23:17:12 +00:00
Brian West
7bc92a11af
ESL-89: fix install path and single_command require
2014-04-07 15:26:13 -05:00
Michael Jerris
d6fa81b4b7
ESL-89: --resolve add rubymod-install and add ability to use a ruby not in your path by setting RUBY env var
2014-04-07 15:27:30 -04:00
Travis Cross
fb7fa3d66a
Update gitignore
2014-04-05 07:57:05 +00:00
Travis Cross
180d081be4
Use buffered printers in fs_cli
...
Now that all output should end in a newline, we don't need to play
tricks with getting certain escape codes out ahead of buffered output.
This updates what we tried to do in commit
991b83d23c
.
This partially reverts commit
8056125077
.
2014-03-28 00:01:33 +00:00
Travis Cross
11f4628cae
Reenable the new EL_REFRESH mechanism
2014-03-27 23:09:06 +00:00
Travis Cross
59f80c9e4f
Handle bodies not ending in newlines w/EL_REFRESH
...
The issue is that sofia siptrace output doesn't end each line with a
newline. Instead it sends a separate newline afterward, which comes
in as a separate event body. With the new EL_REFRESH code in effect
the line is being cleared after the siptrace output has been written
but before that next newline comes in.
With our own refresh code this doesn't happen because of slight
differences in where the stdio buffers get flushed compared to where
the output of clear_line() ends up.
This is a bit of a clumsy workaround. But we'll fix it first, then
refactor.
2014-03-27 23:06:07 +00:00
Travis Cross
3bc51dfff9
Turn on the fancy fs_cli with a modern libedit
...
We turn ON the features with a newer libedit.
This fixes commit 4f54f912c3
.
2014-03-27 17:35:35 +00:00
Travis Cross
4f54f912c3
Add back terminal detection for old libedits
...
Using the system libedit means that libedit will again make absolute
movements on certain kinds of terminals. Older versions of libedit
without EL_PROMPT_ESC miscalculate the length of the prompt.
Combined, this results in the cursor ending up in the wrong place.
We knew this was a possibility when we moved to system libedit, and
we're OK with it. We certainly lived without this fancy prompt
feature for a long time.
This change puts back in place detection of the terminal type when
EL_PROMPT_ESC isn't available. On these older versions of libedit,
we'll only enable the fancy features when we know that libedit will
only make relative movements and not tickle the bug.
This partially reverts commit:
b9b77bd615
2014-03-27 17:19:55 +00:00
Travis Cross
dc093d179e
Drop use of libedit EL_REFRESH in fs_cli for now
...
Newer versions of libedit provide an EL_REFRESH mechanism for
redrawing the prompt. We had previously written our own code to
handle this. In theory handing this over to libedit should be better.
Unfortunately when using EL_REFRESH the output of sofia siptrace isn't
showing up. We're working on that, but for now we're just force own
our redrawing code to be used instead.
2014-03-27 12:20:43 +00:00
Ico
fa17059787
Fix memory leak when outbound socket is closed by server
...
ESL-88 --resolve
Signed-off-by: Travis Cross <tc@traviscross.com>
2014-03-26 01:36:48 +00:00
Brian West
c7bd862e9a
FS:353: correct #if check for libedit function capability
2014-03-24 16:18:03 -05:00
James Le Cuirot
8574988c3a
Completely unbundle libedit
...
FS-353
Signed-off-by: Travis Cross <tc@traviscross.com>
2014-03-24 12:39:59 +00:00
Brian West
719d37dbf8
first 1/2 of automake for esl phpmod
2014-03-21 16:01:35 -05:00
Brian West
4e734db296
we need to do these in subdirectories because a number of the modules build a different ESL.so
2014-03-21 15:45:40 -05:00
Brian West
91d308dfac
fully automake esl perlmod
2014-03-21 15:34:52 -05:00
Brian West
8b76b88f6d
add #!
2014-03-21 15:33:38 -05:00
Brian West
c8c3fbe749
don't install test programs
2014-03-21 15:33:18 -05:00
Brian West
77eca8d044
fix typo
2014-03-21 15:08:32 -05:00
Brian West
5014b80d53
1/2 of automake for esl perl, at least we have configure detecting things now
2014-03-21 14:59:01 -05:00
Brian West
94051688c2
reswig
2014-03-21 14:57:13 -05:00
Ken Rice
7f383ccc19
clean up esl module makefile by MikeJ
2014-03-21 12:59:55 -05:00
Michael Jerris
3ec53f0b67
ESL-86: esl automake of at least the core parts
2014-03-20 10:38:47 -04:00
Brian West
c4c0f38aab
FS-6294 FS-6308 NetBSD support should work test and report back please.
2014-03-19 14:34:07 -05:00
Michael Jerris
d4b3faadc8
remove file listed twice
2014-03-18 14:07:04 -04:00
Brian West
e9a2d17f1f
FS-6368 --resolve include signal.h in ivrd.c
2014-03-17 20:24:28 -05:00
Brian West
6ed4ad7e20
Pass down into esl the LDFLAGS, fixes finding libncurses on NetBSD too.
2014-03-05 06:21:53 -06:00
William King
138224d816
FS-6303 --resolve
2014-03-04 12:30:14 -08:00
Marc Olivier Chouinard
3d53825d1d
FS-6016 --resolve
2014-02-24 21:00:33 -05:00
Brian West
d97b163fd3
ESL-77 your test script works along with single_command.rb now
2014-02-24 04:12:55 -06:00
Marc Olivier Chouinard
289d0de371
some circonstance, esl connection closing would hang. This should fix it
2014-02-23 20:52:14 -05:00
Travis Cross
cdc358c505
Add comment to distant #endif
...
FS-353
2014-02-23 22:33:28 +00:00
James Le Cuirot
d996974faa
Fix building without libedit
...
Signed-off-by: Travis Cross <tc@traviscross.com>
FS-353
2014-02-23 22:33:20 +00:00
Brian West
c2798d7d11
moving phpmod in esl to use swig2.0 which fixes the few issues when you reswig
2014-02-23 10:08:02 -06:00
Brian West
ae1016107d
FS-5723 java makefile problem
2014-02-22 18:33:56 -06:00
William King
5fb660933d
ESL-82 --resolve
...
Previously any esl_connect_timeout() failures would not return to the calling application the reason for the failure.
This commit now allows for calling applications to know why the connection attempt fails, but it is now the calling
applications responsiblity to call esl_disconnect() on the esl handle after the failure. Failing to call disconnect after
a failed connection attempt would result in memory being leaked.
2014-02-21 14:14:05 -08:00
Michael Jerris
b40dd8a374
freebsd fix, use detected cxx compiler when building esl
2014-02-19 16:10:48 -05:00
Jeff Lenk
9842e9efd8
ESL-81 --resolve add specific SWIG code for windows
2014-02-15 18:36:49 -06:00
Seven Du
11dee76381
add user_data in esl_listen so the main function can pass a private user_data to callback
2014-02-16 08:14:44 +08:00
Ken Rice
6e7d5d0897
update copyright header for 2014
2014-02-12 12:08:56 -06:00
Brian West
3c55a90076
ESL-66
2014-02-07 13:10:25 -06:00
Moises Silva
f5f4df3483
Fix ESL infinite loop on handle_recv() when errno is already set
...
system calls do not clear errno, just set it in case of failure, so we
gotta make sure the recv() syscall really failed by checking the return value
2014-02-01 01:40:29 +05:00
Anthony Minessale
b5821c1594
tweak event queue size on event socket and speed up fs_cli a little to keep up on busy logging env
2014-01-23 21:26:56 +05:00
Peter Olsson
5a820fdc78
Disabled some compiler warnings on Windows build (for Visual Studio 2012), also disabled code analysis one some projects. This should make the Windows build more clean in the future.
2014-01-22 22:47:11 +01:00
Anthony Minessale
3ff0aaa0be
FS-5653 --resolve
2014-01-07 00:38:48 +05:00
Michael Jerris
88545a7fe1
.gitignore
2013-12-23 17:27:20 -05:00
Steve Underwood
ac2bf8a405
Fixed a file permission in the ESL library
2013-12-08 01:39:00 +08:00
Jeff Lenk
bb53175526
FS-6010 --resolve
2013-11-29 22:16:49 -06:00
Anthony Minessale
ca8f121977
fix regression from recent refactor that causes infinite loop on unexpected disconnect
2013-11-22 04:53:34 +05:00
Anthony Minessale
634d936a02
kill socket in esl_disconnect to prevent blocking
2013-11-20 23:50:15 +05:00
Jeff Lenk
4ee3b70496
fix windows esl compile
2013-11-13 17:59:52 -06:00
Anthony Minessale
9d2400b7ab
doh
2013-11-14 01:48:48 +05:00
Anthony Minessale
c429de4139
fix build err
2013-11-14 01:38:00 +05:00
Anthony Minessale
c469e7ada2
cleanup ESL a little
2013-11-14 00:43:25 +05:00
Anthony Minessale
931d3fb86a
remove condition for mem leak
2013-11-12 12:33:32 -06:00
Ken Rice
d8da4ae764
--resolve ESL-72 fix const char* vs char* issue in swig
2013-09-20 14:58:44 -05:00
Anthony Minessale
a036125bc4
update cc header
2013-09-18 05:20:56 +05:00
Michael Jerris
58e7db0c6d
FS-5763: --resolve add configure check for lzma and newer readhat/sl tinfo stuff
2013-09-07 12:21:33 -07:00
Anthony Minessale
73646cbaa8
FS-5737 reapply
2013-08-29 22:21:10 +05:00
Anthony Minessale
2e2e4caa45
FS-5737 revert
2013-08-29 22:20:00 +05:00
Anthony Minessale
0d26dbb318
FS-5737 --resolve
2013-08-29 21:03:01 +05:00
Anthony Minessale
76ba6a2342
FS-5737 --resolve
2013-08-28 23:26:07 +05:00
Raymond Chandler
863e6cfa3f
FS-2731 significantly reworked version of Emmanuel's patch to allow subscribing and notifying for the as-feature-event events. we still need a module to handle the FS events for this automatically... coming soon to a repository near you
2013-08-23 15:54:49 -04:00
Anthony Minessale
2e74cf79fc
FS-5617 --resolve
2013-07-19 13:29:05 -05:00
Anthony Minessale
c14d9c436e
FS-5575 --resolve
2013-07-12 14:43:18 -05:00
Anthony Minessale
30d5ecf9f7
FS-5445 --resolve this was actually just missing one word from the code as seen in the similar code in the core, the same mistake was made there where the compiler is not smart enough to see the mutually exclusive logical paths this code is specific to spontaneously creating an array in a single set like set foo[12]=val which would be totally broken if that line were commented
2013-07-10 10:26:08 -05:00
Jeff Lenk
5fc2bc9993
FS-5588 --resolve windows compiler fixes
2013-07-09 07:53:56 -05:00
Ken Rice
22baa51acc
FS-2816 --resolve
2013-07-06 22:04:06 -05:00
Nathan Neulinger
32adc789f6
make noexpandtab explicit in all vim modelines other than xml files
2013-06-25 11:50:17 -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
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
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
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
Jeff Lenk
b4826c1a7f
another esl managed tweak
2013-05-04 12:43:19 -05:00
Jeff Lenk
abbe992e1c
tweak windows esl managed - removing mixed mode and any from the solution - this should remove some of the ambiguity around building
2013-05-04 12:15:04 -05:00
Jeff Lenk
08e28d46b4
FS-5167 fix 2010 dependency
2013-04-15 11:46:23 -05:00
Jeff Lenk
06dcfdab8e
FS-5167 fs_cli update dependency
2013-04-10 10:23:46 -05:00
Jeff Lenk
6fa2c5d5e4
FS-5167
2013-04-10 07:54:24 -05:00