From: Russell Bryant Date: Mon, 8 May 2006 10:08:20 +0000 (+0000) Subject: remove an XXX comment X-Git-Tag: 1.4.0-beta1~1531 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a252d794849c53ea2c3932c4c27d5f28fa1dc66d;p=thirdparty%2Fasterisk.git remove an XXX comment - we can't use ast_true here because non-empty strings would no longer be evaluated as true document the return values of pbx_checkcondition() in doxygen format git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25411 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index 1765aeb4b7..5bc8b84d83 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -692,7 +692,14 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout particular application with given extension */ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel); -/* Evaluate a condition for non-falseness and return a boolean */ +/*! + * \brief Evaluate a condition + * + * \retval 0 if the condition is NULL or of zero length + * \retval int If the string is an integer, the integer representation of + * the integer is returned + * \retval 1 Any other non-empty string + */ int pbx_checkcondition(const char *condition); /* Functions for returning values from structures */ diff --git a/pbx.c b/pbx.c index a2fd93d051..f1206b51d0 100644 --- a/pbx.c +++ b/pbx.c @@ -5486,7 +5486,7 @@ int pbx_checkcondition(const char *condition) return 0; else if (*condition >= '0' && *condition <= '9') /* Numbers are evaluated for truth */ return atoi(condition); - else /* Strings are true -- XXX maybe use ast_true() ? */ + else /* Strings are true */ return 1; }