[asterisk-bugs] [Asterisk 0012275]: add support for setting individual contexts in users.conf
noreply at bugs.digium.com
noreply at bugs.digium.com
Mon Mar 24 09:31:43 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=12275
======================================================================
Reported By: sespindola
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 12275
Category: PBX/pbx_config
Reproducibility: always
Severity: feature
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 110606
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 03-21-2008 18:48 CDT
Last Modified: 03-24-2008 09:31 CDT
======================================================================
Summary: add support for setting individual contexts in
users.conf
Description:
Right now, as far as I know, the only way to configure a context for users
is to set "userscontext=mynewcontext" in the general section of
extensions.conf.
Due to a project I'm currently working on, a need has arised to separate
users
into multiple contexts. So I hacked together this patch that recognizes
the
"context=" configuration option in each user entry and, if present,
registers
the user into that context.
If the user doesn't have a context= option, the value of userscontext is
set.
======================================================================
----------------------------------------------------------------------
qwell - 03-24-08 09:31
----------------------------------------------------------------------
+ usercontext = ast_calloc(1, 256);
+ usercontext = ast_variable_retrieve(cfg, cat, "context");
You're setting it, and then immediately setting it to something else,
leaking 256 bytes.
Also, I really dislike the whole "usercontext" vs "userscontext" thing.
Issue History
Date Modified Username Field Change
======================================================================
03-24-08 09:31 qwell Note Added: 0084440
======================================================================
More information about the asterisk-bugs
mailing list