[Home]

Summary:ASTERISK-10520: [patch] default context is created even if users.conf does not have users
Reporter:Dmitry Andrianov (dimas)Labels:
Date Opened:2007-10-13 18:41:14Date Closed:2007-10-14 10:14:14
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_config
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbxconfig.patch
Description:pbx_config.c creates user context (usually 'default') too early before it makes sure there is at least one user defined. If extensions.ael has definition for 'default context, then depending on order in which modules are loaded, two 'default' will be created by different registrars.

Presence of two 'default' contexts one of them is empty usually breaks alot of things. Again, depending on order in which modules were loaded.

****** ADDITIONAL INFORMATION ******

I'm providing a patch which makes context creation "lazy" operation - that is context is only created when pbx_config is about to register user into the context.

This solves problem for me, but IMHO it is still an issue two contexts with the same name can be created. IMHO pbx_ael should try finding if context already exist before creating it. However this may cause other problems. I'm not sure about this.
Comments:By: Digium Subversion (svnbot) 2007-10-14 10:04:12

Repository: asterisk
Revision: 85540

U   branches/1.4/pbx/pbx_config.c

------------------------------------------------------------------------
r85540 | russell | 2007-10-14 10:04:11 -0500 (Sun, 14 Oct 2007) | 7 lines

Don't create the context for users in users.conf until we know at least one user exists.

(closes issue ASTERISK-10520)
Reported by: dimas
Patches:
     pbxconfig.patch uploaded by dimas (license 88)

------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-10-14 10:14:14

Repository: asterisk
Revision: 85541

_U  trunk/
U   trunk/pbx/pbx_config.c

------------------------------------------------------------------------
r85541 | russell | 2007-10-14 10:14:14 -0500 (Sun, 14 Oct 2007) | 15 lines

Merged revisions 85540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85540 | russell | 2007-10-14 10:24:52 -0500 (Sun, 14 Oct 2007) | 7 lines

Don't create the context for users in users.conf until we know at least one user exists.

(closes issue ASTERISK-10520)
Reported by: dimas
Patches:
     pbxconfig.patch uploaded by dimas (license 88)

........

------------------------------------------------------------------------