* The silencethreshold used for various applications is now settable via a
centralized config option in dsp.conf.
+* The logical value of spaces immediately preceding a standalone 0 previously
+ evaluated to true. It now evaluates to false. This has confused a good
+ many people in the past (typically because they failed to realize the space
+ had any significance). Since this violates the Principle of Least Surprise,
+ it has been changed.
+
Voicemail:
* The voicemail configuration values 'maxmessage' and 'minmessage' have
int pbx_checkcondition(const char *condition)
{
- if (ast_strlen_zero(condition)) /* NULL or empty strings are false */
+ int res;
+ if (ast_strlen_zero(condition)) { /* NULL or empty strings are false */
return 0;
- else if (*condition >= '0' && *condition <= '9') /* Numbers are evaluated for truth */
- return atoi(condition);
- else /* Strings are true */
+ } else if (sscanf(condition, "%d", &res) == 1) { /* Numbers are evaluated for truth */
+ return res;
+ } else { /* Strings are true */
return 1;
+ }
}
static int pbx_builtin_gotoif(struct ast_channel *chan, void *data)