[asterisk-commits] russell: branch group/asterisk-cpp r168446 - /team/group/asterisk-cpp/main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jan 11 15:27:57 CST 2009
Author: russell
Date: Sun Jan 11 15:27:57 2009
New Revision: 168446
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168446
Log:
resolve some errors in pbx.c, but still a lot to go. Most notably, fixed the AST_APP_OPTION stuff
Modified:
team/group/asterisk-cpp/main/pbx.c
Modified: team/group/asterisk-cpp/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/pbx.c?view=diff&rev=168446&r1=168445&r2=168446
==============================================================================
--- team/group/asterisk-cpp/main/pbx.c (original)
+++ team/group/asterisk-cpp/main/pbx.c Sun Jan 11 15:27:57 2009
@@ -967,8 +967,8 @@
/* a func for qsort to use to sort a char array */
static int compare_char(const void *a, const void *b)
{
- const char *ac = a;
- const char *bc = b;
+ const char *ac = (const char *) a;
+ const char *bc = (const char *) b;
if ((*ac) < (*bc))
return -1;
else if ((*ac) == (*bc))
@@ -980,8 +980,8 @@
/* labels, contexts are case sensitive priority numbers are ints */
int ast_hashtab_compare_contexts(const void *ah_a, const void *ah_b)
{
- const struct ast_context *ac = ah_a;
- const struct ast_context *bc = ah_b;
+ const struct ast_context *ac = (const struct ast_context *) ah_a;
+ const struct ast_context *bc = (const struct ast_context *) ah_b;
if (!ac || !bc) /* safety valve, but it might prevent a crash you'd rather have happen */
return 1;
/* assume context names are registered in a string table! */
@@ -990,8 +990,8 @@
static int hashtab_compare_extens(const void *ah_a, const void *ah_b)
{
- const struct ast_exten *ac = ah_a;
- const struct ast_exten *bc = ah_b;
+ const struct ast_exten *ac = (const struct ast_exten *) ah_a;
+ const struct ast_exten *bc = (const struct ast_exten *) ah_b;
int x = strcmp(ac->exten, bc->exten);
if (x) { /* if exten names are diff, then return */
return x;
@@ -1009,27 +1009,27 @@
static int hashtab_compare_exten_numbers(const void *ah_a, const void *ah_b)
{
- const struct ast_exten *ac = ah_a;
- const struct ast_exten *bc = ah_b;
+ const struct ast_exten *ac = (const struct ast_exten *) ah_a;
+ const struct ast_exten *bc = (const struct ast_exten *) ah_b;
return ac->priority != bc->priority;
}
static int hashtab_compare_exten_labels(const void *ah_a, const void *ah_b)
{
- const struct ast_exten *ac = ah_a;
- const struct ast_exten *bc = ah_b;
+ const struct ast_exten *ac = (const struct ast_exten *) ah_a;
+ const struct ast_exten *bc = (const struct ast_exten *) ah_b;
return strcmp(ac->label, bc->label);
}
unsigned int ast_hashtab_hash_contexts(const void *obj)
{
- const struct ast_context *ac = obj;
+ const struct ast_context *ac = (const struct ast_context *) obj;
return ast_hashtab_hash_string(ac->name);
}
static unsigned int hashtab_hash_extens(const void *obj)
{
- const struct ast_exten *ac = obj;
+ const struct ast_exten *ac = (const struct ast_exten *) obj;
unsigned int x = ast_hashtab_hash_string(ac->exten);
unsigned int y = 0;
if (ac->matchcid)
@@ -1039,13 +1039,13 @@
static unsigned int hashtab_hash_priority(const void *obj)
{
- const struct ast_exten *ac = obj;
+ const struct ast_exten *ac = (const struct ast_exten *) obj;
return ast_hashtab_hash_int(ac->priority);
}
static unsigned int hashtab_hash_labels(const void *obj)
{
- const struct ast_exten *ac = obj;
+ const struct ast_exten *ac = (const struct ast_exten *) obj;
return ast_hashtab_hash_string(ac->label);
}
@@ -1315,14 +1315,14 @@
const char *saved_c_data;
if (c->cdr && !ast_check_hangup(c))
- ast_cdr_setapp(c->cdr, app->name, data);
+ ast_cdr_setapp(c->cdr, app->name, (const char *) data);
/* save channel values */
saved_c_appl= c->appl;
saved_c_data= c->data;
c->appl = app->name;
- c->data = data;
+ c->data = (const char *) data;
if (app->module)
u = __ast_module_user_add(app->module, c);
res = app->execute(c, S_OR(data, ""));
More information about the asterisk-commits
mailing list