[asterisk-dev] amaflags
Ron McCarthy
ronmccar at gmail.com
Thu Apr 13 09:18:18 MST 2006
Hello, I think this is the right list for this question!
I want to add some more amaflags to what is defined, so I thought I would
just modify this function:
/*! Converts AMA flag to printable string */
char *ast_cdr_flags2str(int flag)
{
switch(flag) {
case AST_CDR_OMIT:
return "OMIT";
case AST_CDR_BILLING:
return "BILLING";
case AST_CDR_DOCUMENTATION:
return "DOCUMENTATION";
case AST_CDR_NEWFLAG:
return "NEWFLAG";
}
return "Unknown";
}
and
int ast_cdr_amaflags2int(const char *flag)
{
if (!strcasecmp(flag, "default"))
return 0;
if (!strcasecmp(flag, "omit"))
return AST_CDR_OMIT;
if (!strcasecmp(flag, "billing"))
return AST_CDR_BILLING;
if (!strcasecmp(flag, "documentation"))
return AST_CDR_DOCUMENTATION;
if (!strcasecmp(flag, "newflag"))
return AST_CDR_NEWFLAG;
return -1;
}
so i added the "newflag" part, which seemed to right to me (im not a c++
guru by any means), and now i get this when I try to make *,
cdr.c: In function `ast_cdr_flags2str':
cdr.c:694: error: `AST_CDR_NEWFLAG' undeclared (first use in this function)
cdr.c:694: error: (Each undeclared identifier is reported only once
cdr.c:694: error: for each function it appears in.)
cdr.c: In function `ast_cdr_amaflags2int':
cdr.c:799: error: `AST_CDR_NEWFLAG' undeclared (first use in this function)
gmake: *** [cdr.o] Error 1
any ideals?!!? I have grep'ed and search for anymore references of where
this would go, im clueless!
Any help would be great!
Thanks
Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060413/c685a6c2/attachment.htm
More information about the asterisk-dev
mailing list