[asterisk-bugs] [Asterisk 0011343]: Wrong parsing of application arguments Mysql Fetch
noreply at bugs.digium.com
noreply at bugs.digium.com
Wed Dec 12 11:07:13 CST 2007
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=11343
======================================================================
Reported By: wegbert
Assigned To: putnopvut
======================================================================
Project: Asterisk
Issue ID: 11343
Category: Addons/app_addon_sql_mysql
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 487
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 11-21-2007 18:43 CST
Last Modified: 12-12-2007 11:07 CST
======================================================================
Summary: Wrong parsing of application arguments Mysql Fetch
Description:
In function aMYSQL_fetch(struct ast_channel *chan, char *data),
after calling AST_NONSTANDARD_APP_ARGS(args, data, ' ');
in the loop to fetch resultfields,
s5 = strsep(&datatmp, " "); is not working.
- It can only find one variable
- It finds really the first argument, instead from starting of with the
fourth.
My work around solutions involves copying 'data' to 'datatmp' (before
calling AST_NONSTANDARD_APP_ARGS), and shifting of the first three
arguments by calling
strsep(&datatmp, " "); three times:
strcpy(datatmp,ata);
strsep(&datatmp, " ");
strsep(&datatmp, " ");
strsep(&datatmp, " ");
and then using s5 = strsep(&datatmp, " "); in the field retrieval loop.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
12-12-07 11:07 putnopvut Status ready for testing =>
assigned
12-12-07 11:07 putnopvut Assigned To => putnopvut
======================================================================
More information about the asterisk-bugs
mailing list