[asterisk-commits] branch oej/aum - r7363 in /team/oej/aum: configs/aum.conf.sample res/res_aum.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Dec 6 11:36:23 CST 2005


Author: oej
Date: Tue Dec  6 11:36:20 2005
New Revision: 7363

URL: http://svn.digium.com/view/asterisk?rev=7363&view=rev
Log:
Adding a configuration example

Added:
    team/oej/aum/configs/aum.conf.sample
Modified:
    team/oej/aum/res/res_aum.c

Added: team/oej/aum/configs/aum.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/aum/configs/aum.conf.sample?rev=7363&view=auto
==============================================================================
--- team/oej/aum/configs/aum.conf.sample (added)
+++ team/oej/aum/configs/aum.conf.sample Tue Dec  6 11:36:20 2005
@@ -1,0 +1,46 @@
+;AUM configuration file
+[general]
+test=test
+
+[groups]
+group=edvina
+group=digium
+
+[digium]
+type=group
+musicclass=digium-sales-pitch
+
+[edvina]
+type=group
+musicclass=edvina-slow
+
+[asteriskmanagers]
+type=group
+managerperm=system
+
+[admin]
+group=asteriskmanagers
+group=digium
+pincode=1235
+
+[nancy]
+pincode=1234
+group=asteriskmanagers
+group=edvina
+email=nancy.petterson at digium.com
+jabber=nancypet at digium.com
+mailbox=3000 at default
+mailboxcallback=3000 at sipusers
+exten=3000 at sipusers
+disacontext=disalocal
+callerid=Nancy Petterson <3000>
+accountcode=3000
+musicclass=nancy-music
+firstname=Nancy R.
+lastname=Petterson
+title=Sales mngr
+language=se
+timezone=GMT+1
+permit=123.12.12.12/255.255.255.0
+deny=123.132.23.123/255.255.255.0
+managerperm=write,read

Modified: team/oej/aum/res/res_aum.c
URL: http://svn.digium.com/view/asterisk/team/oej/aum/res/res_aum.c?rev=7363&r1=7362&r2=7363&view=diff
==============================================================================
--- team/oej/aum/res/res_aum.c (original)
+++ team/oej/aum/res/res_aum.c Tue Dec  6 11:36:20 2005
@@ -85,6 +85,7 @@
 
 	\par Currently these modules support AUM:
 		- none 
+
 	\par Modules that may benefit from implementing AUM
 		- all channel drivers
 		- app_disa.c
@@ -636,10 +637,6 @@
 	
 }
 
-//iconv_t	ichandler_utf8_to_iso88591;	/*!< libiconv handler from utf8 to iso8859-1 */
-//iconv_t	ichandler_iso88591_to_utf8;	/*!< libiconv handler from iso8859- to utf8 */
-// char *aum_string_output(aum_string *string, enum aum_string_charset charset);
-// aum_string *aum_string_add(char *string, enum aum_string_charset defaultcharset);
 
 /*------------------------- CONFIGURATION ------------------------------*/
 static struct aum_config_struct aum_config[] = {
@@ -852,13 +849,18 @@
 	enum aum_config_options option;
 
 	/* Check if username exists already */
+	if (aum_find_user(username)) {
+		ast_log(LOG_WARNING, "Ignoring duplicate user %s\n", username);
+		return NULL;
+	}
 
 	/* Allocate user */
 	user = aum_allocate(sizeof(struct aum_user));
 	if (!user) {
 		ast_log(LOG_WARNING, "Can't allocate AUM user memory\n");
-		return 0;
-	}
+		return NULL;
+	}
+
 	if (realtime)
 		aum_real_users++;
 	else



More information about the asterisk-commits mailing list