shinvdu / php-amqp

Automatically exported from code.google.com/p/php-amqp
0 stars 0 forks source link

amqp_simple_rpc() API has changed, causes segfault #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call amqp_exchange_declare(), amqp_queue_declare(), amqp_queue_bind(),
or amqp_queue_unbind()
2. SIGSEGV
3.

What is the expected output? What do you see instead?
Expect script to complete.  Instead, "Segmentation fault"

What version of the product are you using? On what operating system?
Extension Version => 0.0.7
librabbitmq version => 0.0.1

Please provide any additional information below.
librabbitmq's amqp_simple_rpc() expects parameter 'expected_reply_ids' to
be (amqp_method_number_t*).  amqp_method_number_t provided.  Causes a
segmentation fault when dereferencing expected_reply_ids.

php-rabbit has fixed this by defining a temporary variable to the OK_METHOD
id, and passing the pointer to that variable.

Original issue reported on code.google.com by madco...@gmail.com on 25 Nov 2009 at 12:31

GoogleCodeExporter commented 8 years ago
Does anyone have a patch file for this?

Original comment by pdezw...@gmail.com on 5 Feb 2010 at 12:06

GoogleCodeExporter commented 8 years ago
I ended up fixing several errors.  Attaching my diff of amqp.c  This is against 
r15

Original comment by madco...@gmail.com on 5 Feb 2010 at 2:20

Attachments:

GoogleCodeExporter commented 8 years ago
AWESOME! Thank you very very much.

Original comment by pdezw...@gmail.com on 5 Feb 2010 at 4:57