546 Commits

Author SHA1 Message Date
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
991b83d23cf014226aa97f01f4290a6e6554fee1.

This partially reverts commit
8056125077d5a2583272219d193b94e81c97a50c.
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 4f54f912c3e9f296d23a694bd29501b9bc5a700f.
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:
b9b77bd6156b4343f8baa9ca1a0c803108dbcdb4
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