Commit Graph

576 Commits

Author SHA1 Message Date
Anthony Minessale d961aad2c2 FS-7604 #resolve 2015-06-02 13:17:04 -05:00
Brian West cd98ec85e2 fix line endings 2015-05-28 12:46:43 -05:00
Michael Jerris 85a5e1db1d FS-7294: Enable -Werror when building with clang compiler 2015-02-17 16:23:53 -05:00
Michael Jerris c36196db3f FS-7180: when using system lua, properly link against renamed library versions on debian for esl luamod 2015-01-20 14:32:36 -05:00
Brian West 1d361b6108 FS-7180: let esl lua module build against lua 5.1 or 5.2 (requires newer swig) 2015-01-20 12:26:57 -06:00
Mike Jerris 4c89075f2d Merge pull request #147 in FS/freeswitch from ~DDRAGIC/freeswitch:feature/FS-7128-fs_cli-ignore-duplicate-lines to master
* commit '2406abdb76a2c6dfb3da364a3997fb6d422e759d':
  FS-7128 fs_cli: ignore duplicate lines in history
2015-01-09 11:52:54 -06:00
Dušan Dragić 959b07c06f FS-7129 fs_cli: add toggle mode to function keys 2015-01-04 00:29:38 +01:00
Dušan Dragić 2406abdb76 FS-7128 fs_cli: ignore duplicate lines in history 2015-01-03 23:46:19 +01:00
Mike Jerris a5f4810c0d Merge pull request #88 in FS/freeswitch from ~DANIELWEBER/freeswitch:FixManaged to master
* commit 'a0d6b642fff4fddf1bd62f39ccf952891c7817e3':
  Fix ManagedEsl.2012.csproj: There is no file 'ESLconnection.2010.cs'.
2014-10-16 11:54:13 -05:00
Michael Jerris acd8d74316 cleanup conditions 2014-10-03 12:48:43 -04:00
Travis Cross 051772e4ae Add fs_cli option to disable use of history file
With this commit, passing -Q to fs_cli will cause fs_cli to not load
or save the command history file (~/.fs_cli_history).  This can be
useful e.g. on read-only systems.

This can also be set in the fs_cli configuration file with the option
`no-history-file`.
2014-09-25 11:07:49 +00:00
Daniel Weber a0d6b642ff Fix ManagedEsl.2012.csproj: There is no file 'ESLconnection.2010.cs'. 2014-09-24 10:16:35 +02:00
Travis Cross 323a3d617c Avoid output of junk text by fs_cli
In some cases where `redisplay()` is called immediately after a
command is run (e.g. `log ...`) we often get a prompt, junk output,
and a second prompt.  This is due to a (known) race.

We believe we're falling afoul of this code in `el_deletestr`:

    if (el->el_line.cursor < &el->el_line.buffer[n])
            return;

Basing the length of text to delete off of the cursor position
resolves the issue of junk text, but the real solution is to eliminate
the race conditions, which will also resolve the sometimes duplicated
prompt.

FS-6764 #resolve

Thanks-to: Nathan Neulinger <nneul@neulinger.org>
2014-08-26 20:18:22 +00:00
Travis Cross 8414c498cf Fix line endings per .gitattributes 2014-08-08 15:24:42 +00:00
Chris Rienzo 9b14633cf3 fs_cli: fix compiler error on CentOS 6 caused by recent short uuid logging change 2014-06-30 17:30:59 -04:00
Michael Jerris 0a6a10f584 FS-6604: fix this same issue in esl too 2014-06-17 12:10:47 -05:00
Jeff Lenk a607c20a94 windows fix for a0e9ddf589 2014-06-08 16:06:32 -05:00
Travis Cross 31186d815b Improve a parameter name for fs_cli
What we momentarily called log-uuid-chars is now better called
log-uuid-length.  Setting log-uuid-length will specify a truncation
length for UUIDs displayed by setting log-uuid.
2014-06-04 16:07:10 +00:00
Travis Cross c015013e5f Add log-uuid-short option to fs_cli
If log-uuid-short is set, or -S is passed to fs_cli, we only display
the first 8 hex digits of the UUID.  The log-uuid-chars option may
instead be set to specify some other truncation length for the UUID.
2014-06-04 12:01:01 +00:00
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