Fix externalivr's setvariable command so that it properly sets multiple variables.
authorMark Michelson <mmichelson@digium.com>
Mon, 18 May 2009 18:58:26 +0000 (18:58 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 18 May 2009 18:58:26 +0000 (18:58 +0000)
commit1413e48fcaca450cd7914249b221aefa3ee52785
tree91b2fa111d7899812851378a8377c731e46149e0
parentc890725398ef2165b69da2bc41ad8897d98a050f
Fix externalivr's setvariable command so that it properly sets multiple variables.

The command had a for loop that was guaranteed to only execute once since
the continuation operation of the loop would set the input buffer NULL. I rewrote
the loop so that its operation was more obvious, and it would set multiple variables
correctly.

I also reduced stack space required for the function, constified the input string,
and modified the function so that it would not modify the input string while I was
at it.

(closes issue #15114)
Reported by: chris-mac
Patches:
      15114.patch uploaded by mmichelson (license 60)
Tested by: chris-mac

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_externalivr.c