[asterisk-bugs] [Asterisk 0010888]: [patch] Handle multiple commands as returned by the read system call
noreply at bugs.digium.com
noreply at bugs.digium.com
Sat Oct 13 00:04:01 CDT 2007
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=10888
======================================================================
Reported By: jamesgolovich
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 10888
Category: Core-General
Reproducibility: sometimes
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 84149
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 10-04-2007 16:59 CDT
Last Modified: 10-13-2007 00:04 CDT
======================================================================
Summary: [patch] Handle multiple commands as returned by the
read system call
Description:
While working on bug http://bugs.digium.com/view.php?id=10847 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
======================================================================
----------------------------------------------------------------------
svnbot - 10-13-07 00:04
----------------------------------------------------------------------
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 http://bugs.digium.com/view.php?id=10888)
Reported by: jamesgolovich
Patches:
asterisk-climultiple.diff.txt uploaded by jamesgolovich (license
176)
------------------------------------------------------------------------
Issue History
Date Modified Username Field Change
======================================================================
10-13-07 00:04 svnbot Note Added: 0071914
10-13-07 00:04 svnbot Status new => assigned
10-13-07 00:04 svnbot Assigned To => russell
======================================================================
More information about the asterisk-bugs
mailing list