[asterisk-bugs] [Asterisk 0018152]: Channel Variable SMSSRC not set properly
Asterisk Bug Tracker
noreply at bugs.digium.com
Sun Oct 17 20:36:53 CDT 2010
The following issue has been SUBMITTED.
======================================================================
https://issues.asterisk.org/view.php?id=18152
======================================================================
Reported By: menschentier
Assigned To: mnicholson
======================================================================
Project: Asterisk
Issue ID: 18152
Category: Addons/chan_mobile
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 292052
Request Review:
======================================================================
Date Submitted: 2010-10-17 20:36 CDT
Last Modified: 2010-10-17 20:36 CDT
======================================================================
Summary: Channel Variable SMSSRC not set properly
Description:
to make it simple - did not work before - works now
function changed:
static int hfp_parse_cmgr(struct hfp_pvt *hfp, char *buf, char
**from_number, char **text)
{
int i, state;
size_t s;
/* parse cmgr info in the following format:
* +CMGR: <msg status>,"+123456789",...\r\n
* <message text>
*/
state = 0;
s = strlen(buf);
for (i = 0; i < s && state != 6; i++) { //not s != 6.....
switch (state) {
case 0: /* search for start of the number section (,) */
if (buf[i] == ',') {
state++;
}
break;
case 1: /* find the opening quote (") */
if (buf[i] == '"') {
state++;
}
break; //made it break here
case 2: /* mark the start of the number */
if (from_number) {
*from_number = &buf[i];
state++;
}
/* fall through */
case 3: /* search for the end of the number (") */
if (buf[i] == '"') {
buf[i] = '\0';
state++;
}
break;
case 4: /* search for the start of the message text (\n) */
if (buf[i] == '\n') {
state++;
}
break;
case 5: /* mark the start of the message text */
if (text) {
*text = &buf[i];
state++;
}
break;
}
}
if (state != 6) {
return -1;
}
return 0;
}
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-10-17 20:36 menschentier New Issue
2010-10-17 20:36 menschentier Status new => assigned
2010-10-17 20:36 menschentier Assigned To => mnicholson
2010-10-17 20:36 menschentier Asterisk Version => SVN
2010-10-17 20:36 menschentier Regression => No
2010-10-17 20:36 menschentier SVN Branch (only for SVN checkouts, not tarball
releases) => trunk
2010-10-17 20:36 menschentier SVN Revision (number only!) => 292052
======================================================================
More information about the asterisk-bugs
mailing list