diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-03 02:21:07 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-03 02:21:07 +0000 |
commit | 787c08a3fc686be8c47f4dda38e234ff1fdfb3ca (patch) | |
tree | 76b6cc3ec9dfcbbb2f8bfa91e9f8ad4a4d495f82 /pbx.c | |
parent | 46d0533b99ab53d15a5c3b68c3004d765ba3bf1f (diff) |
allow ast_add_extension2 to accept a NULL destructor (bug #4411)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5824 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4514,6 +4514,10 @@ static int ext_strncpy(char *dst, const char *src, int len) return count; } +static void null_datad(void *foo) +{ +} + /* * EBUSY - can't lock * EEXIST - extension with the same priority exist and no replace is set @@ -4560,6 +4564,8 @@ int ast_add_extension2(struct ast_context *con, length ++; /* Be optimistic: Build the extension structure first */ + if (datad == NULL) + datad = null_datad; tmp = malloc(length); if (tmp) { memset(tmp, 0, length); |