[asterisk-commits] branch oej/strictrouting r9099 - in /team/oej/strictrouting: ./ agi/ apps/ cd...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 2 12:33:59 MST 2006


Author: oej
Date: Thu Feb  2 13:32:51 2006
New Revision: 9099

URL: http://svn.digium.com/view/asterisk?rev=9099&view=rev
Log:
Merged revisions 9001,9004,9013,9034,9046-9047,9052,9057,9059-9060,9065,9071-9072,9085,9087-9088 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r9001 | russell | 2006-01-31 18:18:58 +0100 (Tue, 31 Jan 2006) | 3 lines

define a global null_frame object so when queueing a null frame, you don't
have to allocate one on the stack

................
r9004 | russell | 2006-01-31 18:57:12 +0100 (Tue, 31 Jan 2006) | 2 lines

remove some more local declarations of null frames

................
r9013 | oej | 2006-01-31 19:40:07 +0100 (Tue, 31 Jan 2006) | 3 lines

Optimize settings of defaults for a new peer object and make sure
we set the same defaults for autocreated peers and other peers.

................
r9034 | oej | 2006-02-01 14:23:59 +0100 (Wed, 01 Feb 2006) | 3 lines

- Clarify default setting of canreinvite (thanks royk)
- Add some extra headers and reference to other doc/ files for realtime

................
r9046 | oej | 2006-02-01 18:16:08 +0100 (Wed, 01 Feb 2006) | 6 lines

- Adding a doc/00README.1st with an INDEX over README files
- Moving files from / to /doc or /configs
- Renaming some documentation files

Thank you for the initiative, manxpower!

................
r9047 | oej | 2006-02-01 18:49:02 +0100 (Wed, 01 Feb 2006) | 3 lines

- Removing the "README." from the name of the README files.


................
r9052 | mogorman | 2006-02-01 19:39:41 +0100 (Wed, 01 Feb 2006) | 3 lines

Allows for user to uninstall asterisk binaries
bug 6177

................
r9057 | oej | 2006-02-01 20:16:09 +0100 (Wed, 01 Feb 2006) | 5 lines

- Update URL to digium store
- Remove X100p and S100u
- Add mISDN
- remove ISDN4Linux 

................
r9059 | mogorman | 2006-02-01 21:40:45 +0100 (Wed, 01 Feb 2006) | 3 lines

reports why an agi script errors out on opening
file

................
r9060 | kpfleming | 2006-02-02 00:05:28 +0100 (Thu, 02 Feb 2006) | 6 lines

use string fields for some stuff in ast_channel
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches

................
r9065 | oej | 2006-02-02 15:04:29 +0100 (Thu, 02 Feb 2006) | 2 lines

Issue #6383 - Crash on CLI originate with missing channel argument

................
r9071 | mattf | 2006-02-02 17:09:01 +0100 (Thu, 02 Feb 2006) | 2 lines

Fix for very unlikely memory leak in res_odbc

................
r9072 | mattf | 2006-02-02 17:09:38 +0100 (Thu, 02 Feb 2006) | 2 lines

Fix so that hardhdlc works w/ chan_zap

................
r9085 | mattf | 2006-02-02 19:33:23 +0100 (Thu, 02 Feb 2006) | 2 lines

More stringfield related changes

................
r9087 | kpfleming | 2006-02-02 19:40:06 +0100 (Thu, 02 Feb 2006) | 2 lines

block patch that has already been merged

................
r9088 | kpfleming | 2006-02-02 19:40:22 +0100 (Thu, 02 Feb 2006) | 10 lines

Merged revisions 9086 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9086 | kpfleming | 2006-02-02 12:37:04 -0600 (Thu, 02 Feb 2006) | 2 lines

don't override ASTERISKVERSIONNUM to 000000 for non-svn builds

........

................

Added:
    team/oej/strictrouting/configs/muted.conf.sample
      - copied unchanged from r9088, trunk/configs/muted.conf.sample
    team/oej/strictrouting/doc/00README.1st
      - copied unchanged from r9088, trunk/doc/00README.1st
    team/oej/strictrouting/doc/ael.txt
      - copied unchanged from r9088, trunk/doc/ael.txt
    team/oej/strictrouting/doc/app-sms.txt
      - copied unchanged from r9088, trunk/doc/app-sms.txt
    team/oej/strictrouting/doc/asterisk-conf.txt
      - copied unchanged from r9088, trunk/doc/asterisk-conf.txt
    team/oej/strictrouting/doc/backtrace.txt
      - copied unchanged from r9088, trunk/doc/backtrace.txt
    team/oej/strictrouting/doc/billing.txt
      - copied unchanged from r9088, trunk/doc/billing.txt
    team/oej/strictrouting/doc/callingpres.txt
      - copied unchanged from r9088, trunk/doc/callingpres.txt
    team/oej/strictrouting/doc/cdrdriver.txt
      - copied unchanged from r9088, trunk/doc/cdrdriver.txt
    team/oej/strictrouting/doc/chaniax.txt
      - copied unchanged from r9088, trunk/doc/chaniax.txt
    team/oej/strictrouting/doc/channels.txt
      - copied unchanged from r9088, trunk/doc/channels.txt
    team/oej/strictrouting/doc/channelvariables.txt
      - copied unchanged from r9088, trunk/doc/channelvariables.txt
    team/oej/strictrouting/doc/cliprompt.txt
      - copied unchanged from r9088, trunk/doc/cliprompt.txt
    team/oej/strictrouting/doc/configuration.txt
      - copied unchanged from r9088, trunk/doc/configuration.txt
    team/oej/strictrouting/doc/cygwin.txt
      - copied unchanged from r9088, trunk/doc/cygwin.txt
    team/oej/strictrouting/doc/dundi.txt
      - copied unchanged from r9088, trunk/doc/dundi.txt
    team/oej/strictrouting/doc/enum.txt
      - copied unchanged from r9088, trunk/doc/enum.txt
    team/oej/strictrouting/doc/extconfig.txt
      - copied unchanged from r9088, trunk/doc/extconfig.txt
    team/oej/strictrouting/doc/externalivr.txt
      - copied unchanged from r9088, trunk/doc/externalivr.txt
    team/oej/strictrouting/doc/freetds.txt
      - copied unchanged from r9088, trunk/doc/freetds.txt
    team/oej/strictrouting/doc/h323.txt
      - copied unchanged from r9088, trunk/doc/h323.txt
    team/oej/strictrouting/doc/hardware.txt
      - copied unchanged from r9088, trunk/doc/hardware.txt
    team/oej/strictrouting/doc/ices.txt
      - copied unchanged from r9088, trunk/doc/ices.txt
    team/oej/strictrouting/doc/jitterbuffer.txt
      - copied unchanged from r9088, trunk/doc/jitterbuffer.txt
    team/oej/strictrouting/doc/linkedlists.txt
      - copied unchanged from r9088, trunk/doc/linkedlists.txt
    team/oej/strictrouting/doc/math.txt
      - copied unchanged from r9088, trunk/doc/math.txt
    team/oej/strictrouting/doc/misdn.txt
      - copied unchanged from r9088, trunk/doc/misdn.txt
    team/oej/strictrouting/doc/mp3.txt
      - copied unchanged from r9088, trunk/doc/mp3.txt
    team/oej/strictrouting/doc/musiconhold-fpm.txt
      - copied unchanged from r9088, trunk/doc/musiconhold-fpm.txt
    team/oej/strictrouting/doc/mysql.txt
      - copied unchanged from r9088, trunk/doc/mysql.txt
    team/oej/strictrouting/doc/odbcstorage.txt
      - copied unchanged from r9088, trunk/doc/odbcstorage.txt
    team/oej/strictrouting/doc/privacy.txt
      - copied unchanged from r9088, trunk/doc/privacy.txt
    team/oej/strictrouting/doc/realtime.txt
      - copied unchanged from r9088, trunk/doc/realtime.txt
    team/oej/strictrouting/doc/security.txt
      - copied unchanged from r9088, trunk/doc/security.txt
    team/oej/strictrouting/doc/sms.txt
      - copied unchanged from r9088, trunk/doc/sms.txt
Removed:
    team/oej/strictrouting/HARDWARE
    team/oej/strictrouting/README.fpm
    team/oej/strictrouting/SECURITY
    team/oej/strictrouting/doc/README.ael
    team/oej/strictrouting/doc/README.app_sms
    team/oej/strictrouting/doc/README.asterisk.conf
    team/oej/strictrouting/doc/README.backtrace
    team/oej/strictrouting/doc/README.callingpres
    team/oej/strictrouting/doc/README.cdr
    team/oej/strictrouting/doc/README.channels
    team/oej/strictrouting/doc/README.cliprompt
    team/oej/strictrouting/doc/README.configuration
    team/oej/strictrouting/doc/README.cygwin
    team/oej/strictrouting/doc/README.dundi
    team/oej/strictrouting/doc/README.enum
    team/oej/strictrouting/doc/README.extconfig
    team/oej/strictrouting/doc/README.externalivr
    team/oej/strictrouting/doc/README.h323
    team/oej/strictrouting/doc/README.iax
    team/oej/strictrouting/doc/README.ices
    team/oej/strictrouting/doc/README.jitterbuffer
    team/oej/strictrouting/doc/README.linkedlists
    team/oej/strictrouting/doc/README.math
    team/oej/strictrouting/doc/README.misdn
    team/oej/strictrouting/doc/README.mp3
    team/oej/strictrouting/doc/README.mysql
    team/oej/strictrouting/doc/README.odbcstorage
    team/oej/strictrouting/doc/README.privacy
    team/oej/strictrouting/doc/README.realtime
    team/oej/strictrouting/doc/README.sms
    team/oej/strictrouting/doc/README.tds
    team/oej/strictrouting/doc/README.variables
    team/oej/strictrouting/doc/cdr.txt
    team/oej/strictrouting/muted.conf.sample
Modified:
    team/oej/strictrouting/   (props changed)
    team/oej/strictrouting/.cleancount
    team/oej/strictrouting/Makefile
    team/oej/strictrouting/agi/Makefile
    team/oej/strictrouting/apps/Makefile
    team/oej/strictrouting/apps/app_dial.c
    team/oej/strictrouting/apps/app_disa.c
    team/oej/strictrouting/apps/app_dumpchan.c
    team/oej/strictrouting/apps/app_flash.c
    team/oej/strictrouting/apps/app_meetme.c
    team/oej/strictrouting/apps/app_queue.c
    team/oej/strictrouting/apps/app_softhangup.c
    team/oej/strictrouting/apps/app_transfer.c
    team/oej/strictrouting/apps/app_voicemail.c
    team/oej/strictrouting/apps/app_zapbarge.c
    team/oej/strictrouting/apps/app_zapras.c
    team/oej/strictrouting/apps/app_zapscan.c
    team/oej/strictrouting/cdr.c
    team/oej/strictrouting/cdr/Makefile
    team/oej/strictrouting/channel.c
    team/oej/strictrouting/channels/Makefile
    team/oej/strictrouting/channels/chan_agent.c
    team/oej/strictrouting/channels/chan_alsa.c
    team/oej/strictrouting/channels/chan_features.c
    team/oej/strictrouting/channels/chan_h323.c
    team/oej/strictrouting/channels/chan_iax2.c
    team/oej/strictrouting/channels/chan_local.c
    team/oej/strictrouting/channels/chan_mgcp.c
    team/oej/strictrouting/channels/chan_misdn.c
    team/oej/strictrouting/channels/chan_nbs.c
    team/oej/strictrouting/channels/chan_oss.c
    team/oej/strictrouting/channels/chan_phone.c
    team/oej/strictrouting/channels/chan_sip.c
    team/oej/strictrouting/channels/chan_skinny.c
    team/oej/strictrouting/channels/chan_zap.c
    team/oej/strictrouting/channels/iax2-parser.c
    team/oej/strictrouting/channels/iax2-parser.h
    team/oej/strictrouting/cli.c
    team/oej/strictrouting/codecs/Makefile
    team/oej/strictrouting/configs/sip.conf.sample
    team/oej/strictrouting/formats/Makefile
    team/oej/strictrouting/frame.c
    team/oej/strictrouting/funcs/Makefile
    team/oej/strictrouting/funcs/func_language.c
    team/oej/strictrouting/funcs/func_moh.c
    team/oej/strictrouting/image.c
    team/oej/strictrouting/include/asterisk/cdr.h
    team/oej/strictrouting/include/asterisk/channel.h
    team/oej/strictrouting/include/asterisk/frame.h
    team/oej/strictrouting/include/asterisk/image.h
    team/oej/strictrouting/include/asterisk/musiconhold.h
    team/oej/strictrouting/include/asterisk/stringfields.h
    team/oej/strictrouting/pbx.c
    team/oej/strictrouting/pbx/Makefile
    team/oej/strictrouting/res/Makefile
    team/oej/strictrouting/res/res_agi.c
    team/oej/strictrouting/res/res_clioriginate.c
    team/oej/strictrouting/res/res_features.c
    team/oej/strictrouting/res/res_musiconhold.c
    team/oej/strictrouting/res/res_odbc.c
    team/oej/strictrouting/rtp.c
    team/oej/strictrouting/stdtime/Makefile
    team/oej/strictrouting/udptl.c
    team/oej/strictrouting/utils/Makefile

Propchange: team/oej/strictrouting/
------------------------------------------------------------------------------
--- svnmerge-blocked (original)
+++ svnmerge-blocked Thu Feb  2 13:32:51 2006
@@ -1,1 +1,1 @@
-/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112,8124,8134,8394,8412,8414,8418,8429,8433,8445,8562,8573,8600,8619,8666,8808
+/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112,8124,8134,8394,8412,8414,8418,8429,8433,8445,8562,8573,8600,8619,8666,8808,9073

Propchange: team/oej/strictrouting/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb  2 13:32:51 2006
@@ -1,1 +1,1 @@
-/trunk:1-8992
+/trunk:1-9097

Modified: team/oej/strictrouting/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/.cleancount?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/.cleancount (original)
+++ team/oej/strictrouting/.cleancount Thu Feb  2 13:32:51 2006
@@ -1,1 +1,1 @@
-9
+10

Modified: team/oej/strictrouting/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/Makefile?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/Makefile (original)
+++ team/oej/strictrouting/Makefile Thu Feb  2 13:32:51 2006
@@ -327,8 +327,6 @@
   ifneq ($(wildcard .svn),)
     ASTERISKVERSIONNUM=999999
     ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
-  else
-    ASTERISKVERSIONNUM=000000
   endif
 endif
 
@@ -912,3 +910,37 @@
 	if cmp -s .cleancount .lastclean ; then echo ; else \
 		$(MAKE) clean; cp -f .cleancount .lastclean;\
 	fi
+
+_uninstall:
+	rm -f $(DESTDIR)$(MODULES_DIR)/*
+	rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
+	rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
+	rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
+	rm -rf $(DESTDIR)$(ASTHEADERDIR)
+	rm -rf $(DESTDIR)$(ASTVARLIBDIR)/sounds
+	rm -rf $(DESTDIR)$(ASTVARLIBDIR)/firmware
+	rm -rf $(DESTDIR)$(ASTMANDIR)/man8
+	for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
+
+uninstall: _uninstall
+	@echo " +--------- Asterisk Uninstall Complete -----+"  
+	@echo " + Asterisk binaries, sounds, man pages,     +"  
+	@echo " + headers, modules, and firmware builds,    +"  
+	@echo " + have all been uninstalled.                +"  
+	@echo " +                                           +"
+	@echo " + To remove ALL traces of Asterisk,         +"
+	@echo " + including configuration, spool            +"
+	@echo " + directories, and logs, run the following  +"
+	@echo " + command:                                  +"
+	@echo " +                                           +"
+	@echo " +            $(MAKE) uninstall-all             +"  
+	@echo " +-------------------------------------------+"  
+
+
+uninstall-all: _uninstall
+	rm -rf $(DESTDIR)$(ASTLIBDIR)
+	rm -rf $(DESTDIR)$(ASTVARLIBDIR)
+	rm -rf $(DESTDIR)$(ASTSPOOLDIR)
+	rm -rf $(DESTDIR)$(ASTETCDIR)
+	rm -rf $(DESTDIR)$(ASTLOGDIR)
+	

Modified: team/oej/strictrouting/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/agi/Makefile?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/agi/Makefile (original)
+++ team/oej/strictrouting/agi/Makefile Thu Feb  2 13:32:51 2006
@@ -30,6 +30,9 @@
 	mkdir -p $(DESTDIR)$(AGI_DIR)
 	for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
 
+uninstall:
+	for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
+
 eagi-test: eagi-test.o
 	$(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS)
 

Modified: team/oej/strictrouting/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/Makefile?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/Makefile (original)
+++ team/oej/strictrouting/apps/Makefile Thu Feb  2 13:32:51 2006
@@ -92,6 +92,8 @@
 	rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
 	rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
 
+uninstall:
+
 app_curl.so: app_curl.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
 

Modified: team/oej/strictrouting/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_dial.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_dial.c (original)
+++ team/oej/strictrouting/apps/app_dial.c Thu Feb  2 13:32:51 2006
@@ -58,6 +58,7 @@
 #include "asterisk/rtp.h"
 #include "asterisk/manager.h"
 #include "asterisk/privacy.h"
+#include "asterisk/stringfields.h"
 
 static char *tdesc = "Dialing Application";
 
@@ -498,7 +499,7 @@
 							else
 								newcid = in->exten;
 							o->chan->cid.cid_num = strdup(newcid);
-							ast_copy_string(o->chan->accountcode, winner->accountcode, sizeof(o->chan->accountcode));
+							ast_string_field_set(o->chan, accountcode, winner->accountcode);
 							o->chan->cdrflags = winner->cdrflags;
 							if (!o->chan->cid.cid_num)
 								ast_log(LOG_WARNING, "Out of memory\n");
@@ -513,7 +514,7 @@
 								if (!o->chan->cid.cid_name)
 									ast_log(LOG_WARNING, "Out of memory\n");	
 							}
-							ast_copy_string(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode));
+							ast_string_field_set(o->chan, accountcode, in->accountcode);
 							o->chan->cdrflags = in->cdrflags;
 						}
 
@@ -1089,11 +1090,11 @@
 			tmp->chan->cid.cid_ani = strdup(chan->cid.cid_ani);
 		
 		/* Copy language from incoming to outgoing */
-		ast_copy_string(tmp->chan->language, chan->language, sizeof(tmp->chan->language));
-		ast_copy_string(tmp->chan->accountcode, chan->accountcode, sizeof(tmp->chan->accountcode));
+		ast_string_field_set(tmp->chan, language, chan->language);
+		ast_string_field_set(tmp->chan, accountcode, chan->accountcode);
 		tmp->chan->cdrflags = chan->cdrflags;
 		if (ast_strlen_zero(tmp->chan->musicclass))
-			ast_copy_string(tmp->chan->musicclass, chan->musicclass, sizeof(tmp->chan->musicclass));
+			ast_string_field_set(tmp->chan, musicclass, chan->musicclass);
 		if (chan->cid.cid_rdnis)
 			tmp->chan->cid.cid_rdnis = strdup(chan->cid.cid_rdnis);
 		/* Pass callingpres setting */

Modified: team/oej/strictrouting/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_disa.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_disa.c (original)
+++ team/oej/strictrouting/apps/app_disa.c Thu Feb  2 13:32:51 2006
@@ -47,6 +47,7 @@
 #include "asterisk/translate.h"
 #include "asterisk/ulaw.h"
 #include "asterisk/callerid.h"
+#include "asterisk/stringfields.h"
 
 static char *tdesc = "DISA (Direct Inward System Access) Application";
 
@@ -347,7 +348,7 @@
 			}
 
 			if (!ast_strlen_zero(acctcode))
-				ast_copy_string(chan->accountcode, acctcode, sizeof(chan->accountcode));
+				ast_string_field_set(chan, accountcode, acctcode);
 
 			if (special_noanswer) flags.flags = 0;
 			ast_cdr_reset(chan->cdr, &flags);

Modified: team/oej/strictrouting/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_dumpchan.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_dumpchan.c (original)
+++ team/oej/strictrouting/apps/app_dumpchan.c Thu Feb  2 13:32:51 2006
@@ -106,7 +106,7 @@
 			 "Data=               %s\n"
 			 "Blocking_in=        %s\n",
 			 c->name,
-			 c->type,
+			 c->tech->type,
 			 c->uniqueid,
 			 (c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
 			 (c->cid.cid_name ? c->cid.cid_name : "(N/A)"),

Modified: team/oej/strictrouting/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_flash.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_flash.c (original)
+++ team/oej/strictrouting/apps/app_flash.c Thu Feb  2 13:32:51 2006
@@ -82,7 +82,7 @@
 	struct localuser *u;
 	struct zt_params ztp;
 	LOCAL_USER_ADD(u);
-	if (!strcasecmp(chan->type, "Zap")) {
+	if (!strcasecmp(chan->tech->type, "Zap")) {
 		memset(&ztp, 0, sizeof(ztp));
 		res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
 		if (!res) {

Modified: team/oej/strictrouting/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_meetme.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_meetme.c (original)
+++ team/oej/strictrouting/apps/app_meetme.c Thu Feb  2 13:32:51 2006
@@ -206,7 +206,6 @@
 };
 
 static int admin_exec(struct ast_channel *chan, void *data);
-static struct ast_frame null_frame = { AST_FRAME_NULL, };
 
 static void *recordthread(void *args);
 
@@ -997,7 +996,7 @@
 	}
 
 	ast_indicate(chan, -1);
-	retryzap = strcasecmp(chan->type, "Zap");
+	retryzap = strcasecmp(chan->tech->type, "Zap");
 	user->zapchannel = !retryzap;
 
  zapretry:
@@ -1303,7 +1302,7 @@
 						using_pseudo = 0;
 					}
 					ast_log(LOG_DEBUG, "Ooh, something swapped out under us, starting over\n");
-					retryzap = strcasecmp(c->type, "Zap");
+					retryzap = strcasecmp(c->tech->type, "Zap");
 					user->zapchannel = !retryzap;
 					goto zapretry;
 				}
@@ -1574,7 +1573,7 @@
 								if (conf->transpath[index]) {
 									conf->transframe[index] = ast_translate(conf->transpath[index], conf->origframe, 0);
 									if (!conf->transframe[index])
-										conf->transframe[index] = &null_frame;
+										conf->transframe[index] = &ast_null_frame;
 								}
 							}
 						}

Modified: team/oej/strictrouting/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_queue.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_queue.c (original)
+++ team/oej/strictrouting/apps/app_queue.c Thu Feb  2 13:32:51 2006
@@ -91,6 +91,7 @@
 #include "asterisk/causes.h"
 #include "asterisk/astdb.h"
 #include "asterisk/devicestate.h"
+#include "asterisk/stringfields.h"
 
 #define QUEUE_STRATEGY_RINGALL		0
 #define QUEUE_STRATEGY_ROUNDROBIN	1
@@ -1735,7 +1736,7 @@
 							if (!o->chan->cid.cid_name)
 								ast_log(LOG_WARNING, "Out of memory\n");	
 						}
-						ast_copy_string(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode));
+						ast_string_field_set(o->chan, accountcode, in->accountcode);
 						o->chan->cdrflags = in->cdrflags;
 
 						if (in->cid.cid_ani) {
@@ -2182,9 +2183,9 @@
 		   we will always return with -1 so that it is hung up properly after the 
 		   conversation.  */
 		qe->handled++;
-		if (!strcmp(qe->chan->type,"Zap"))
+		if (!strcmp(qe->chan->tech->type, "Zap"))
 			ast_channel_setoption(qe->chan, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
-		if (!strcmp(peer->type,"Zap"))
+		if (!strcmp(peer->tech->type, "Zap"))
 			ast_channel_setoption(peer, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
 		/* Update parameters for the queue */
 		recalc_holdtime(qe);

Modified: team/oej/strictrouting/apps/app_softhangup.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_softhangup.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_softhangup.c (original)
+++ team/oej/strictrouting/apps/app_softhangup.c Thu Feb  2 13:32:51 2006
@@ -84,7 +84,7 @@
 		/* XXX watch out, i think it is wrong to access c-> after unlocking! */
 		if (all) {
 			/* CAPI is set up like CAPI[foo/bar]/clcnt */ 
-			if (!strcmp(c->type,"CAPI")) 
+			if (!strcmp(c->tech->type, "CAPI")) 
 				cut = strrchr(name,'/');
 			/* Basically everything else is Foo/Bar-Z */
 			else

Modified: team/oej/strictrouting/apps/app_transfer.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_transfer.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_transfer.c (original)
+++ team/oej/strictrouting/apps/app_transfer.c Thu Feb  2 13:32:51 2006
@@ -113,7 +113,7 @@
 		tech = dest;
 		dest = slash + 1;
 		/* Allow execution only if the Tech/destination agrees with the type of the channel */
-		if (strncasecmp(chan->type, tech, len)) {
+		if (strncasecmp(chan->tech->type, tech, len)) {
 			pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE");
 			LOCAL_USER_REMOVE(u);
 			return 0;

Modified: team/oej/strictrouting/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_voicemail.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_voicemail.c (original)
+++ team/oej/strictrouting/apps/app_voicemail.c Thu Feb  2 13:32:51 2006
@@ -72,6 +72,7 @@
 #include "asterisk/localtime.h"
 #include "asterisk/cli.h"
 #include "asterisk/utils.h"
+#include "asterisk/stringfields.h"
 #ifdef USE_ODBC_STORAGE
 #include "asterisk/res_odbc.h"
 #endif
@@ -2655,7 +2656,7 @@
 }
 
 
-static int say_and_wait(struct ast_channel *chan, int num, char *language)
+static int say_and_wait(struct ast_channel *chan, int num, const char *language)
 {
 	int d;
 	d = ast_say_number(chan, num, AST_DIGIT_ANY, language, (char *) NULL);
@@ -5150,7 +5151,7 @@
 	
 	/* Set language from config to override channel language */
 	if (!ast_strlen_zero(vmu->language))
-		ast_copy_string(chan->language, vmu->language, sizeof(chan->language));
+		ast_string_field_set(chan, language, vmu->language);
 	create_dirpath(vms.curdir, sizeof(vms.curdir), vmu->context, vms.username, "");
 	/* Retrieve old and new message counts */
 	res = open_mailbox(&vms, vmu, 1);

Modified: team/oej/strictrouting/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_zapbarge.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_zapbarge.c (original)
+++ team/oej/strictrouting/apps/app_zapbarge.c Thu Feb  2 13:32:51 2006
@@ -131,7 +131,7 @@
 		goto outrun;
 	}
 	ast_indicate(chan, -1);
-	retryzap = strcasecmp(chan->type, "Zap");
+	retryzap = strcasecmp(chan->tech->type, "Zap");
 zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {

Modified: team/oej/strictrouting/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_zapras.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_zapras.c (original)
+++ team/oej/strictrouting/apps/app_zapras.c Thu Feb  2 13:32:51 2006
@@ -217,7 +217,7 @@
 	/* Answer the channel if it's not up */
 	if (chan->_state != AST_STATE_UP)
 		ast_answer(chan);
-	if (strcasecmp(chan->type, "Zap")) {
+	if (strcasecmp(chan->tech->type, "Zap")) {
 		/* If it's not a zap channel, we're done.  Wait a couple of
 		   seconds and then hangup... */
 		if (option_verbose > 1)

Modified: team/oej/strictrouting/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/apps/app_zapscan.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/apps/app_zapscan.c (original)
+++ team/oej/strictrouting/apps/app_zapscan.c Thu Feb  2 13:32:51 2006
@@ -137,7 +137,7 @@
 		goto outrun;
 	}
 	ast_indicate(chan, -1);
-	retryzap = strcasecmp(chan->type, "Zap");
+	retryzap = strcasecmp(chan->tech->type, "Zap");
  zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {
@@ -345,7 +345,7 @@
 				continue;
 			}
 		}
-		if ( tempchan && tempchan->type && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) {
+		if (tempchan && (!strcmp(tempchan->tech->type, "Zap")) && (tempchan != chan) ) {
 			ast_verbose(VERBOSE_PREFIX_3 "Zap channel %s is in-use, monitoring...\n", tempchan->name);
 			ast_copy_string(confstr, tempchan->name, sizeof(confstr));
 			ast_mutex_unlock(&tempchan->lock);

Modified: team/oej/strictrouting/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/cdr.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/cdr.c (original)
+++ team/oej/strictrouting/cdr.c Thu Feb  2 13:32:51 2006
@@ -54,6 +54,7 @@
 #include "asterisk/config.h"
 #include "asterisk/cli.h"
 #include "asterisk/module.h"
+#include "asterisk/stringfields.h"
 
 /*! Default AMA flag for billing records (CDR's) */
 int ast_default_amaflags = AST_CDR_DOCUMENTATION;
@@ -535,7 +536,7 @@
 	return res;
 }
 
-void ast_cdr_setdestchan(struct ast_cdr *cdr, char *chann)
+void ast_cdr_setdestchan(struct ast_cdr *cdr, const char *chann)
 {
 	char *chan; 
 
@@ -682,7 +683,7 @@
 {
 	struct ast_cdr *cdr = chan->cdr;
 
-	ast_copy_string(chan->accountcode, account, sizeof(chan->accountcode));
+	ast_string_field_set(chan, accountcode, account);
 	while (cdr) {
 		if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
 			ast_copy_string(cdr->accountcode, chan->accountcode, sizeof(cdr->accountcode));

Modified: team/oej/strictrouting/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/cdr/Makefile?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/cdr/Makefile (original)
+++ team/oej/strictrouting/cdr/Makefile Thu Feb  2 13:32:51 2006
@@ -112,6 +112,8 @@
 install: all
 	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
+uninstall:
+
 clean:
 	rm -f *.so *.o .depend
 

Modified: team/oej/strictrouting/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/channel.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/channel.c (original)
+++ team/oej/strictrouting/channel.c Thu Feb  2 13:32:51 2006
@@ -604,6 +604,8 @@
 		return NULL;
 	}
 	
+	ast_string_field_init(tmp, 128);
+
 	/* Don't bother initializing the last two FD here, because they
 	   will *always* be set just a few lines down (AST_TIMING_FD,
 	   AST_ALERT_FD). */
@@ -642,7 +644,7 @@
 	tmp->fds[AST_ALERT_FD] = tmp->alertpipe[0];
 	/* And timing pipe */
 	tmp->fds[AST_TIMING_FD] = tmp->timingfd;
-	strcpy(tmp->name, "**Unknown**");
+	ast_string_field_set(tmp, name, "**Unknown**");
 	/* Initial state */
 	tmp->_state = AST_STATE_DOWN;
 	tmp->streamid = -1;
@@ -657,11 +659,11 @@
 	ast_mutex_init(&tmp->lock);
 	AST_LIST_HEAD_INIT_NOLOCK(headp);
 	strcpy(tmp->context, "default");
-	ast_copy_string(tmp->language, defaultlanguage, sizeof(tmp->language));
+	ast_string_field_set(tmp, language, defaultlanguage);
 	strcpy(tmp->exten, "s");
 	tmp->priority = 1;
 	tmp->amaflags = ast_default_amaflags;
-	ast_copy_string(tmp->accountcode, ast_default_accountcode, sizeof(tmp->accountcode));
+	ast_string_field_set(tmp, accountcode, ast_default_accountcode);
 
 	tmp->tech = &null_tech;
 
@@ -1760,17 +1762,13 @@
 	void *data;
 	int res;
 #endif
-	static struct ast_frame null_frame = {
-		AST_FRAME_NULL,
-	};
-	
 	ast_mutex_lock(&chan->lock);
 	if (chan->masq) {
 		if (ast_do_masquerade(chan)) {
 			ast_log(LOG_WARNING, "Failed to perform masquerade\n");
 			f = NULL;
 		} else
-			f =  &null_frame;
+			f =  &ast_null_frame;
 		ast_mutex_unlock(&chan->lock);
 		return f;
 	}
@@ -1838,8 +1836,7 @@
 				chan->timingdata = NULL;
 				ast_mutex_unlock(&chan->lock);
 			}
-			f =  &null_frame;
-			return f;
+			return &ast_null_frame;
 		} else
 			ast_log(LOG_NOTICE, "No/unknown event '%d' on timer for '%s'?\n", blah, chan->name);
 	} else
@@ -1851,8 +1848,7 @@
 		chan->generatordata = NULL;     /* reset to let ast_write get through */
 		chan->generator->generate(chan, tmp, -1, -1);
 		chan->generatordata = tmp;
-		f = &null_frame;
-		return f;
+		return &ast_null_frame;
 	}
 
 	/* Check for pending read queue */
@@ -1872,7 +1868,7 @@
 				f = chan->tech->exception(chan);
 			else {
 				ast_log(LOG_WARNING, "Exception flag set on '%s', but no exception handler\n", chan->name);
-				f = &null_frame;
+				f = &ast_null_frame;
 			}
 			/* Clear the exception flag */
 			ast_clear_flag(chan, AST_FLAG_EXCEPTION);
@@ -1898,7 +1894,7 @@
 			if (f->subclass == AST_CONTROL_ANSWER) {
 				if (prestate == AST_STATE_UP) {
 					ast_log(LOG_DEBUG, "Dropping duplicate answer!\n");
-					f = &null_frame;
+					f = &ast_null_frame;
 				}
 				/* Answer the CDR */
 				ast_setstate(chan, AST_STATE_UP);
@@ -1912,7 +1908,7 @@
 					chan->dtmfq[strlen(chan->dtmfq)] = f->subclass;
 				else
 					ast_log(LOG_WARNING, "Dropping deferred DTMF digits on %s\n", chan->name);
-				f = &null_frame;
+				f = &ast_null_frame;
 			}
 			break;
 		case AST_FRAME_DTMF_BEGIN:
@@ -1924,14 +1920,14 @@
 		case AST_FRAME_VOICE:
 			if (dropaudio) {
 				ast_frfree(f);
-				f = &null_frame;
+				f = &ast_null_frame;
 			} else if (!(f->subclass & chan->nativeformats)) {
 				/* This frame can't be from the current native formats -- drop it on the
 				   floor */
 				ast_log(LOG_NOTICE, "Dropping incompatible voice frame on %s of format %s since our native format has changed to %s\n",
 					chan->name, ast_getformatname(f->subclass), ast_getformatname(chan->nativeformats));
 				ast_frfree(f);
-				f = &null_frame;
+				f = &ast_null_frame;
 			} else {
 				if (chan->spies)
 					queue_frame_to_spies(chan, f, SPY_READ);
@@ -1962,7 +1958,7 @@
 
 				if (chan->readtrans) {
 					if (!(f = ast_translate(chan->readtrans, f, 1)))
-						f = &null_frame;
+						f = &ast_null_frame;
 				}
 
 				/* Run any generator sitting on the channel */
@@ -2811,10 +2807,8 @@
 
 void ast_change_name(struct ast_channel *chan, char *newname)
 {
-	char tmp[256];
-	ast_copy_string(tmp, chan->name, sizeof(tmp));
-	ast_copy_string(chan->name, newname, sizeof(chan->name));
-	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", tmp, chan->name, chan->uniqueid);
+	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", chan->name, newname, chan->uniqueid);
+	ast_string_field_set(chan, name, newname);
 }
 
 void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_channel *child)
@@ -2947,10 +2941,10 @@
 	snprintf(masqn, sizeof(masqn), "%s<MASQ>", newn);
 		
 	/* Copy the name from the clone channel */
-	ast_copy_string(original->name, newn, sizeof(original->name));
+	ast_string_field_set(original, name, newn);
 
 	/* Mangle the name of the clone channel */
-	ast_copy_string(clone->name, masqn, sizeof(clone->name));
+	ast_string_field_set(clone, name, masqn);
 	
 	/* Notify any managers of the change, first the masq then the other */
 	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", newn, masqn, clone->uniqueid);
@@ -3032,17 +3026,16 @@
 	
 	snprintf(zombn, sizeof(zombn), "%s<ZOMBIE>", orig);
 	/* Mangle the name of the clone channel */
-	ast_copy_string(clone->name, zombn, sizeof(clone->name));
+	ast_string_field_set(clone, name, zombn);
 	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", masqn, zombn, clone->uniqueid);
 
 	/* Update the type. */
-	original->type = clone->type;
 	t_pvt = original->monitor;
 	original->monitor = clone->monitor;
 	clone->monitor = t_pvt;
 	
 	/* Keep the same language.  */
-	ast_copy_string(original->language, clone->language, sizeof(original->language));
+	ast_string_field_set(original, language, clone->language);
 	/* Copy the FD's other than the generator fd */
 	for (x = 0; x < AST_MAX_FDS; x++) {
 		if (x != AST_GENERATOR_FD)
@@ -3085,7 +3078,7 @@
 	ast_set_read_format(original, rformat);
 
 	/* Copy the music class */
-	ast_copy_string(original->musicclass, clone->musicclass, sizeof(original->musicclass));
+	ast_string_field_set(original, musicclass, clone->musicclass);
 
 	ast_log(LOG_DEBUG, "Putting channel %s in %d/%d formats\n", original->name, wformat, rformat);
 
@@ -3095,13 +3088,13 @@
 		res = original->tech->fixup(clone, original);
 		if (res) {
 			ast_log(LOG_WARNING, "Channel for type '%s' could not fixup channel %s\n",
-				original->type, original->name);
+				original->tech->type, original->name);
 			ast_mutex_unlock(&clone->lock);
 			return -1;
 		}
 	} else
 		ast_log(LOG_WARNING, "Channel type '%s' does not have a fixup routine (for %s)!  Bad things may happen.\n",
-			original->type, original->name);
+			original->tech->type, original->name);
 	
 	/* Now, at this point, the "clone" channel is totally F'd up.  We mark it as
 	   a zombie so nothing tries to touch it.  If it's already been marked as a
@@ -3121,10 +3114,9 @@
 			);
 		ast_channel_free(clone);
 	} else {
-		struct ast_frame null_frame = { AST_FRAME_NULL, };
 		ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);
 		ast_set_flag(clone, AST_FLAG_ZOMBIE);
-		ast_queue_frame(clone, &null_frame);
+		ast_queue_frame(clone, &ast_null_frame);
 		ast_mutex_unlock(&clone->lock);
 	}
 	
@@ -3782,15 +3774,13 @@
 	return group;
 }
 
-static int (*ast_moh_start_ptr)(struct ast_channel *, char *) = NULL;
+static int (*ast_moh_start_ptr)(struct ast_channel *, const char *) = NULL;
 static void (*ast_moh_stop_ptr)(struct ast_channel *) = NULL;
 static void (*ast_moh_cleanup_ptr)(struct ast_channel *) = NULL;
 
-
-void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, char *),
-								 void (*stop_ptr)(struct ast_channel *),
-								 void (*cleanup_ptr)(struct ast_channel *)
-								 ) 
+void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, const char *),
+				 void (*stop_ptr)(struct ast_channel *),
+				 void (*cleanup_ptr)(struct ast_channel *))
 {
 	ast_moh_start_ptr = start_ptr;
 	ast_moh_stop_ptr = stop_ptr;
@@ -3805,7 +3795,7 @@
 }
 
 /*! \brief Turn on music on hold on a given channel */
-int ast_moh_start(struct ast_channel *chan, char *mclass) 
+int ast_moh_start(struct ast_channel *chan, const char *mclass) 
 {
 	if (ast_moh_start_ptr)
 		return ast_moh_start_ptr(chan, mclass);

Modified: team/oej/strictrouting/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/channels/Makefile?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/channels/Makefile (original)
+++ team/oej/strictrouting/channels/Makefile Thu Feb  2 13:32:51 2006
@@ -234,6 +234,8 @@
 	for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 	if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi
 
+uninstall:
+
 depend: .depend
 
 .depend:
@@ -241,4 +243,3 @@
 
 env:
 	env
-

Modified: team/oej/strictrouting/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/oej/strictrouting/channels/chan_agent.c?rev=9099&r1=9098&r2=9099&view=diff
==============================================================================
--- team/oej/strictrouting/channels/chan_agent.c (original)
+++ team/oej/strictrouting/channels/chan_agent.c Thu Feb  2 13:32:51 2006
@@ -71,9 +71,9 @@
 #include "asterisk/astdb.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/monitor.h"
+#include "asterisk/stringfields.h"
 
 static const char desc[] = "Agent Proxy Channel";
-static const char channeltype[] = "Agent";
 static const char tdesc[] = "Call Agent Proxy Channel";
 static const char config[] = "agents.conf";
 
@@ -257,7 +257,7 @@
 static void set_agentbycallerid(const char *callerid, const char *agent);
 
 static const struct ast_channel_tech agent_tech = {
-	.type = channeltype,
+	.type = "Agent",
 	.description = tdesc,
 	.capabilities = -1,
 	.requester = agent_request,
@@ -438,7 +438,6 @@

[... 2948 lines stripped ...]


More information about the asterisk-commits mailing list