[asterisk-commits] oej: branch oej/bufo-manager-contexts r282982 - /team/oej/bufo-manager-contex...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 20 06:56:13 CDT 2010
Author: oej
Date: Fri Aug 20 06:56:09 2010
New Revision: 282982
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=282982
Log:
Small fixes
Modified:
team/oej/bufo-manager-contexts/main/manager.c
Modified: team/oej/bufo-manager-contexts/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bufo-manager-contexts/main/manager.c?view=diff&rev=282982&r1=282981&r2=282982
==============================================================================
--- team/oej/bufo-manager-contexts/main/manager.c (original)
+++ team/oej/bufo-manager-contexts/main/manager.c Fri Aug 20 06:56:09 2010
@@ -1954,8 +1954,9 @@
static int apply_context(struct man_context *con, const char *context)
{
while(con) {
- if (!strcmp(con->context, context) || !strcmp(con->context, "*"))
+ if (!strcmp(con->context, context) || !strcmp(con->context, "*")) {
return 1;
+ }
con = con->next;
}
return 0;
@@ -1967,7 +1968,7 @@
while(con) {
conl = con;
con = con->next;
- free(conl);
+ ast_free(conl);
}
}
@@ -1975,8 +1976,9 @@
{
struct man_context *con;
- if ((con = ast_calloc(1, sizeof(*con))))
+ if ((con = ast_calloc(1, sizeof(*con)))) {
ast_copy_string(con->context, context, sizeof(con->context));
+ }
return con;
}
More information about the asterisk-commits
mailing list