mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
Fix a property name collision in ArcanistHgServerChannel
Summary: See D2665. Here, `channel` is the Mercurial wire protocol channel name ("o" = "output", "e" = "error", etc), not the underlying channel from `PhutilProxyChannel`. Rename the property so there's no collision. Test Plan: ``` $ ../../core/lib/arcanist/scripts/hgdaemon/hgdaemon_client.php . --trace --skip-hello array(3) { [0]=> int(0) [1]=> string(103) "capabilities: getencoding runcommand encoding: UTF-8 pid: 73263e20cf21273d50f1f66cab6e0f7c74f4864e67f0f" [2]=> string(0) "" } Executed in 30647 us. ``` Reviewers: vrana, chad Reviewed By: vrana Differential Revision: https://secure.phabricator.com/D17366
This commit is contained in:
parent
13596cd10f
commit
460b0e46ee
1 changed files with 4 additions and 3 deletions
|
@ -54,6 +54,7 @@ final class ArcanistHgServerChannel extends PhutilProtocolChannel {
|
|||
private $mode = self::MODE_CHANNEL;
|
||||
private $byteLengthOfNextChunk = 1;
|
||||
private $buf = '';
|
||||
private $outputChannel;
|
||||
|
||||
|
||||
/* -( Protocol Implementation )-------------------------------------------- */
|
||||
|
@ -137,7 +138,7 @@ final class ArcanistHgServerChannel extends PhutilProtocolChannel {
|
|||
// 'output', 'error', 'result' or 'debug' respectively. This is a
|
||||
// single byte long. Next, we'll expect a length.
|
||||
|
||||
$this->channel = $chunk;
|
||||
$this->outputChannel = $chunk;
|
||||
$this->byteLengthOfNextChunk = 4;
|
||||
$this->mode = self::MODE_LENGTH;
|
||||
break;
|
||||
|
@ -153,11 +154,11 @@ final class ArcanistHgServerChannel extends PhutilProtocolChannel {
|
|||
// given length. We produce a message from the channel and the data
|
||||
// and return it. Next, we expect another channel name.
|
||||
|
||||
$message = array($this->channel, $chunk);
|
||||
$message = array($this->outputChannel, $chunk);
|
||||
|
||||
$this->byteLengthOfNextChunk = 1;
|
||||
$this->mode = self::MODE_CHANNEL;
|
||||
$this->channel = null;
|
||||
$this->outputChannel = null;
|
||||
|
||||
$messages[] = $message;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue