[asterisk-commits] russell: branch 1.6.0 r106301 - in /branches/1.6.0: ./ res/res_phoneprov.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 5 18:10:08 CST 2008


Author: russell
Date: Wed Mar  5 18:10:08 2008
New Revision: 106301

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106301
Log:
Merged revisions 105733 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r105733 | twilson | 2008-03-04 14:32:55 -0600 (Tue, 04 Mar 2008) | 2 lines

Set username to default to the category name if it isn't overridden by a usernmae= setting in users.conf

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/res/res_phoneprov.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar  5 18:10:08 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,106036,106040,106139
+/trunk:1-105595,105675,105677,105733,106036,106040,106139

Modified: branches/1.6.0/res/res_phoneprov.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/res/res_phoneprov.c?view=diff&rev=106301&r1=106300&r2=106301
==============================================================================
--- branches/1.6.0/res/res_phoneprov.c (original)
+++ branches/1.6.0/res/res_phoneprov.c Wed Mar  5 18:10:08 2008
@@ -705,7 +705,13 @@
 	for (i = 0; i < PP_VAR_LIST_LENGTH; i++) {
 		tmp = ast_variable_retrieve(cfg, name, pp_variable_list[i].user_var);
 
-		if (i == PP_TIMEZONE) {
+		/* If we didn't get a USERNAME variable, set it to the user->name */
+		if (i == PP_USERNAME && !tmp) {
+			if ((var = ast_var_assign(pp_variable_list[PP_USERNAME].template_var, user->name))) {
+				AST_LIST_INSERT_TAIL(user->headp, var, entries);
+			}
+			continue;
+		} else if (i == PP_TIMEZONE) {
 			/* perfectly ok if tmp is NULL, will set variables based on server's time zone */
 			set_timezone_variables(user->headp, tmp);
 		}




More information about the asterisk-commits mailing list