[asterisk-commits] qwell: branch group/ast_storage r66877 - in
/team/group/ast_storage: include/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jun 1 11:08:15 MST 2007
Author: qwell
Date: Fri Jun 1 13:08:14 2007
New Revision: 66877
URL: http://svn.digium.com/view/asterisk?view=rev&rev=66877
Log:
Earlier, I made this function (exts_compare) non-static, but I realized I
should also rename it to prepend an ast_ prefix..
Modified:
team/group/ast_storage/include/asterisk/file.h
team/group/ast_storage/main/file.c
team/group/ast_storage/main/storage.c
team/group/ast_storage/res/res_storage_file.c
Modified: team/group/ast_storage/include/asterisk/file.h
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/include/asterisk/file.h?view=diff&rev=66877&r1=66876&r2=66877
==============================================================================
--- team/group/ast_storage/include/asterisk/file.h (original)
+++ team/group/ast_storage/include/asterisk/file.h Fri Jun 1 13:08:14 2007
@@ -178,7 +178,7 @@
*/
int ast_stopstream(struct ast_channel *c);
-int exts_compare(const char *exts, const char *type);
+int ast_exts_compare(const char *exts, const char *type);
int ast_getformatbyextension(const char *ext);
Modified: team/group/ast_storage/main/file.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/main/file.c?view=diff&rev=66877&r1=66876&r2=66877
==============================================================================
--- team/group/ast_storage/main/file.c (original)
+++ team/group/ast_storage/main/file.c Fri Jun 1 13:08:14 2007
@@ -264,7 +264,7 @@
/* compare type against the list 'exts' */
/* XXX need a better algorithm */
-int exts_compare(const char *exts, const char *type)
+int ast_exts_compare(const char *exts, const char *type)
{
char tmp[256];
char *stringp = tmp, *ext;
@@ -289,7 +289,7 @@
AST_RWLIST_RDLOCK(&formats);
AST_RWLIST_TRAVERSE(&formats, fmt, list) {
- if (exts_compare(fmt->exts, ext))
+ if (ast_exts_compare(fmt->exts, ext))
break;
}
AST_RWLIST_UNLOCK(&formats);
@@ -374,7 +374,7 @@
AST_RWLIST_TRAVERSE(&formats, f, list) {
char *stringp, *ext = NULL;
- if (fmt && !exts_compare(f->exts, fmt))
+ if (fmt && !ast_exts_compare(f->exts, fmt))
continue;
/* Look for a file matching the supported extensions.
@@ -838,7 +838,7 @@
AST_RWLIST_TRAVERSE(&formats, f, list) {
fs = NULL;
- if (!exts_compare(f->exts, type))
+ if (!ast_exts_compare(f->exts, type))
continue;
fn = build_filename(filename, type);
@@ -902,7 +902,7 @@
if (fs)
break;
- if (!exts_compare(f->exts, type))
+ if (!ast_exts_compare(f->exts, type))
continue;
else
format_found = 1;
Modified: team/group/ast_storage/main/storage.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/main/storage.c?view=diff&rev=66877&r1=66876&r2=66877
==============================================================================
--- team/group/ast_storage/main/storage.c (original)
+++ team/group/ast_storage/main/storage.c Fri Jun 1 13:08:14 2007
@@ -254,7 +254,7 @@
struct ast_storage_be *e;
int count_se = 0;
- if (argc != 4)
+ if (argc != 3)
return RESULT_SHOWUSAGE;
ast_cli(fd, "Storage Engine\n");
@@ -276,10 +276,10 @@
{
struct ast_storage_be *e;
- if (argc != 5)
+ if (argc != 4)
return RESULT_SHOWUSAGE;
- if ((e = ast_storage_getbyname(argv[4]))) {
+ if ((e = ast_storage_getbyname(argv[3]))) {
ast_cli(fd, "Storage Engine: %s\n", e->name);
ast_cli(fd, "Can get : %s\n", e->get ? "yes" : "no");
ast_cli(fd, "Can put : %s\n", e->put ? "yes" : "no");
@@ -293,7 +293,7 @@
e->status((struct ast_storage *)e, fd);
}
} else
- ast_cli(fd, "No storage engine named '%s' found.\n", argv[4]);
+ ast_cli(fd, "No storage engine named '%s' found.\n", argv[3]);
return RESULT_SUCCESS;
}
@@ -333,11 +333,11 @@
storage_show_file, "Displays information for a file",
storage_show_file_usage },
- { { "core", "show", "storage", "engines" },
+ { { "storage", "show", "engines" },
show_storage_engines, "Displays storage engines",
show_storage_engines_usage },
- { { "core", "show", "storage", "engine", NULL },
+ { { "storage", "show", "engine", NULL },
show_storage_engine, "Displays storage engine capabilities",
show_storage_engine_usage, complete_show_storage_engines },
};
Modified: team/group/ast_storage/res/res_storage_file.c
URL: http://svn.digium.com/view/asterisk/team/group/ast_storage/res/res_storage_file.c?view=diff&rev=66877&r1=66876&r2=66877
==============================================================================
--- team/group/ast_storage/res/res_storage_file.c (original)
+++ team/group/ast_storage/res/res_storage_file.c Fri Jun 1 13:08:14 2007
@@ -150,7 +150,7 @@
found = 1;
}
if (!found && !strcmp(dirent->name, dirnameptr)) {
- if (ast_strlen_zero(dirent->format) || !fileformats || exts_compare(fileformats, dirent->format))
+ if (ast_strlen_zero(dirent->format) || !fileformats || ast_exts_compare(fileformats, dirent->format))
found = 1;
}
More information about the asterisk-commits
mailing list