Commit Graph

242 Commits

Author SHA1 Message Date
Sean Bright acdb1bd82f Merged revisions 244926 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r244926 | seanbright | 2010-02-05 12:03:35 -0500 (Fri, 05 Feb 2010) | 1 line
  
  Update main copyright date.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-05 17:05:32 +00:00
Jeff Peeler a170cd28e0 Add new option to asterisk.conf (lockconfdir) to protect conf dir during reloads
(closes issue #16358)
Reported by: raarts
Patches: 
      lockconfdir.diff uploaded by raarts (license 937)
      modified by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-27 18:29:49 +00:00
Tilghman Lesher 6c1e69370e Err, oops, it was already the way I intended.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 23:50:47 +00:00
Tilghman Lesher 8037982fa6 The previous attempt at using a pipe to guarantee astcanary shutdown did not work.
We're revisiting the previous patch, albeit with a method that overcomes the
prior criticism that it was not POSIX-compliant.
(closes issue #16602)
 Reported by: frawd
 Patches: 
       20100114__issue16602.diff.txt uploaded by tilghman (license 14)
 Tested by: frawd


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 21:40:14 +00:00
Tilghman Lesher 5e0762370c It's been long enough -- make the behavior introduced in 1.6 the default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@239000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-10 06:56:36 +00:00
David Vossel 73cb2d507b Unit Test Framework API
The Unit Test Framework is a new API that manages registration and
execution of unit tests in Asterisk with the purpose of verifying the
operation of C functions.  The Framework consists of a single test
manager accompanied by a list of registered test functions defined
within the code.  A test is defined, registered, and unregistered
from the framework using a set of macros which allow the test code
to only be compiled within asterisk when the TEST_FRAMEWORK flag is
enabled in menuselect.  This allows the test code to exist in the
same file as the C functions it intends to verify.  Registered tests
may be viewed and executed via a set of new CLI commands.  CLI commands
are also present for generating and exporting test results into xml
and txt formats.

For more information and use cases please refer to the documentation
provided at the beginning of the test.h file.

Review: https://reviewboard.asterisk.org/r/447/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-22 16:09:11 +00:00
Joshua Colp d0e431ce3d Add an 'X' option to the asterisk application which enables #exec for configuration files.
This option can be used to enable #exec support in the asterisk.conf configuration file.

(closes issue #16260)
Reported by: atis
Patches:
      exec_includes.patch uploaded by atis (license 242)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02 20:10:07 +00:00
Tilghman Lesher 23b4a700f4 Reorder option flags. Change guidelines so that example code is consistent with guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-26 02:09:58 +00:00
Olle Johansson 75c015bfff Add the capability to require a module to be loaded, or else Asterisk exits.
Review: https://reviewboard.asterisk.org/r/426/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13 08:52:28 +00:00
Russell Bryant 844a01b27e Add an "Asterisk Architecture Overview" section to the doxygen documentation.
This is a side project I've been poking at this week.  The intent is to discuss
Asterisk architecture in a top down fashion to help new developers understand how
Asterisk is put together.  There is a ton of stuff to write about, so this will
just continue to evolve over time.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-30 04:08:39 +00:00
Tilghman Lesher 8c7b3cf738 Merged revisions 221776 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r221776 | tilghman | 2009-10-01 18:53:12 -0500 (Thu, 01 Oct 2009) | 2 lines
  
  Fix a bunch of off-by-one errors
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-01 23:59:15 +00:00
Tilghman Lesher 17180120bf Change the default behavior of Set, AGI, and pbx_realtime to 1.6 behavior by default (starting in 1.6.3).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24 22:53:23 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Russell Bryant 0e8c630224 Move OpenSSL initialization to a single place, make library usage thread-safe.
While doing some reading about OpenSSL, I noticed a couple of things that
needed to be improved with our usage of OpenSSL.

1) We had initialization of the library done in multiple modules.  This has now
   been moved to a core function that gets executed during Asterisk startup.
   We already link OpenSSL into the core for TCP/TLS functionality, so this
   was the most logical place to do it.

2) OpenSSL is not thread-safe by default.  However, making it thread safe is
   very easy.  We just have to provide a couple of callbacks.  One callback
   returns a thread ID.  The other handles locking.  For more information,
   start with the "Is OpenSSL thread-safe?" question on the FAQ page of
   openssl.org.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 15:17:19 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
David Vossel dcfe69ec64 fixes some memory leaks and redundant conditions
(closes issue #15269)
Reported by: contactmayankjain
Patches:
      patch.txt uploaded by contactmayankjain (license 740)
      memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
Tested by: contactmayankjain, dvossel




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:37:42 +00:00
Sean Bright befad10893 Merged revisions 199022 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r199022 | seanbright | 2009-06-04 10:14:57 -0400 (Thu, 04 Jun 2009) | 40 lines
  
  Safely handle AMI connections/reload requests that occur during startup.
  
  During asterisk startup, a lock on the list of modules is obtained by the
  primary thread while each module is initialized.  Issue 13778 pointed out a
  problem with this approach, however.  Because the AMI is loaded before other
  modules, it is possible for a module reload to be issued by a connected client
  (via Action: Command), causing a deadlock.
  
  The resolution for 13778 was to move initialization of the manager to happen
  after the other modules had already been lodaded.  While this fixed this
  particular issue, it caused a problem for users (like FreePBX) who call AMI
  scripts via an #exec in a configuration file (See issue 15189).
  
  The solution I have come up with is to defer any reload requests that come in
  until after the server is fully booted.  When a call comes in to
  ast_module_reload (from wherever) before we are fully booted, the request is
  added to a queue of pending requests.  Once we are done booting up, we then
  execute these deferred requests in turn.
  
  Note that I have tried to make this a bit more intelligent in that it will not
  queue up more than 1 request for the same module to be reloaded, and if a
  general reload request comes in ('module reload') the queue is flushed and we
  only issue a single deferred reload for the entire system.
  
  As for how this will impact existing installations - Before 13778, a reload
  issued before module initialization was completed would result in a deadlock.
  After 13778, you simply couldn't connect to the manager during startup (which
  causes problems with #exec-that-calls-AMI configuration files).  I believe this
  is a good general purpose solution that won't negatively impact existing
  installations.
  
  (closes issue #15189)
  (closes issue #13778)
  Reported by: p_lindheimer
  Patches:
        06032009_15189_deferred_reloads.diff uploaded by seanbright (license 71)
  Tested by: p_lindheimer, seanbright
  
  Review: https://reviewboard.asterisk.org/r/272/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-04 14:31:24 +00:00
Sean Bright 3982b8c71b Call ast_stun_init() when we're initializing to get the 'stun debug set'
commands.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 21:11:03 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Tilghman Lesher 92ace48782 Move the spawn of astcanary down, until after the call to daemon(3).
This avoids possible conflicts with the internal implementation of
daemon(3).
(closes issue #15093)
 Reported by: tzafrir
 Patches: 
       20090513__issue15093__2.diff.txt uploaded by tilghman (license 14)
 Tested by: tzafrir


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 19:17:15 +00:00
Sean Bright f2d26b3ddb Update copyright year to 2009
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 15:45:07 +00:00
Tilghman Lesher 91dde03ba8 Detect eaccess (or euidaccess) before using it.
Reported by Andrew Lindh via the -dev list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 17:40:58 +00:00
Tilghman Lesher 4cbe6b1afe Change working directory to / under certain conditions.
If backgrounding and no core will be produced, then changing the directory
won't break anything; likewise, if the CWD isn't accessible by the current
user, then a core wasn't possible anyway.
(closes issue #14831)
 Reported by: chris-mac
 Patches: 
       20090428__bug14831.diff.txt uploaded by tilghman (license 14)
       20090430__bug14831.diff.txt uploaded by tilghman (license 14)
 Tested by: chris-mac


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 06:47:13 +00:00
Sean Bright 7a7f17ce4d Fix copy/paste error with 'transmit silence' flag.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-17 19:36:38 +00:00
Tilghman Lesher 8f28bfc63e Merged revisions 187300-187301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines
  
  Add debugging mode for diagnosing file descriptor leaks.
  (Related to issue #14625)
........
  r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines
  
  Oops, missed this file in the last commit.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 04:59:05 +00:00
Russell Bryant 2cb0018fa1 Start splitting up miscellaneous doxygen documentation into separate files.
doxyref.h was created to hold miscellaneous documentation that was not specific
to a part of the code.  This file has grown quite a bit so I decided to start
splitting parts of it out into new files.  Now, you can drop a new file into
include/asterisk/doxygen/ and it will be processed by doxygen.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-08 13:24:48 +00:00
Joshua Colp 63de834395 Merge in the RTP engine API.
This API provides a generic way for multiple RTP stacks to be
integrated into Asterisk. Right now there is only one present, res_rtp_asterisk,
which is the existing Asterisk RTP stack. Functionality wise this commit
performs the same as previously. API documentation can be viewed in the
rtp_engine.h header file.

Review: http://reviewboard.digium.com/r/209/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 17:20:52 +00:00
Russell Bryant b564b2105f Change g_eid to ast_eid_default.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 14:00:18 +00:00
Russell Bryant ee77b475f2 Improve performance of the ast_event cache functionality.
This code comes from svn/asterisk/team/russell/event_performance/.

Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.

1) Asterisk 1.6.1 introduces some additional logic to be able to handle
   distributed device state.  This functionality comes at a cost.
   One relatively minor change in this patch is that the extra processing
   required for distributed device state is now completely bypassed if
   it's not needed.

2) One of the things that I noticed when profiling this code was that a
   _lot_ of time was spent doing string comparisons.  I changed the way
   strings are represented in an event to include a hash value at the front.
   So, before doing a string comparison, we do an integer comparison on the
   hash.

3) Finally, the code that handles the event cache has been re-written.
   I tried to do this in a such a way that it had minimal impact on the API.
   I did have to change one API call, though - ast_event_queue_and_cache().
   However, the way it works now is nicer, IMO.  Each type of event that
   can be cached (MWI, device state) has its own hash table and rules for
   hashing and comparing objects.  This by far made the biggest impact on
   performance.

For additional details regarding this code and how it was tested, please see the
review request.

(closes issue #14738)
Reported by: russell

Review: http://reviewboard.digium.com/r/205/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 21:57:19 +00:00
Eliel C. Sardanons 79ec90b3b2 Merged revisions 184188 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r184188 | eliel | 2009-03-25 10:12:54 -0400 (Wed, 25 Mar 2009) | 13 lines
  
  Avoid destroying the CLI line when moving the cursor backward and trying to autocomplete.
  
  When moving the cursor backward and pressing TAB to autocomplete, a NULL is put
  in the line and we are loosing what we have already wrote after the actual
  cursor position.
  
  (closes issue #14373)
  Reported by: eliel
  Patches:
        asterisk.c.patch uploaded by eliel (license 64)
        Tested by: lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 14:38:19 +00:00
Russell Bryant 0bdd99ad64 Merged revisions 182810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:28:55 +00:00
Russell Bryant a300f82035 Merged revisions 178508 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r178508 | russell | 2009-02-25 06:43:36 -0600 (Wed, 25 Feb 2009) | 2 lines

Update the copyright year for the main page of the doxygen documentation.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-25 12:45:30 +00:00
Tilghman Lesher de3d9f829a Apparently, a void cast doesn't override warn_unused_result.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 20:52:44 +00:00
Tilghman Lesher a8630432c9 The 3 possible errors with pipe(2) are all impossible in this situation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 20:40:02 +00:00
Tilghman Lesher 97830cc9cb Use a SIGPIPE to kill the process, instead of depending upon the astcanary process being inherited by init.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 20:06:48 +00:00
Michiel van Baak 787811d815 add extra check for sysinfo/sysctl
(closes issue #14513)
Reported by: snuffy
Patches:
      bug14513_fixsysinfo.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-21 14:37:04 +00:00
Russell Bryant 4ec301360c Merge a large set of updates to the Asterisk indications API.
This patch includes a number of changes to the indications API.  The primary
motivation for this work was to improve stability.  The object management
in this API was significantly flawed, and a number of trivial situations could
cause crashes.

The changes included are:

1) Remove the module res_indications.  This included the critical functionality
   that actually loaded the indications configuration.  I have seen many people
   have Asterisk problems because they accidentally did not have an
   indications.conf present and loaded.  Now, this code is in the core,
   and Asterisk will fail to start without indications configuration.

   There was one part of res_indications, the dialplan applications, which did
   belong in a module, and have been moved to a new module, app_playtones.

2) Object management has been significantly changed.  Tone zones are now
   managed using astobj2, and it is no longer possible to crash Asterisk by
   issuing a reload that destroys tone zones while they are in use.

3) The API documentation has been filled out.

4) The API has been updated to follow our naming conventions.

5) Various bits of code throughout the tree have been updated to account
   for the API update.

6) Configuration parsing has been mostly re-written.

7) "Code cleanup"

The code is from svn/asterisk/team/russell/indications/.

Review: http://reviewboard.digium.com/r/149/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 20:41:24 +00:00
Tilghman Lesher 80f91f6ab7 Merged revisions 172438 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172438 | tilghman | 2009-01-29 16:54:29 -0600 (Thu, 29 Jan 2009) | 9 lines
  
  Lose the CAP_NET_ADMIN at every fork, instead of at startup.  Otherwise, if
  Asterisk runs as a non-root user and the administrator does a 'restart now',
  Asterisk loses the ability to set QOS on packets.
  (closes issue #14004)
   Reported by: nemo
   Patches: 
         20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29 23:15:40 +00:00
Tilghman Lesher 02094f7fb9 Merged revisions 169722 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169722 | tilghman | 2009-01-21 15:02:32 -0600 (Wed, 21 Jan 2009) | 8 lines
  
  Extra NULLs in the output cause some terminal types to abort in the middle of
  a color code, causing terminal weirdness.
  (closes issue #14130)
   Reported by: coolmig
   Patches: 
         20090121__bug14130.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76, coolmig
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-21 21:03:40 +00:00
Michiel van Baak fae3ba7421 fix assignment in swapmode plug.
Spotted and fix provided by ys

(closes issue #14129)
Reported by: ys
Tested by: ys


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 20:14:27 +00:00
Michiel van Baak ffb3f301af Make asterisk compile on non-amd64 versions of OpenBSD.
The HW_PHYSMEM64 is only available in latest OpenBSD and/or amd64 versions of OpenBSD.
Use HW_PHYSMEM when HW_PHYSMEM64 is not available.

(closes issue #14129)
Reported by: ys
Patches:
      2009011600_physmem64.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak, jtodd


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 18:36:24 +00:00
Michiel van Baak d7eaa9c6aa Fix compilation on FreeBSD and OSX
This started as work to fix the 'core show sysinfo'
CLI command but while working on it oej
pointed out that read_credentials did not compile neither.
So while being there, fix that as well.

Thanks for all the testing oej!

(closes issue #14129)
Reported by: ys
Tested by: oej, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 19:36:57 +00:00
Terry Wilson 7c6d9c7235 Add option to hide console connect messages
(closes issue #14222)
Reported by: jamesgolovich
Patches: 
      asterisk-hideconnect.diff.txt uploaded by jamesgolovich (license 176)
Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 23:00:27 +00:00
Olle Johansson 0bad5fd12e Don't include swap.h unless we have swapctl
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 14:35:09 +00:00
Jeff Peeler 334a89f754 When parsing environment variable ASTERISK_PROMPT, make sure to proceed to the next character when a non format specifier is used (no %). Otherwise, the while loop looking for the null byte will never exit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-03 20:29:54 +00:00
Russell Bryant 53f788c6b5 Fix build issues on Linux after sysinfo related changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:49:25 +00:00
Michiel van Baak d2d96b10ac introduce 'core show sysinfo' for systems that dont have the Linux-ish sysinfo stuff but do have sysctl.
(closes issue #13433)
Reported by: mvanbaak
Patches:
      2008121300_sysinfosysctl.diff.txt uploaded by mvanbaak (license 7)
	  with two free calls replaced with ast_free based on feedback on reviewboard
Review:
      http://reviewboard.digium.com/r/91/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:08:34 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Tilghman Lesher 5e034d9f0b Merged revisions 163761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r163761 | tilghman | 2008-12-12 16:03:10 -0600 (Fri, 12 Dec 2008) | 7 lines
  
  Simple fix for Ctrl-C not immediately exiting Asterisk, but also add a
  pointer inside editline to look back to asterisk.c, so others don't spend
  as much time as I did looking (in the wrong place) for the appropriate
  function.
  Reported by: ZX81, via the #asterisk-users channel
  Fixed by: me (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 22:04:26 +00:00
Tilghman Lesher 592cab8202 Merged revisions 163383 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r163383 | tilghman | 2008-12-11 17:35:55 -0600 (Thu, 11 Dec 2008) | 9 lines
  
  When a Ctrl-C or Ctrl-D ends a remote console, on certain shells, the terminal
  is messed up.  By intercepting those events with a signal handler in the remote
  console, we can avoid those issues.
  (closes issue #13464)
   Reported by: tzafrir
   Patches: 
         20081110__bug13464.diff.txt uploaded by Corydon76 (license 14)
   Tested by: blitzrage
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 23:38:56 +00:00