Skip to content
Snippets Groups Projects
Commit 25afd987 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix ADSI prog to only accept 253 (bug #2135)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent eb718e59
No related branches found
No related tags found
No related merge requests found
...@@ -1448,7 +1448,7 @@ static int adsi_prog(struct ast_channel *chan, char *script) ...@@ -1448,7 +1448,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0; bytes = 0;
/* Start with key definitions */ /* Start with key definitions */
for (x=0;x<scr->numkeys;x++) { for (x=0;x<scr->numkeys;x++) {
if (bytes + scr->keys[x].retstrlen > 254) { if (bytes + scr->keys[x].retstrlen > 253) {
/* Send what we've collected so far */ /* Send what we've collected so far */
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) { if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x); ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
...@@ -1472,7 +1472,7 @@ static int adsi_prog(struct ast_channel *chan, char *script) ...@@ -1472,7 +1472,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0; bytes = 0;
/* Continue with the display messages */ /* Continue with the display messages */
for (x=0;x<scr->numdisplays;x++) { for (x=0;x<scr->numdisplays;x++) {
if (bytes + scr->displays[x].datalen > 254) { if (bytes + scr->displays[x].datalen > 253) {
/* Send what we've collected so far */ /* Send what we've collected so far */
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) { if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x); ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
...@@ -1496,7 +1496,7 @@ static int adsi_prog(struct ast_channel *chan, char *script) ...@@ -1496,7 +1496,7 @@ static int adsi_prog(struct ast_channel *chan, char *script)
bytes = 0; bytes = 0;
/* Send subroutines */ /* Send subroutines */
for (x=0;x<scr->numsubs;x++) { for (x=0;x<scr->numsubs;x++) {
if (bytes + scr->subs[x].datalen > 254) { if (bytes + scr->subs[x].datalen > 253) {
/* Send what we've collected so far */ /* Send what we've collected so far */
if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) { if (adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DOWNLOAD)) {
ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x); ast_log(LOG_WARNING, "Unable to send chunk ending at %d\n", x);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment