dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

116 Commits

Author SHA1 Message Date
rizzo 0a8518b7c8 modify http://svn.digium.com/view/asterisk?view=rev&rev=93603
so that paths and filename are writable by asterisk.c without
causing segfaults.

This involves defining the variables as const char *,
and having them point to as static, writable buffer
defined in asterisk.c

On passing, fix some errors in using these variables
in some files in utils/ , and in res/snmp/agent.c
which was redefining a variable without using paths.h

(not applicable to 1.4)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94168 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20 09:55:05 +00:00
oej 82835dcbcd Add option for starting remote Asterisk by naming the actual runtime socket instead of pointing
to configuration file with -C

Reported by: sobomax
Patches: 
      asterisk.c.diff.trunk uploaded by sobomax (license 359)
      doc changes by committer
(closes issue #11598)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93854 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-19 07:01:40 +00:00
tilghman 8cfc775363 Making the canary error message a little more obvious.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93805 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 23:38:30 +00:00
tilghman 11a5516081 Add a canary process, for high priority mode (asterisk -p) to ensure that if
Asterisk goes into a busy loop, the machine will be recoverable.  We'd still
need to do a restart to put Asterisk back into high priority mode, but at
least a reboot won't be required. (Closes issue #11559)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93804 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 23:06:05 +00:00
rizzo 553ab5f770 make configuration variable const so they are not accidentally
modified.
This requires casting the strings in asterisk.c when writing to
them, so we do it through a macro to do it consistently.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 10:24:58 +00:00
rizzo 659205253c remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93582 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 09:46:18 +00:00
rizzo 7a8342612d Rename the macros in defaults.h - they are not meant to be
globally visible.

Document the fact that DEFAULT_TMP_DIR cannot be overridden
from the default configuration (this needs to be fixed, as you
could have a totally different spooldir configured at runtime,
and yet DEFAULT_TMP_DIR keeps the compile-time default).

Remove two unused entries for sounds and images.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93581 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 09:26:03 +00:00
oej e25fbbfbd9 Don't drop the first character randomly in long listings in the CLI.
Reported by: slavon
Patches: 
      asterisk-consolerefresh2.diff.txt uploaded by jamesgolovich (license 176)
Tested by: eliel
(closes issue #9325)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93161 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-16 09:37:41 +00:00
tilghman 35d428bcca Convert ast_verbose to ast_verb.
Reported by: snuffy
Patch by: snuffy
(Closes issue #11547)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92913 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 14:48:38 +00:00
tilghman 12ebe404df Correctly handle possible memory allocation failure
Reported by: eliel
Patch by: eliel
(Closes issue #11512)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92507 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-12 17:15:56 +00:00
oej 45e9d7c883 A few more "moremanager" fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89772 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 21:10:50 +00:00
oej fecacc7468 More "moremanager" fixes. Manager commands to check module status.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89771 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 21:04:29 +00:00
rizzo de2db05332 remove a bunch of useless #include "options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:09:02 +00:00
rizzo 8d3385f534 move internal function declarations to include/asterisk/_private.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 22:18:21 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +00:00
rizzo fb8143ad31 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:11:53 +00:00
rizzo 18911d90cb remove a bunch of duplicate includes
Reproduce with

grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr 



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 23:54:45 +00:00
rizzo 977ebbedcd remove duplicate headers.
Properly check for netdb.h (there is actually tens of places to fix)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89335 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:28:19 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
kpfleming a45a413db3 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:28:47 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
russell 9cac9bf42a Merged revisions 85532 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85532 | russell | 2007-10-13 00:24:33 -0500 (Sat, 13 Oct 2007) | 8 lines

Properly handle the case where read() may return the text for more than one
CLI command at once for a remote console.

(closes issue #10888)
Reported by: jamesgolovich
Patches: 
      asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86585 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-21 22:52:20 +00:00
qwell d542122e6a Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19 18:29:40 +00:00
tilghman cfd74e7391 Merged revisions 86066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86066 | tilghman | 2007-10-17 10:23:51 -0500 (Wed, 17 Oct 2007) | 3 lines

When runuser/rungroup is specified, a remote console could only be attained by root
(Closes issue #9999)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86079 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-17 15:39:24 +00:00
russell 9940e48477 Merged revisions 85545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85545 | russell | 2007-10-15 08:05:45 -0500 (Mon, 15 Oct 2007) | 7 lines

Make sure remote consoles unmute themselves again after reconnecting.

(closes issue #10847)
Reported by: atis
Patches: 
      console_unmute_on_reconnect.patch uploaded by atis (license 242)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85546 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15 13:07:48 +00:00
russell ac808d6bde Merged revisions 85533 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85533 | russell | 2007-10-13 01:48:10 -0400 (Sat, 13 Oct 2007) | 12 lines

Fix an issue with console verbosity when running asterisk -rx to execute a command
and retrieve its output.  The issue was that there was no way for the main Asterisk
process to know that the remote console was connecting in the -rx mode.  The way that
James has fixed this is to have all remote consoles muted by default.  Then, regular
remote consoles automatically execute a CLI command to unmute themselves when they
first start up.

(closes issue #10847)
Reported by: atis
Patches: 
      asterisk-consolemute.diff.txt uploaded by jamesgolovich (license 176)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-13 05:53:19 +00:00
russell 13b9c5237c Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
(closes issue #10724)
Reported by: eliel
Patches: 
      chan_skinny.c.patch uploaded by eliel (license 64)
      chan_oss.c.patch uploaded by eliel (license 64)
      chan_mgcp.c.patch2 uploaded by eliel (license 64)
      pbx_config.c.patch uploaded by seanbright (license 71)
      iax2-provision.c.patch uploaded by eliel (license 64)
      chan_gtalk.c.patch uploaded by eliel (license 64)
      pbx_ael.c.patch uploaded by seanbright (license 71)
      file.c.patch uploaded by seanbright (license 71)
      image.c.patch uploaded by seanbright (license 71)
      cli.c.patch uploaded by moy (license 222)
      astobj2.c.patch uploaded by moy (license 222)
      asterisk.c.patch uploaded by moy (license 222)
      res_limit.c.patch uploaded by seanbright (license 71)
      res_convert.c.patch uploaded by seanbright (license 71)
      res_crypto.c.patch uploaded by seanbright (license 71)
      app_osplookup.c.patch uploaded by seanbright (license 71)
      app_rpt.c.patch uploaded by seanbright (license 71)
      app_mixmonitor.c.patch uploaded by seanbright (license 71)
      channel.c.patch uploaded by seanbright (license 71)
      translate.c.patch uploaded by seanbright (license 71)
      udptl.c.patch uploaded by seanbright (license 71)
      threadstorage.c.patch uploaded by seanbright (license 71)
      db.c.patch uploaded by seanbright (license 71)
      cdr.c.patch uploaded by moy (license 222)
      pbd_dundi.c.patch uploaded by moy (license 222)
      app_osplookup-rev83558.patch uploaded by moy (license 222)
      res_clioriginate.c.patch uploaded by moy (license 222)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85460 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11 19:03:06 +00:00
russell dac373f539 Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it.  It replaces a bunch of simple calls to snprintf with ast_copy_string

(closes issue #10843)
Reported by: Corydon76
Patches: 
      2007092900_10843.diff uploaded by mvanbaak (license 7)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01 15:23:19 +00:00
tilghman 7a8c90073a Permit custom locations for astdb and the keys directory (though default to the current locations) (Closes issue #10267)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83726 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-24 22:06:19 +00:00
russell 4aebf5136d Merged revisions 83348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83348 | russell | 2007-09-20 16:16:48 -0500 (Thu, 20 Sep 2007) | 4 lines

When daemonizing, don't change working directory to "/".  It makes it not be
able to do a core dump when not running as uid=root.
(closes issue #10766, xrg)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20 21:17:39 +00:00
russell c4fc57d3dc trivial formatting change
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83297 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20 19:42:33 +00:00
russell 4e6f525b52 trivial formatting change
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83293 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20 19:11:31 +00:00
russell cb32a4edbc Don't start the event processing thread until after forking.
(reported by Simon on the -dev list, thanks!)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20 16:27:07 +00:00
russell e02a9bcbe6 Merged revisions 82337 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82337 | russell | 2007-09-13 13:45:59 -0500 (Thu, 13 Sep 2007) | 4 lines

Only compile in tracking astobj2 statistics if dev-mode is enabled.  Also, when
dev mode is enabled, register the CLI command that can be used to run the astobj2
test and print out statistics.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82338 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-13 18:52:35 +00:00
mmichelson 894372bbe8 Fixes Solaris build warnings
(closes issue #10698, reported and patched by snuffy)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82283 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12 16:24:45 +00:00
russell 5769779bfb Merged revisions 82280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82280 | russell | 2007-09-12 10:16:49 -0500 (Wed, 12 Sep 2007) | 4 lines

Clean up the output of "asterisk -h".  This tweaks the wording and wraps lines
at 80 characters.
(closes issue #10699, seanbright)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82281 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12 15:19:11 +00:00
russell 5b21321d3e Merged revisions 81997 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81997 | russell | 2007-09-08 13:41:32 -0500 (Sat, 08 Sep 2007) | 2 lines

Fix a small memory leak.  ast_unregister_atexit() did not free the entry it removed.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81998 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-08 18:45:51 +00:00
russell 5525846c14 (closes issue #7852)
Reported by: nic_bellamy
Patches:
      2006-10-03_svn_44249_voicemail_lockmode_v3.patch uploaded by nic_bellamy (license 213)

Add support for configurable file locking methods.  The default is "lockfile",
which is the old behavior.  There is an additional option, "flock", which is
intended for use in situations where the lockfile method will not work, such as
with SMB/CIFS mounts.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-28 16:28:26 +00:00
tilghman dbec3d56c1 Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16 21:09:46 +00:00
file 3997783950 Instead of adding the SOLARIS check to each HAVE_SYSINFO check let's just make the sysinfo autoconf logic a bit pickier about what it considers a usable sysinfo.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77878 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01 19:37:59 +00:00
file af3fa0a751 Solaris does not have a sysinfo like we know of on Linux.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77876 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01 19:12:36 +00:00
russell 88c6359e5b (closes issue #10271)
Reported by: snuffy
Patches:
      doxygen-updates.diff uploaded by snuffy (license 35)

Another big batch of doxygen documentation updates


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76559 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 14:32:04 +00:00
russell 70476ea4aa (closes issue #10192)
Reported by: bbryant
Patches:
      20070720__core_debug_by_file.patch uploaded by bbryant (license 36)
	  (with some modifications by me)
Tested by: russell, bbryant

This set of changes introduces the ability to set the core debug or verbose
levels on a per-file basis.  Interestingly enough, in 1.4, you have the ability
to set core debug for a single file, but that functionality was accidentally
lost in the conversion of the CLI commands to the new format.

This patch improves upon what was in 1.4 by letting you set it for more than 1
file, and by also supporting verbose.

*** Janitor Project ***

This patch also introduces a new macro, ast_verb(), which is similar
to ast_debug().  Setting the per file verbose value only works for messages that
use this macro.  Converting existing uses of ast_verbose() can be done like:

if (option_debug > 2)
   ast_verbose(VERBOSE_PREFIX_3 "Something useful\n");

...

ast_verb(3, "Something useful\n");



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76555 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 14:21:41 +00:00
tilghman 74c2948c22 Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18 19:47:20 +00:00
bbryant 0762695732 Merged revisions 72383 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72383 | bbryant | 2007-06-27 18:29:14 -0500 (Wed, 27 Jun 2007) | 11 lines

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

........
r72373 | bbryant | 2007-06-27 18:22:13 -0500 (Wed, 27 Jun 2007) | 3 lines

Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed. 
Fixes issue #10010, and #9654: 100% CPU usage caused by an asterisk console losing it's controlling terminal.

........

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72384 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27 23:30:31 +00:00
bbryant 38b61b488e Merged revisions 72335 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72335 | bbryant | 2007-06-27 18:03:01 -0500 (Wed, 27 Jun 2007) | 10 lines

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

........
r72333 | bbryant | 2007-06-27 17:58:53 -0500 (Wed, 27 Jun 2007) | 2 lines

Reverted changes for earlier revisions 72259 to 72261. Issue #9654, #10010

........

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72337 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27 23:04:06 +00:00
bbryant 9367a00b38 Merged revisions 72260 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72260 | bbryant | 2007-06-27 15:46:12 -0500 (Wed, 27 Jun 2007) | 12 lines

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

........
r72259 | bbryant | 2007-06-27 15:43:53 -0500 (Wed, 27 Jun 2007) | 4 lines

Fixes 100% load when controlling terminal disappears.

Issue #9654, #10010

........

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72261 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27 20:47:45 +00:00
russell 0596df2900 Merged revisions 71362 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r71362 | russell | 2007-06-24 15:06:31 -0500 (Sun, 24 Jun 2007) | 10 lines

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

........
r71358 | russell | 2007-06-24 15:04:21 -0500 (Sun, 24 Jun 2007) | 2 lines

Revert the patch from issue 9654 due to an unexpected side effect

........

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71365 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-24 20:07:15 +00:00
bbryant 59b29501f4 Merged revisions 71066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r71066 | bbryant | 2007-06-22 09:53:08 -0500 (Fri, 22 Jun 2007) | 18 lines

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

........
r71064 | bbryant | 2007-06-22 09:39:34 -0500 (Fri, 22 Jun 2007) | 10 lines

Fixed infinite loop when controlling terminal was lost
and return value of input function wasn't checked for
errors. This would cause 100% cpu to be taken up.

(closes issue #9654, issue #10010)
Reported by: mnicholson, and eserra

Idea for the patch from mnicholson, patched by me


........

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71067 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22 14:56:36 +00:00
qwell de3fbdf969 Nothing to see here.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71024 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22 04:13:08 +00:00