[Home]

Summary:ASTERISK-02106: [patch] ADSIProg() fails on exactly 245 bytes
Reporter:sremington (sremington)Labels:
Date Opened:2004-07-25 22:34:21Date Closed:2008-01-15 15:03:32.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20040725_app_adsiproc.txt
Description:If an ADSI script key def / display message / or subroutine compiles to exactly 254 bytes it will fail with an error message similar to the following:

Jul 21 17:32:13 WARNING[655378]: Can't send ADSI message of 254 bytes, too large
Jul 21 17:32:13 WARNING[655378]: Unable to send chunk ending at 2

adsi_prog() will send a 254 byte chunk on to adsi_transmit_message() but adsi_transmit_message() returns an error if the message length is > 253. The patch simply changes adsi_prog() to only send the max 253 bytes that adsi_transmit_message() is expecting.
                                                                                                                           
To be honest, I erred on the side of caution with the patch. Not having access to the ADSI specification I wasn't sure of all the details besides looking at the existing code. It would appear that the limit in the adsi_generate() function is 255 bytes leaving the last byte for the message number. But I assumed that there was a good reason that adsi_transmit_message() only wants 253 bytes.
Comments:By: Mark Spencer (markster) 2004-07-25 23:37:43

Yes, it's a checksum I think or something.  It's been a while, good call.

By: Digium Subversion (svnbot) 2008-01-15 15:03:32.000-0600

Repository: asterisk
Revision: 3512

U   trunk/apps/app_adsiprog.c

------------------------------------------------------------------------
r3512 | markster | 2008-01-15 15:03:32 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix ADSI prog to only accept 253 (bug ASTERISK-2106)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3512