Summary: | ASTERISK-10448: [patch] Handle multiple commands as returned by the read system call | ||
Reporter: | James Golovich (jamesgolovich) | Labels: | |
Date Opened: | 2007-10-04 16:59:03 | Date Closed: | 2007-10-21 17:31:44 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-climultiple.diff.txt | |
Description: | While working on bug ASTERISK-10410 I realized that occasionaly the read called for remote consoles would behave as expected, namely returning whatever data was available. We were setup to only process the first command (up to the first '\0'). This typically only happens on startup of the remote console when we send the "core set verbose at least %d" and "core set debug at least %d" to the main server. I doubt many people really noticed this problem unless they were trying to work on something like the issue I was working on. This just adds a new command ast_cli_command_multiple that takes the normal params to ast_cli_command plus the length of the string (as returned by read). Each string it can find without exceeding the length that ends with '\0' is executed as a cli command | ||
Comments: | By: Digium Subversion (svnbot) 2007-10-13 00:04:00 Repository: asterisk Revision: 85532 U branches/1.4/include/asterisk/cli.h U branches/1.4/main/asterisk.c U branches/1.4/main/cli.c ------------------------------------------------------------------------ r85532 | russell | 2007-10-13 00:03:57 -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 ASTERISK-10448) Reported by: jamesgolovich Patches: asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176) ------------------------------------------------------------------------ By: Digium Subversion (svnbot) 2007-10-21 17:31:44 Repository: asterisk Revision: 86585 _U trunk/ U trunk/include/asterisk/cli.h U trunk/main/asterisk.c U trunk/main/cli.c ------------------------------------------------------------------------ r86585 | russell | 2007-10-21 17:31:43 -0500 (Sun, 21 Oct 2007) | 16 lines Merged revisions 85532 via svnmerge from 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 ASTERISK-10448) Reported by: jamesgolovich Patches: asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176) ........ ------------------------------------------------------------------------ |