imantaba / asterisk-php-api

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

don't wait timeout when issuing a command #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Current code uses stream_get_contents which wait for EOF or timeout.

Tha attached patch consider the command responded when an empty line is sent.

Original issue reported on code.google.com by math.par...@gmail.com on 12 Jun 2009 at 11:52

Attachments:

GoogleCodeExporter commented 8 years ago
Agreed on the bug, but this patch causes commands to not be executed, and 
Asterisk
servers to complain of broken pipes, depending on the platform.

The proper way is to test for a double line break. I have attached the correct 
patch.

Cheers,
Leo

Original comment by acumen....@gmail.com on 8 Oct 2009 at 1:52

Attachments:

GoogleCodeExporter commented 8 years ago
Duplicate of issue 19. Now fixed. Thanks for your contributions.

Original comment by doug.bro...@gmail.com on 6 Mar 2010 at 9:08

GoogleCodeExporter commented 8 years ago
Hi

I don't think this is the right one to close. Patch on issue 19 enforces 
checking based on 
keywords. Each packet is terminated with double line break - multi-response 
commands such as SipPeers will need to read multiple packets until complete, 
not one 
large packet!

Leo

Original comment by acumen....@gmail.com on 9 Mar 2010 at 6:09