[asterisk-commits] seanbright: trunk r317377 - in /trunk: ./ addons/res_config_mysql.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 5 15:27:30 CDT 2011
Author: seanbright
Date: Thu May 5 15:27:25 2011
New Revision: 317377
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=317377
Log:
Merged revisions 317370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317370 | seanbright | 2011-05-05 16:25:52 -0400 (Thu, 05 May 2011) | 10 lines
Don't duplicate our data on the stack and just use the MYSQL_ROW directly.
With large result sets we were blowing out the stack.
(closes issue #19090)
Reported by: mickecarlsson
Patches:
issue19090_trunk_svn.patch uploaded by seanbright (license 71)
Tested by: mickecarlsson
........
Modified:
trunk/ (props changed)
trunk/addons/res_config_mysql.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/addons/res_config_mysql.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/res_config_mysql.c?view=diff&rev=317377&r1=317376&r2=317377
==============================================================================
--- trunk/addons/res_config_mysql.c (original)
+++ trunk/addons/res_config_mysql.c Thu May 5 15:27:25 2011
@@ -398,7 +398,7 @@
} else if (ast_strlen_zero(row[i])) {
row[i] = " ";
}
- for (stringp = ast_strdupa(row[i]), chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
+ for (stringp = row[i], chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
if (prev) {
if ((prev->next = ast_variable_new(fields[i].name, decode_chunk(chunk), ""))) {
prev = prev->next;
@@ -524,7 +524,7 @@
for (i = 0; i < numFields; i++) {
if (ast_strlen_zero(row[i]))
continue;
- for (stringp = ast_strdupa(row[i]), chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
+ for (stringp = row[i], chunk = strsep(&stringp, ";"); chunk; chunk = strsep(&stringp, ";")) {
if (chunk && !ast_strlen_zero(decode_chunk(ast_strip(chunk)))) {
if (initfield && !strcmp(initfield, fields[i].name)) {
ast_category_rename(cat, chunk);
More information about the asterisk-commits
mailing list