aboutsummaryrefslogtreecommitdiffstats
path: root/main/cli.c
AgeCommit message (Collapse)AuthorFilesLines
2009-08-10AST-2009-005tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@211551 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-25Merged revisions 203381 via svnmerge from twilson1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r203381 | twilson | 2009-06-25 16:15:11 -0500 (Thu, 25 Jun 2009) | 11 lines Merged revisions 203380 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r203380 | twilson | 2009-06-25 16:13:10 -0500 (Thu, 25 Jun 2009) | 4 lines I didn't see that Mark already fixed the underlying issue! Yay for removing useless code. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@203387 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22Merged revisions 190057 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r190057 | jpeeler | 2009-04-22 16:15:55 -0500 (Wed, 22 Apr 2009) | 9 lines Fix building of chan_h323 with gcc-3.3 There seems to be a bug with old versions of g++ that doesn't allow a structure member to use the name list. Rename list member to group_list in ast_group_info and change the few places it is used. (closes issue #14790) Reported by: stuarth ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@190059 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-02Merged revisions 160208 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r160208 | tilghman | 2008-12-01 18:37:21 -0600 (Mon, 01 Dec 2008) | 10 lines Merged revisions 160207 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r160207 | tilghman | 2008-12-01 18:25:16 -0600 (Mon, 01 Dec 2008) | 3 lines Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc and glibc. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@160228 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09Merged revisions 147807 via svnmerge from murf1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r147807 | murf | 2008-10-09 08:17:33 -0600 (Thu, 09 Oct 2008) | 15 lines (closes issue #13557) Reported by: nickpeirson Patches: pbx.c.patch uploaded by nickpeirson (license 579) replace_bzero+bcopy.patch uploaded by nickpeirson (license 579) Tested by: nickpeirson, murf 1. replaced all refs to bzero and bcopy to memset and memmove instead. 2. added a note to the CODING-GUIDELINES 3. add two macros to asterisk.h to prevent bzero, bcopy from creeping back into the source 4. removed bzero from configure, configure.ac, autoconfig.h.in ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@147809 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-03Merged revisions 146198 via svnmerge from seanbright1-5/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r146198 | seanbright | 2008-10-03 18:10:18 -0400 (Fri, 03 Oct 2008) | 7 lines Resolve a subtle bug where we would never successfully be able to get the first item in the CLI entry list. This was preventing '!' from showing up in either 'help' or in tab completion. (closes issue #13578) Reported by: mvanbaak ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@146199 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05Merged revisions 135598 via svnmerge from seanbright1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r135598 | seanbright | 2008-08-05 09:26:34 -0400 (Tue, 05 Aug 2008) | 9 lines Merged revisions 135597 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r135597 | seanbright | 2008-08-05 09:25:00 -0400 (Tue, 05 Aug 2008) | 1 line Use PATH_MAX for filenames ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@135599 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11Merged revisions 130129 via svnmerge from bbryant1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r130129 | bbryant | 2008-07-11 13:09:35 -0500 (Fri, 11 Jul 2008) | 8 lines Janitor patch to change uses of sizeof to ARRAY_LEN (closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@130130 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27Merged revisions 118554 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r118554 | tilghman | 2008-05-27 14:21:03 -0500 (Tue, 27 May 2008) | 14 lines Merged revisions 118551 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r118551 | tilghman | 2008-05-27 14:15:27 -0500 (Tue, 27 May 2008) | 6 lines When showing an error message for a command, don't shorten the command output, as it tends to confuse the user (it's fine for suggesting other commands, however). Reported by: seanbright (on #asterisk-dev) Fixed by: me ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@118555 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109447 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r109447 | twilson | 2008-03-18 10:43:34 -0500 (Tue, 18 Mar 2008) | 3 lines Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109459 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105840 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r105840 | tilghman | 2008-03-04 17:04:29 -0600 (Tue, 04 Mar 2008) | 2 lines Whitespace changes only ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106306 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Context tracing for channelstilghman1-1/+9
(closes issue #11268) Reported by: moy Patches: chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103754 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Check pointers before freeing (was getting WARNINGS under MALLOC_DEBUG)twilson1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97825 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Merged revisions 97622 via svnmerge from qwell1-5/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #11718) ........ r97622 | qwell | 2008-01-09 14:28:43 -0600 (Wed, 09 Jan 2008) | 5 lines Correctly display a message if a command could not be found. Also fix a comment which may have led to this happening. Issue 11718, reported by kshumard. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97623 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Merged revisions 97618 via svnmerge from qwell1-3/+7
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97618 | qwell | 2008-01-09 14:05:45 -0600 (Wed, 09 Jan 2008) | 1 line Fix some locking and return value funkiness. We really shouldn't be unlocking this lock inside of a function, unless we locked it there too. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97620 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Merged revisions 97350 via svnmerge from tilghman1-4/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97350 | tilghman | 2008-01-08 18:44:14 -0600 (Tue, 08 Jan 2008) | 5 lines Allow filename completion on zero-length modules, remove a memory leak, remove a file descriptor leak, and make filename completion thread-safe. Patched and tested by tilghman. (Closes issue #11681) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97364 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07Add count of total number of calls processed by asterisk during it's lifetime.qwell1-0/+59
Add number of total calls and current calls to SNMP. Closes issue #10057, patch by jcmoore. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91779 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28file says... compile before you commit!file1-3/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90099 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Remove "old"-style CLI handler, since nothing uses it anymore.qwell1-50/+32
Closes issue #11403, patch by eliel. This also completes the janitor project. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90038 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28Hide CLI commands starting with _ from tab completion as was done previously.file1-0/+3
(closes issue #11395) Reported by: eliel Patches: cli.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89982 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26- Mark "concise" as deprecatedoej1-1/+3
- Restructure other changes to UPGRADE.txt and CHANGES We're still looking for scripts that replace asterisk -rx "show shannels concise" by using the manager interface, but still produces the same output. Anyone? git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89606 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove a bunch of useless #include "options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move internal function declarations to include/asterisk/_private.hrizzo1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-4/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08improve linked-list macros in two ways:kpfleming1-1/+1
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02Show the channel unique ID in the "show channel concise" outputrussell1-2/+3
(closes issue #11148, requested by falves11, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88370 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-21/+21
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-21Merged revisions 85532 via svnmerge from russell1-0/+17
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85532 | russell | 2007-10-13 00:24:33 -0500 (Sat, 13 Oct 2007) | 8 lines Properly handle the case where read() may return the text for more than one CLI command at once for a remote console. (closes issue #10888) Reported by: jamesgolovich Patches: asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86585 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-21/+21
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Move the CLI commands that were in builtins[] into the cli_cli[] array of CLIrussell1-57/+14
commands and remove the cli_iterator struct. This gets tab completion working again. (closes issue #10970) Reported by: jamesgolovich Patches: asterisk-clicomplete.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85550 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-13Fix compiling cli.c due to differences with new cli system (closes issue jamesgolovich1-1/+1
0010966) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85535 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-13Merged revisions 85533 via svnmerge from russell1-2/+7
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85533 | russell | 2007-10-13 01:48:10 -0400 (Sat, 13 Oct 2007) | 12 lines Fix an issue with console verbosity when running asterisk -rx to execute a command and retrieve its output. The issue was that there was no way for the main Asterisk process to know that the remote console was connecting in the -rx mode. The way that James has fixed this is to have all remote consoles muted by default. Then, regular remote consoles automatically execute a CLI command to unmute themselves when they first start up. (closes issue #10847) Reported by: atis Patches: asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)russell1-123/+143
(closes issue #10724) Reported by: eliel Patches: chan_skinny.c.patch uploaded by eliel (license 64) chan_oss.c.patch uploaded by eliel (license 64) chan_mgcp.c.patch2 uploaded by eliel (license 64) pbx_config.c.patch uploaded by seanbright (license 71) iax2-provision.c.patch uploaded by eliel (license 64) chan_gtalk.c.patch uploaded by eliel (license 64) pbx_ael.c.patch uploaded by seanbright (license 71) file.c.patch uploaded by seanbright (license 71) image.c.patch uploaded by seanbright (license 71) cli.c.patch uploaded by moy (license 222) astobj2.c.patch uploaded by moy (license 222) asterisk.c.patch uploaded by moy (license 222) res_limit.c.patch uploaded by seanbright (license 71) res_convert.c.patch uploaded by seanbright (license 71) res_crypto.c.patch uploaded by seanbright (license 71) app_osplookup.c.patch uploaded by seanbright (license 71) app_rpt.c.patch uploaded by seanbright (license 71) app_mixmonitor.c.patch uploaded by seanbright (license 71) channel.c.patch uploaded by seanbright (license 71) translate.c.patch uploaded by seanbright (license 71) udptl.c.patch uploaded by seanbright (license 71) threadstorage.c.patch uploaded by seanbright (license 71) db.c.patch uploaded by seanbright (license 71) cdr.c.patch uploaded by moy (license 222) pbd_dundi.c.patch uploaded by moy (license 222) app_osplookup-rev83558.patch uploaded by moy (license 222) res_clioriginate.c.patch uploaded by moy (license 222) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85460 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Don't set the full command string until after verifying that there is notrussell1-4/+2
another CLI command with the same command text registered. This prevents a crash if someone accidentally calls ast_cli_register() on the same CLI command data twice. This also fixes a small bug where the helpers list would get unlocked without being locked if building the full command failed. (closes issue #10858, reported by jamesgolovich, patched by me) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84169 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Convert CLI helpers list to rwlist.file1-24/+24
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77857 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23(closes issue #10192)russell1-3/+126
Reported by: bbryant Patches: 20070720__core_debug_by_file.patch uploaded by bbryant (license 36) (with some modifications by me) Tested by: russell, bbryant This set of changes introduces the ability to set the core debug or verbose levels on a per-file basis. Interestingly enough, in 1.4, you have the ability to set core debug for a single file, but that functionality was accidentally lost in the conversion of the CLI commands to the new format. This patch improves upon what was in 1.4 by letting you set it for more than 1 file, and by also supporting verbose. *** Janitor Project *** This patch also introduces a new macro, ast_verb(), which is similar to ast_debug(). Setting the per file verbose value only works for messages that use this macro. Converting existing uses of ast_verbose() can be done like: if (option_debug > 2) ast_verbose(VERBOSE_PREFIX_3 "Something useful\n"); ... ast_verb(3, "Something useful\n"); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76555 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman1-35/+34
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02After some discussion on the asterisk-dev list, we determined that this approachrussell1-67/+0
for extracting application, function, manager, and agi documentation is the wrong one to take. The most severe problem is that the output depends on which modules are loaded as well as compile time options, which both determine which parts are available. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72986 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02Add a CLI command to output docs on CLI commands to a filerussell1-0/+67
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72937 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Fix a segfault when trying to tab complete the "core show uptime" command.qwell1-4/+4
Reported in #asterisk-dev on IRC by jcmoore, fixed by me. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72326 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Convert uses of strdup() to ast_strdup()russell1-5/+5
(issue #9983, eliel) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69436 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-13Use read/write lock based lists for group counting.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69130 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-13/+13
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05Found a bug where when "core set debug #" is used, the verbosity is read as themmichelson1-1/+3
old value instead of the old debug value, leading to an erroneous status message after setting. This was purely a cosmetic issue and had no other underlying problems. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67557 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-25Merged revisions 61805 via svnmerge from file1-21/+13
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r61805 | file | 2007-04-25 15:21:54 -0400 (Wed, 25 Apr 2007) | 10 lines Merged revisions 61804 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61804 | file | 2007-04-25 14:52:50 -0400 (Wed, 25 Apr 2007) | 2 lines Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61806 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-02Add the channel's Language to the "show channel" CLI command and the DumpChanrussell1-1/+4
application. (issue #9187, Junky) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57474 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-22Merged revisions 56008 via svnmerge from file1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r56008 | file | 2007-02-21 19:35:55 -0500 (Wed, 21 Feb 2007) | 2 lines Print out deprecation notice on usage output of CLI commands. (issue #8925 reported by blitzrage) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56009 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-13This introduces a new dialplan function, DEVSTATE, which allows you to do somerussell1-6/+10
pretty cool things. First, you can get the device state of anything in the dialplan: NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)}) NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)}) Most importantly, this allows you to create custom device states so you can control phone lamps directly from the dialplan. Set(DEVSTATE(Custom:mycustomlamp)=BUSY) ... exten => mycustomlamp,hint,Custom:mycustomlamp git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54261 f38db490-d61c-443f-a65b-d21fe96a405b