[asterisk-commits] eliel: branch group/data_api_gsoc2009 r205213 - in /team/group/data_api_gsoc2...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 8 11:35:37 CDT 2009
Author: eliel
Date: Wed Jul 8 11:35:33 2009
New Revision: 205213
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205213
Log:
Remove not needed logging used for debugging.
Add missing documentation.
Modified:
team/group/data_api_gsoc2009/main/data.c
team/group/data_api_gsoc2009/tests/test_data.c
Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=205213&r1=205212&r2=205213
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Wed Jul 8 11:35:33 2009
@@ -838,50 +838,47 @@
/*!
* \internal
- * \brief XXX
+ * \brief Based on the kind of comparison and the result in cmpval, return
+ * if it matches.
+ * \param[in] cmpval A result returned by a strcmp() for example.
+ * \param[in] comparison_type The kind of comparison (<,>,=,!=,...)
+ * \retval 1 If the comparison doesn't match.
+ * \retval 0 If the comparison matches.
*/
static inline int data_search_comparison_result(int cmpval, enum data_search_comparison comparison_type)
{
- ast_log(LOG_ERROR, "CMPVAL = %d\n", cmpval);
switch (comparison_type) {
case DATA_CMP_GE:
- ast_log(LOG_ERROR, "CMP = GE\n");
if (cmpval >= 0) {
return 0;
}
break;
case DATA_CMP_LE:
- ast_log(LOG_ERROR, "CMP = LE\n");
if (cmpval <= 0) {
return 0;
}
break;
case DATA_CMP_EQ:
- ast_log(LOG_ERROR, "CMP = EQ\n");
if (cmpval == 0) {
return 0;
}
break;
case DATA_CMP_NEQ:
- ast_log(LOG_ERROR, "CMP = NEQ\n");
if (cmpval != 0) {
return 0;
}
break;
case DATA_CMP_LT:
- ast_log(LOG_ERROR, "CMP = LT\n");
if (cmpval < 0) {
return 0;
}
break;
case DATA_CMP_GT:
- ast_log(LOG_ERROR, "CMP = GT\n");
if (cmpval > 0) {
return 0;
}
break;
case DATA_CMP_UNKNOWN:
- ast_log(LOG_ERROR, "CMP = UNK\n");
break;
}
return 1;
Modified: team/group/data_api_gsoc2009/tests/test_data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/tests/test_data.c?view=diff&rev=205213&r1=205212&r2=205213
==============================================================================
--- team/group/data_api_gsoc2009/tests/test_data.c (original)
+++ team/group/data_api_gsoc2009/tests/test_data.c Wed Jul 8 11:35:33 2009
@@ -45,10 +45,6 @@
struct ast_data *res, *internal;
if (!ast_data_search_cmp_sint(search, "root_test/data1", 10)) {
- ast_log(LOG_ERROR, "Se cumplio!!!\n");
- return NULL;
- } else {
- ast_log(LOG_ERROR, "NO SE CUMPLIO!\n");
return NULL;
}
More information about the asterisk-commits
mailing list