Permalink
Browse files

merge pull request

  • Loading branch information...
videlalvaro committed Jan 31, 2011
2 parents 6a49d6d + abd5376 commit 8087d7d079e619d7d94e200602b065fef9e1d933
Showing with 10 additions and 10 deletions.
  1. +6 −6 amqp.inc
  2. +4 −4 amqp_wire.inc
View
@@ -28,10 +28,10 @@ class AMQPException extends Exception
{
public function __construct($reply_code, $reply_text, $method_sig)
{
- parent::__construct(NULL,0);
+ parent::__construct($reply_text,$reply_code);
- $this->amqp_reply_code = $reply_code;
- $this->amqp_reply_text = $reply_text;
+ $this->amqp_reply_code = $reply_code; // redundant, but kept for BC
+ $this->amqp_reply_text = $reply_text; // redundant, but kept for BC
$this->amqp_method_sig = $method_sig;
$ms=methodSig($method_sig);
@@ -288,7 +288,7 @@ class AbstractChannel
throw new Exception("Method frame too short");
$method_sig_array = unpack("n2", substr($payload,0,4));
- $method_sig = "" . $method_sig_array[1] . "," . $method_sig_array[2];
+ $method_sig = "" . $method_sig_array[1] . "," . $method_sig_array[2];
$args = new AMQPReader(substr($payload,4));
if($this->debug)
@@ -381,7 +381,7 @@ class AMQPConnection extends AbstractChannel
$this->input = new AMQPReader(null, $this->sock);
$this->write(AMQPConnection::$AMQP_PROTOCOL_HEADER);
- $this->wait(array("10,10"));
+ $this->wait(array("10,10"));
$this->x_start_ok($d, $login_method, $login_response, $locale);
$this->wait_tune_ok = true;
@@ -1138,7 +1138,7 @@ class AMQPChannel extends AbstractChannel
return $this->wait(array(
"50,11" // Channel.queue_declare_ok
));
- }
+ }
/**
* confirms a queue definition
View
@@ -38,7 +38,7 @@ class AMQPDecimal
public function asBCvalue()
{
- return bcdiv($n, bcpow(10,$e));
+ return bcdiv($this->n, bcpow(10,$this->e));
}
}
@@ -240,7 +240,7 @@ class AMQPWriter
{
$table_data->write('T');
$table_data->write_timestamp($v);
- } else if($ftype='F')
+ } else if($ftype=='F')
{
$table_data->write('F');
$table_data->write_table($v);
@@ -516,7 +516,7 @@ class GenericContent
$d = array();
if ($props)
$d = array_intersect_key($props, $this->prop_types);
- else
+ else
$d = array();
$this->properties = $d;
}
@@ -695,4 +695,4 @@ class BufferedInput
}
}
}
-?>
+?>

0 comments on commit 8087d7d

Please sign in to comment.