[asterisk-bugs] [Asterisk 0013133]: [patch] Some fixes to autocompletion in some commands.

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Sep 6 06:53:51 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13133 
====================================================================== 
Reported By:                eliel
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   13133
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 132644 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-07-22 17:34 CDT
Last Modified:              2008-09-06 06:53 CDT
====================================================================== 
Summary:                    [patch] Some fixes to autocompletion in some
commands.
Description: 
Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto
completed. Now we complete this command with:
         'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...     
- Pass ast_cli_args->argv and ast_cli_args->argc while running
autocompletion on CLI commands (CLI_GENERATE).
      With this we avoid comparisons on ast_cli_args->line like this:
         strcasestr(a->line, " description")
         strcasestr(a->line, "descriptions ")
         strcasestr(a->line, "realtime peer"), and so on..
      Making the code more confusing (check the spaces in description!).
      The only thing we must be sure is to first check a->pos or a->argc.
      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this
command with 'all' & 'iax2 peers', check a look that iax2 peers where all
the peers, now only the ones in the cache..  (For this I have changed
function complete_iax2_peers to support flags, like complete_sip_peers).




====================================================================== 

---------------------------------------------------------------------- 
 (0092135) svnbot (reporter) - 2008-09-06 06:53
 http://bugs.digium.com/view.php?id=13133#c92135 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 141464

U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_sip.c
U   trunk/main/cli.c

------------------------------------------------------------------------
r141464 | mvanbaak | 2008-09-06 06:53:48 -0500 (Sat, 06 Sep 2008) | 23
lines

Some fixes to autocompletion in some commands.

Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto
completed. Now we complete this command with:
  'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...
- Pass ast_cli_args->argv and ast_cli_args->argc while running
autocompletion on CLI commands (CLI_GENERATE).
  With this we avoid comparisons on ast_cli_args->line like this:
  strcasestr(a->line, " description")
  strcasestr(a->line, "descriptions ")
  strcasestr(a->line, "realtime peer"), and so on..

  Making the code more confusing (check the spaces in description!).
  The only thing we must be sure is to first check a->pos or a->argc.
														      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this
command with 'all' & 'iax2 peers', check a look that iax2 peers where all
the peers, now only the ones in the cache..

(closes issue http://bugs.digium.com/view.php?id=13133)
Reported by: eliel
Patches:
      clichanges.patch uploaded by eliel (license 64)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=141464 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-06 06:53 svnbot         Note Added: 0092135                          
======================================================================




More information about the asterisk-bugs mailing list