[Home]

Summary:ASTERISK-06126: [patch] constification of *_complete_*() functions
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2006-01-18 14:39:28.000-0600Date Closed:2008-01-15 16:19:56.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) const.patch
Description:the attached patch adds const qualifiers to a the *_complete_*()
cli functions (they are not supposed to modify the arguments or
the next iterations would not work) and in related functions
or structure fields.
The patch is a bit long but it is mostly one-line changes in
the functions' argument lists, except in a place or two where
i needed to fool the compiler to avoid too convoluted changes
in the code to avoid warnings (but these tricks will go
away later when the code is cleaned up further).
Comments:By: Russell Bryant (russell) 2006-01-18 15:18:09.000-0600

added to the trunk, r8203, thanks!

By: Digium Subversion (svnbot) 2008-01-15 16:17:39.000-0600

Repository: asterisk
Revision: 8203

U   trunk/apps/app_meetme.c
U   trunk/apps/app_queue.c
U   trunk/apps/app_voicemail.c
U   trunk/asterisk.c
U   trunk/channels/chan_agent.c
U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_oss.c
U   trunk/channels/chan_sip.c
U   trunk/channels/iax2-provision.c
U   trunk/channels/iax2-provision.h
U   trunk/cli.c
U   trunk/include/asterisk/cli.h
U   trunk/include/asterisk/module.h
U   trunk/loader.c
U   trunk/manager.c
U   trunk/pbx/pbx_config.c
U   trunk/pbx/pbx_dundi.c
U   trunk/pbx.c
U   trunk/res/res_clioriginate.c

------------------------------------------------------------------------
r8203 | russell | 2008-01-15 16:17:39 -0600 (Tue, 15 Jan 2008) | 2 lines

constify arguments in more places where strings should not be modified (issue ASTERISK-6126)

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

http://svn.digium.com/view/asterisk?view=rev&revision=8203

By: Digium Subversion (svnbot) 2008-01-15 16:17:54.000-0600

Repository: asterisk
Revision: 8218

_U  team/russell/make_output/
U   team/russell/make_output/Makefile
U   team/russell/make_output/apps/app_meetme.c
U   team/russell/make_output/apps/app_queue.c
U   team/russell/make_output/apps/app_voicemail.c
U   team/russell/make_output/asterisk.c
U   team/russell/make_output/channels/chan_agent.c
U   team/russell/make_output/channels/chan_iax2.c
U   team/russell/make_output/channels/chan_oss.c
U   team/russell/make_output/channels/chan_sip.c
U   team/russell/make_output/channels/iax2-provision.c
U   team/russell/make_output/channels/iax2-provision.h
U   team/russell/make_output/cli.c
U   team/russell/make_output/codecs/Makefile
A   team/russell/make_output/configs/udptl.conf.sample
U   team/russell/make_output/formats/Makefile
U   team/russell/make_output/include/asterisk/cli.h
U   team/russell/make_output/include/asterisk/module.h
U   team/russell/make_output/loader.c
U   team/russell/make_output/manager.c
U   team/russell/make_output/pbx/pbx_config.c
U   team/russell/make_output/pbx/pbx_dundi.c
U   team/russell/make_output/pbx.c
U   team/russell/make_output/res/Makefile
A   team/russell/make_output/res/res_clioriginate.c
U   team/russell/make_output/res/res_features.c
U   team/russell/make_output/utils/Makefile

------------------------------------------------------------------------
r8218 | russell | 2008-01-15 16:17:54 -0600 (Tue, 15 Jan 2008) | 228 lines

Merged revisions 8099-8105,8113-8114,8118,8120,8123,8125,8127,8133,8135-8138,8141,8148,8150,8152-8153,8155-8157,8161,8163,8179,8186,8190,8195,8203 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r8099 | bweschke | 2006-01-16 12:31:30 -0500 (Mon, 16 Jan 2006) | 3 lines

More code optimization with the new argument macros ASTERISK-6094


................
r8100 | bweschke | 2006-01-16 12:37:44 -0500 (Mon, 16 Jan 2006) | 3 lines

Spelling corrections (mostly in comments and doxygen areas) ASTERISK-6091


................
r8101 | russell | 2006-01-16 12:51:35 -0500 (Mon, 16 Jan 2006) | 2 lines

remove redundant CFLAGS for BSD which are already set in the main Makefile (issue ASTERISK-6092)

................
r8102 | tilghman | 2006-01-16 13:05:19 -0500 (Mon, 16 Jan 2006) | 2 lines

Bug 5090 - sample configuration for udptl packets

................
r8103 | tilghman | 2006-01-16 13:39:01 -0500 (Mon, 16 Jan 2006) | 2 lines

Change a debugging message committed with the wrong level

................
r8104 | tilghman | 2006-01-16 13:41:18 -0500 (Mon, 16 Jan 2006) | 2 lines

Argh, another ERROR that should have been DEBUG

................
r8105 | jdixon | 2006-01-16 13:52:13 -0500 (Mon, 16 Jan 2006) | 3 lines

Added NOANSWER support, so that optional the DISA application starts without
answering (used in new version of app_rpt, and potentially other applicaitons).

................
r8113 | kpfleming | 2006-01-16 18:52:02 -0500 (Mon, 16 Jan 2006) | 2 lines

block this revision, fix is different in this branch

................
r8114 | kpfleming | 2006-01-16 18:52:51 -0500 (Mon, 16 Jan 2006) | 2 lines

check rlimit _after_ reading config file, so that if 'dumpcore' is specified there it will take effect

................
r8118 | oej | 2006-01-16 22:05:43 -0500 (Mon, 16 Jan 2006) | 2 lines

Doxygen update

................
r8120 | kpfleming | 2006-01-17 00:15:33 -0500 (Tue, 17 Jan 2006) | 2 lines

don't generate any message for native bridge attempts unless all the basic checks have passed and we're actually going to try it

................
r8123 | kpfleming | 2006-01-17 08:13:31 -0500 (Tue, 17 Jan 2006) | 10 lines

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

........
r8122 | kpfleming | 2006-01-17 07:11:55 -0600 (Tue, 17 Jan 2006) | 2 lines

update CLI copyright notice

........

................
r8125 | mogorman | 2006-01-17 11:58:09 -0500 (Tue, 17 Jan 2006) | 10 lines

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

........
r7963 | mogorman | 2006-01-10 22:38:07 -0600 (Tue, 10 Jan 2006) | 2 lines

Minor typo refrenced in 6191

........

................
r8127 | mogorman | 2006-01-17 12:25:53 -0500 (Tue, 17 Jan 2006) | 2 lines

Added tab completion for help.  bug 6074

................
r8133 | mattf | 2006-01-17 13:20:33 -0500 (Tue, 17 Jan 2006) | 2 lines

Check to see if arg is NULL before passing (ASTERISK-5936)

................
r8135 | bweschke | 2006-01-17 13:31:03 -0500 (Tue, 17 Jan 2006) | 3 lines

Fix compiler warning.


................
r8136 | oej | 2006-01-17 13:54:56 -0500 (Tue, 17 Jan 2006) | 3 lines

- Logging clean up
- Whitespace removed and added, formatting fixed

................
r8137 | oej | 2006-01-17 13:56:57 -0500 (Tue, 17 Jan 2006) | 2 lines

Extra comma causing compilation errors...

................
r8138 | oej | 2006-01-17 14:03:04 -0500 (Tue, 17 Jan 2006) | 2 lines

Portability - compilation warning on Mac OS/X removed

................
r8141 | mogorman | 2006-01-17 15:16:18 -0500 (Tue, 17 Jan 2006) | 11 lines

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

........
r8140 | mogorman | 2006-01-17 14:10:29 -0600 (Tue, 17 Jan 2006) | 3 lines

Stop any generators running on a channel when
festival is called as described in 5996

........

................
r8148 | kpfleming | 2006-01-17 15:49:39 -0500 (Tue, 17 Jan 2006) | 2 lines

suppress compiler warning

................
r8150 | kpfleming | 2006-01-17 15:53:04 -0500 (Tue, 17 Jan 2006) | 2 lines

spelling fix

................
r8152 | mogorman | 2006-01-17 15:58:56 -0500 (Tue, 17 Jan 2006) | 3 lines

allow for multiple periodic announcements
from bug 5273 with minor changes.

................
r8153 | mogorman | 2006-01-17 16:10:38 -0500 (Tue, 17 Jan 2006) | 2 lines

oops all better now.

................
r8155 | mattf | 2006-01-17 18:13:42 -0500 (Tue, 17 Jan 2006) | 2 lines

Fix answeronpolarityswitch and hanguponpolarityswitch when both are yes (ASTERISK-6071)

................
r8156 | mattf | 2006-01-17 18:37:22 -0500 (Tue, 17 Jan 2006) | 2 lines

Improvements to DSP callprogress=yes code (ASTERISK-4883)

................
r8157 | kpfleming | 2006-01-17 18:45:05 -0500 (Tue, 17 Jan 2006) | 2 lines

remove some more deprecated (pre-1.2) stuff

................
r8161 | mogorman | 2006-01-17 19:05:09 -0500 (Tue, 17 Jan 2006) | 3 lines

cleanup the show uptime code, and minor changes
to patch 6274

................
r8163 | mogorman | 2006-01-17 19:49:43 -0500 (Tue, 17 Jan 2006) | 12 lines

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

........
r8162 | mogorman | 2006-01-17 18:47:04 -0600 (Tue, 17 Jan 2006) | 4 lines

Changed order of autoload so that pbx_ comes before
channels, and in doing so cause bug 6002 to not
be an issue

........

................
r8179 | mogorman | 2006-01-17 22:53:10 -0500 (Tue, 17 Jan 2006) | 3 lines

cli.h cleanup and additional documentation
from patch 6272

................
r8186 | mogorman | 2006-01-18 10:42:48 -0500 (Wed, 18 Jan 2006) | 3 lines

allows for use of the originate function from
the cli patch 5847

................
r8190 | mogorman | 2006-01-18 11:24:29 -0500 (Wed, 18 Jan 2006) | 2 lines

oops. sorry

................
r8195 | mogorman | 2006-01-18 16:12:14 -0500 (Wed, 18 Jan 2006) | 11 lines

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

........
r8194 | mogorman | 2006-01-18 15:02:06 -0600 (Wed, 18 Jan 2006) | 3 lines

Solves issue with the login proccess in meetme
patch from 6136

........

................
r8203 | russell | 2006-01-18 17:17:31 -0500 (Wed, 18 Jan 2006) | 2 lines

constify arguments in more places where strings should not be modified (issue ASTERISK-6126)

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

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

http://svn.digium.com/view/asterisk?view=rev&revision=8218

By: Digium Subversion (svnbot) 2008-01-15 16:18:37.000-0600

Repository: asterisk
Revision: 8269

_U  team/oej/multiparking/
U   team/oej/multiparking/apps/app_meetme.c
U   team/oej/multiparking/apps/app_milliwatt.c
U   team/oej/multiparking/apps/app_queue.c
U   team/oej/multiparking/apps/app_voicemail.c
U   team/oej/multiparking/asterisk.c
U   team/oej/multiparking/channels/chan_agent.c
U   team/oej/multiparking/channels/chan_iax2.c
U   team/oej/multiparking/channels/chan_oss.c
U   team/oej/multiparking/channels/chan_sip.c
U   team/oej/multiparking/channels/iax2-provision.c
U   team/oej/multiparking/channels/iax2-provision.h
U   team/oej/multiparking/cli.c
U   team/oej/multiparking/include/asterisk/cli.h
U   team/oej/multiparking/include/asterisk/module.h
U   team/oej/multiparking/loader.c
U   team/oej/multiparking/manager.c
U   team/oej/multiparking/pbx/pbx_config.c
U   team/oej/multiparking/pbx/pbx_dundi.c
U   team/oej/multiparking/pbx.c
U   team/oej/multiparking/res/res_clioriginate.c

------------------------------------------------------------------------
r8269 | oej | 2008-01-15 16:18:36 -0600 (Tue, 15 Jan 2008) | 52 lines

Merged revisions 8195,8203,8233,8243 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r8195 | mogorman | 2006-01-18 22:12:14 +0100 (Wed, 18 Jan 2006) | 11 lines

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

........
r8194 | mogorman | 2006-01-18 15:02:06 -0600 (Wed, 18 Jan 2006) | 3 lines

Solves issue with the login proccess in meetme
patch from 6136

........

................
r8203 | russell | 2006-01-18 23:17:31 +0100 (Wed, 18 Jan 2006) | 2 lines

constify arguments in more places where strings should not be modified (issue ASTERISK-6126)

................
r8233 | russell | 2006-01-19 05:21:12 +0100 (Thu, 19 Jan 2006) | 11 lines

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

........
r8232 | russell | 2006-01-18 23:17:45 -0500 (Wed, 18 Jan 2006) | 3 lines

fix a seg fault due to assuming that space gets allocatted on the stack in the
same order that we declare the variables (issue ASTERISK-6130)

........

................
r8243 | russell | 2006-01-19 05:58:43 +0100 (Thu, 19 Jan 2006) | 11 lines

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

........
r8242 | russell | 2006-01-18 23:56:48 -0500 (Wed, 18 Jan 2006) | 3 lines

fix Message-Account header to use the ip address if the fromdomain
isn't set (issue ASTERISK-6118)

........

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

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

http://svn.digium.com/view/asterisk?view=rev&revision=8269

By: Digium Subversion (svnbot) 2008-01-15 16:19:56.000-0600

Repository: asterisk
Revision: 8358

_U  team/oej/astum/
U   team/oej/astum/apps/app_meetme.c
U   team/oej/astum/apps/app_milliwatt.c
U   team/oej/astum/apps/app_queue.c
U   team/oej/astum/apps/app_random.c
U   team/oej/astum/apps/app_sms.c
U   team/oej/astum/apps/app_voicemail.c
U   team/oej/astum/ast_expr2.fl
U   team/oej/astum/ast_expr2.y
U   team/oej/astum/asterisk.c
U   team/oej/astum/channels/chan_agent.c
U   team/oej/astum/channels/chan_alsa.c
U   team/oej/astum/channels/chan_iax2.c
U   team/oej/astum/channels/chan_local.c
U   team/oej/astum/channels/chan_oss.c
U   team/oej/astum/channels/chan_sip.c
U   team/oej/astum/channels/chan_zap.c
U   team/oej/astum/channels/iax2-provision.c
U   team/oej/astum/channels/iax2-provision.h
U   team/oej/astum/cli.c
U   team/oej/astum/config.c
U   team/oej/astum/configs/alsa.conf.sample
U   team/oej/astum/configs/sip.conf.sample
U   team/oej/astum/configs/zapata.conf.sample
U   team/oej/astum/devicestate.c
A   team/oej/astum/doc/README.callingpres
U   team/oej/astum/enum.c
U   team/oej/astum/formats/format_pcm.c
U   team/oej/astum/formats/format_pcm_alaw.c
U   team/oej/astum/include/asterisk/channel.h
U   team/oej/astum/include/asterisk/cli.h
U   team/oej/astum/include/asterisk/module.h
U   team/oej/astum/include/asterisk/utils.h
U   team/oej/astum/loader.c
U   team/oej/astum/logger.c
U   team/oej/astum/manager.c
U   team/oej/astum/pbx/pbx_config.c
U   team/oej/astum/pbx/pbx_dundi.c
U   team/oej/astum/pbx.c
U   team/oej/astum/res/res_clioriginate.c
U   team/oej/astum/res/res_features.c
U   team/oej/astum/udptl.c

------------------------------------------------------------------------
r8358 | oej | 2008-01-15 16:19:55 -0600 (Tue, 15 Jan 2008) | 162 lines

Merged revisions 8195,8203,8233,8243,8270,8278,8282,8299-8300,8313,8315,8323-8324,8336,8338,8345-8346,8348,8356-8357 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r8195 | mogorman | 2006-01-18 22:12:14 +0100 (Wed, 18 Jan 2006) | 11 lines

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

........
r8194 | mogorman | 2006-01-18 15:02:06 -0600 (Wed, 18 Jan 2006) | 3 lines

Solves issue with the login proccess in meetme
patch from 6136

........

................
r8203 | russell | 2006-01-18 23:17:31 +0100 (Wed, 18 Jan 2006) | 2 lines

constify arguments in more places where strings should not be modified (issue ASTERISK-6126)

................
r8233 | russell | 2006-01-19 05:21:12 +0100 (Thu, 19 Jan 2006) | 11 lines

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

........
r8232 | russell | 2006-01-18 23:17:45 -0500 (Wed, 18 Jan 2006) | 3 lines

fix a seg fault due to assuming that space gets allocatted on the stack in the
same order that we declare the variables (issue ASTERISK-6130)

........

................
r8243 | russell | 2006-01-19 05:58:43 +0100 (Thu, 19 Jan 2006) | 11 lines

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

........
r8242 | russell | 2006-01-18 23:56:48 -0500 (Wed, 18 Jan 2006) | 3 lines

fix Message-Account header to use the ip address if the fromdomain
isn't set (issue ASTERISK-6118)

........

................
r8270 | tilghman | 2006-01-19 19:58:45 +0100 (Thu, 19 Jan 2006) | 2 lines

Deprecate the use of Random in 1.3, 1.4

................
r8278 | tilghman | 2006-01-19 20:18:51 +0100 (Thu, 19 Jan 2006) | 3 lines

Merged revisions 8276 via svnmerge from
/branches/1.2

................
r8282 | oej | 2006-01-19 20:41:06 +0100 (Thu, 19 Jan 2006) | 2 lines

Enable "musicclass" setting for sip peers

................
r8299 | oej | 2006-01-19 23:09:18 +0100 (Thu, 19 Jan 2006) | 2 lines

Doxygen fixes

................
r8300 | oej | 2006-01-19 23:41:55 +0100 (Thu, 19 Jan 2006) | 3 lines

Add support for "musicclass" instead of "musiconhold" to make chan_zap compatible
with other channels.

................
r8313 | oej | 2006-01-20 01:08:36 +0100 (Fri, 20 Jan 2006) | 2 lines

Doxygen updates

................
r8315 | oej | 2006-01-20 01:18:42 +0100 (Fri, 20 Jan 2006) | 2 lines

More doxygen updates

................
r8323 | mogorman | 2006-01-20 02:07:46 +0100 (Fri, 20 Jan 2006) | 11 lines

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

........
r8320 | mogorman | 2006-01-19 19:00:46 -0600 (Thu, 19 Jan 2006) | 3 lines

solved problem with delayreject and iax trunking
bug 4291

........

................
r8324 | russell | 2006-01-20 02:25:12 +0100 (Fri, 20 Jan 2006) | 2 lines

fix version reporting (issue ASTERISK-6132)

................
r8336 | oej | 2006-01-20 15:32:30 +0100 (Fri, 20 Jan 2006) | 4 lines

- Add DOC file about caller ID presentation values
- Add callingpres to sip.conf
- Add reference to README.callingpres from zapata.conf

................
r8338 | kpfleming | 2006-01-20 18:27:51 +0100 (Fri, 20 Jan 2006) | 2 lines

eliminate compiler warnings from recent const-ification

................
r8345 | mattf | 2006-01-20 19:17:46 +0100 (Fri, 20 Jan 2006) | 2 lines

Update config.  Apprently default doesn't always work now.

................
r8346 | mattf | 2006-01-20 19:18:40 +0100 (Fri, 20 Jan 2006) | 2 lines

Change chan_alsa to default open the first sound card device

................
r8348 | russell | 2006-01-20 19:40:24 +0100 (Fri, 20 Jan 2006) | 10 lines

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

........
r8347 | russell | 2006-01-20 13:34:42 -0500 (Fri, 20 Jan 2006) | 2 lines

fix invalid value of prev_q (issue ASTERISK-6142)

........

................
r8356 | russell | 2006-01-20 20:24:42 +0100 (Fri, 20 Jan 2006) | 11 lines

- move ast_strdupa from channel.h to utils.h
- attempt to log an error message if the __builtin_alloca inside of ast_strdupa
 fails.
- document the fact that it is known and intended behavior for ast_strdupa to
 cause Asterisk to crash if the alloca fails
- use __builtin_expect when checking for allocation failure in all of the
 allocation wrappers

New Janitor Project!  Anywhere that we check for a successful allocation after
a call to ast_strdupa is unnecessary and should be removed.

................
r8357 | mattf | 2006-01-20 22:36:33 +0100 (Fri, 20 Jan 2006) | 2 lines

Fix for formats so they give better output on failure conditions. (ASTERISK-5984)

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

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

http://svn.digium.com/view/asterisk?view=rev&revision=8358