[asterisk-commits] tilghman: branch tilghman/str_substitution r180116 - in /team/tilghman/str_su...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 3 18:35:34 CST 2009
Author: tilghman
Date: Tue Mar 3 18:35:28 2009
New Revision: 180116
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180116
Log:
Change read2_max to read_max, and two fixes from mmichelson's review
Modified:
team/tilghman/str_substitution/apps/app_exec.c
team/tilghman/str_substitution/funcs/func_callerid.c
team/tilghman/str_substitution/funcs/func_db.c
team/tilghman/str_substitution/funcs/func_dialplan.c
team/tilghman/str_substitution/funcs/func_env.c
team/tilghman/str_substitution/funcs/func_extstate.c
team/tilghman/str_substitution/funcs/func_groupcount.c
team/tilghman/str_substitution/funcs/func_lock.c
team/tilghman/str_substitution/funcs/func_logic.c
team/tilghman/str_substitution/funcs/func_md5.c
team/tilghman/str_substitution/funcs/func_module.c
team/tilghman/str_substitution/funcs/func_rand.c
team/tilghman/str_substitution/funcs/func_sha1.c
team/tilghman/str_substitution/funcs/func_speex.c
team/tilghman/str_substitution/funcs/func_strings.c
team/tilghman/str_substitution/funcs/func_sysinfo.c
team/tilghman/str_substitution/funcs/func_timeout.c
team/tilghman/str_substitution/funcs/func_vmcount.c
team/tilghman/str_substitution/include/asterisk/pbx.h
team/tilghman/str_substitution/main/pbx.c
Modified: team/tilghman/str_substitution/apps/app_exec.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/apps/app_exec.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/apps/app_exec.c (original)
+++ team/tilghman/str_substitution/apps/app_exec.c Tue Mar 3 18:35:28 2009
@@ -194,6 +194,7 @@
}
}
+ ast_free(args);
return 0;
}
Modified: team/tilghman/str_substitution/funcs/func_callerid.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_callerid.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_callerid.c (original)
+++ team/tilghman/str_substitution/funcs/func_callerid.c Tue Mar 3 18:35:28 2009
@@ -274,14 +274,14 @@
static struct ast_custom_function callerid_function = {
.name = "CALLERID",
.read = callerid_read,
- .read2_max = 256,
+ .read_max = 256,
.write = callerid_write,
};
static struct ast_custom_function callerpres_function = {
.name = "CALLERPRES",
.read = callerpres_read,
- .read2_max = 50,
+ .read_max = 50,
.write = callerpres_write,
};
Modified: team/tilghman/str_substitution/funcs/func_db.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_db.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_db.c (original)
+++ team/tilghman/str_substitution/funcs/func_db.c Tue Mar 3 18:35:28 2009
@@ -201,7 +201,7 @@
static struct ast_custom_function db_exists_function = {
.name = "DB_EXISTS",
.read = function_db_exists,
- .read2_max = 2,
+ .read_max = 2,
};
static int function_db_delete(struct ast_channel *chan, const char *cmd,
Modified: team/tilghman/str_substitution/funcs/func_dialplan.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_dialplan.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_dialplan.c (original)
+++ team/tilghman/str_substitution/funcs/func_dialplan.c Tue Mar 3 18:35:28 2009
@@ -105,7 +105,7 @@
static struct ast_custom_function isexten_function = {
.name = "DIALPLAN_EXISTS",
.read = isexten_function_read,
- .read2_max = 2,
+ .read_max = 2,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_env.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_env.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_env.c (original)
+++ team/tilghman/str_substitution/funcs/func_env.c Tue Mar 3 18:35:28 2009
@@ -211,7 +211,7 @@
static struct ast_custom_function stat_function = {
.name = "STAT",
.read = stat_read,
- .read2_max = 12,
+ .read_max = 12,
};
static struct ast_custom_function file_function = {
Modified: team/tilghman/str_substitution/funcs/func_extstate.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_extstate.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_extstate.c (original)
+++ team/tilghman/str_substitution/funcs/func_extstate.c Tue Mar 3 18:35:28 2009
@@ -122,7 +122,7 @@
static struct ast_custom_function extstate_function = {
.name = "EXTENSION_STATE",
.read = extstate_read,
- .read2_max = 12,
+ .read_max = 12,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_groupcount.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_groupcount.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_groupcount.c (original)
+++ team/tilghman/str_substitution/funcs/func_groupcount.c Tue Mar 3 18:35:28 2009
@@ -134,7 +134,7 @@
static struct ast_custom_function group_count_function = {
.name = "GROUP_COUNT",
.read = group_count_function_read,
- .read2_max = 12,
+ .read_max = 12,
};
static int group_match_count_function_read(struct ast_channel *chan,
@@ -160,7 +160,7 @@
static struct ast_custom_function group_match_count_function = {
.name = "GROUP_MATCH_COUNT",
.read = group_match_count_function_read,
- .read2_max = 12,
+ .read_max = 12,
.write = NULL,
};
Modified: team/tilghman/str_substitution/funcs/func_lock.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_lock.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_lock.c (original)
+++ team/tilghman/str_substitution/funcs/func_lock.c Tue Mar 3 18:35:28 2009
@@ -324,19 +324,19 @@
static struct ast_custom_function lock_function = {
.name = "LOCK",
.read = lock_read,
- .read2_max = 2,
+ .read_max = 2,
};
static struct ast_custom_function trylock_function = {
.name = "TRYLOCK",
.read = trylock_read,
- .read2_max = 2,
+ .read_max = 2,
};
static struct ast_custom_function unlock_function = {
.name = "UNLOCK",
.read = unlock_read,
- .read2_max = 2,
+ .read_max = 2,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_logic.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_logic.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_logic.c (original)
+++ team/tilghman/str_substitution/funcs/func_logic.c Tue Mar 3 18:35:28 2009
@@ -272,7 +272,7 @@
static struct ast_custom_function isnull_function = {
.name = "ISNULL",
.read = isnull,
- .read2_max = 2,
+ .read_max = 2,
};
static struct ast_custom_function set_function = {
@@ -284,7 +284,7 @@
static struct ast_custom_function exists_function = {
.name = "EXISTS",
.read = exists,
- .read2_max = 2,
+ .read_max = 2,
};
static struct ast_custom_function if_function = {
Modified: team/tilghman/str_substitution/funcs/func_md5.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_md5.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_md5.c (original)
+++ team/tilghman/str_substitution/funcs/func_md5.c Tue Mar 3 18:35:28 2009
@@ -64,7 +64,7 @@
static struct ast_custom_function md5_function = {
.name = "MD5",
.read = md5,
- .read2_max = 33,
+ .read_max = 33,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_module.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_module.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_module.c (original)
+++ team/tilghman/str_substitution/funcs/func_module.c Tue Mar 3 18:35:28 2009
@@ -65,7 +65,7 @@
static struct ast_custom_function ifmodule_function = {
.name = "IFMODULE",
.read = ifmodule_read,
- .read2_max = 2,
+ .read_max = 2,
};
Modified: team/tilghman/str_substitution/funcs/func_rand.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_rand.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_rand.c (original)
+++ team/tilghman/str_substitution/funcs/func_rand.c Tue Mar 3 18:35:28 2009
@@ -87,7 +87,7 @@
static struct ast_custom_function acf_rand = {
.name = "RAND",
.read = acf_rand_exec,
- .read2_max = 12,
+ .read_max = 12,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_sha1.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_sha1.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_sha1.c (original)
+++ team/tilghman/str_substitution/funcs/func_sha1.c Tue Mar 3 18:35:28 2009
@@ -74,7 +74,7 @@
static struct ast_custom_function sha1_function = {
.name = "SHA1",
.read = sha1,
- .read2_max = 42,
+ .read_max = 42,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_speex.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_speex.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_speex.c (original)
+++ team/tilghman/str_substitution/funcs/func_speex.c Tue Mar 3 18:35:28 2009
@@ -338,14 +338,14 @@
.name = "AGC",
.write = speex_write,
.read = speex_read,
- .read2_max = 22,
+ .read_max = 22,
};
static struct ast_custom_function denoise_function = {
.name = "DENOISE",
.write = speex_write,
.read = speex_read,
- .read2_max = 22,
+ .read_max = 22,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/funcs/func_strings.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_strings.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_strings.c (original)
+++ team/tilghman/str_substitution/funcs/func_strings.c Tue Mar 3 18:35:28 2009
@@ -828,7 +828,7 @@
static struct ast_custom_function len_function = {
.name = "LEN",
.read = len,
- .read2_max = 12,
+ .read_max = 12,
};
static int acf_strftime(struct ast_channel *chan, const char *cmd, char *parse,
Modified: team/tilghman/str_substitution/funcs/func_sysinfo.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_sysinfo.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_sysinfo.c (original)
+++ team/tilghman/str_substitution/funcs/func_sysinfo.c Tue Mar 3 18:35:28 2009
@@ -86,7 +86,7 @@
.synopsis = "Returns system information specified by parameter.",
.syntax = "SYSINFO(<parameter>)",
.read = sysinfo_helper,
- .read2_max = 22,
+ .read_max = 22,
.desc =
"Returns information from a given parameter\n"
" Options:\n"
Modified: team/tilghman/str_substitution/funcs/func_timeout.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_timeout.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_timeout.c (original)
+++ team/tilghman/str_substitution/funcs/func_timeout.c Tue Mar 3 18:35:28 2009
@@ -191,7 +191,7 @@
static struct ast_custom_function timeout_function = {
.name = "TIMEOUT",
.read = timeout_read,
- .read2_max = 22,
+ .read_max = 22,
.write = timeout_write,
};
Modified: team/tilghman/str_substitution/funcs/func_vmcount.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/funcs/func_vmcount.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/funcs/func_vmcount.c (original)
+++ team/tilghman/str_substitution/funcs/func_vmcount.c Tue Mar 3 18:35:28 2009
@@ -97,7 +97,7 @@
struct ast_custom_function acf_vmcount = {
.name = "VMCOUNT",
.read = acf_vmcount_exec,
- .read2_max = 12,
+ .read_max = 12,
};
static int unload_module(void)
Modified: team/tilghman/str_substitution/include/asterisk/pbx.h
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/include/asterisk/pbx.h?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/include/asterisk/pbx.h (original)
+++ team/tilghman/str_substitution/include/asterisk/pbx.h Tue Mar 3 18:35:28 2009
@@ -90,7 +90,7 @@
enum ast_doc_src docsrc; /*!< Where the documentation come from */
int (*read)(struct ast_channel *, const char *, char *, char *, size_t); /*!< Read function, if read is supported */
int (*read2)(struct ast_channel *, const char *, char *, struct ast_str **, int); /*!< Read function, if read is supported */
- size_t read2_max; /*!< If no read2 function is provided, what maximum size? */
+ size_t read_max; /*!< If no read2 function is provided, what maximum size? */
int (*write)(struct ast_channel *, const char *, char *, const char *); /*!< Write function, if write is supported */
struct ast_module *mod; /*!< Module this custom function belongs to */
AST_RWLIST_ENTRY(ast_custom_function) acflist;
Modified: team/tilghman/str_substitution/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/team/tilghman/str_substitution/main/pbx.c?view=diff&rev=180116&r1=180115&r2=180116
==============================================================================
--- team/tilghman/str_substitution/main/pbx.c (original)
+++ team/tilghman/str_substitution/main/pbx.c Tue Mar 3 18:35:28 2009
@@ -3438,8 +3438,8 @@
int maxsize = ast_str_size(*str);
if (maxlen > -1) {
if (maxlen == 0) {
- if (acfptr->read2_max) {
- maxsize = acfptr->read2_max;
+ if (acfptr->read_max) {
+ maxsize = acfptr->read_max;
} else {
maxsize = VAR_BUF_SIZE;
}
@@ -3485,7 +3485,7 @@
void ast_str_substitute_variables_full(struct ast_str **buf, int maxlen, struct ast_channel *c, struct varshead *headp, const char *templ, size_t *used)
{
/* Substitutes variables into buf, based on string templ */
- char *cp4;
+ char *cp4 = NULL;
const char *tmp, *whereweare;
int orig_size = 0;
int offset, offset2, isfunction;
More information about the asterisk-commits
mailing list