Commit Graph

115 Commits

Author SHA1 Message Date
Matthew Jordan 15d266bf85 res/res_config_odbc: Fix improper escaping of backslashes with MySQL
When escaping backslashes with MySQL, the proper way to escape the characters
in a LIKE clause is to escape the '\' four times, i.e., '\\\\'. To quote the
MySQL manual:

"Because MySQL uses C escape syntax in strings (for example, “\n” to represent
a newline character), you must double any “\” that you use in LIKE strings.
For example, to search for “\n”, specify it as “\\n”. To search for “\”,
specify it as “\\\\”; this is because the backslashes are stripped once by the
parser and again when the pattern match is made, leaving a single backslash to
be matched against."

ASTERISK-24808 #close
Reported by: Javier Acosta
patches:
  res_config_odbc.diff uploaded by Javier Acosta (License 6690)
........

Merged revisions 432720 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432721 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-10 21:33:55 +00:00
Mark Michelson dcf1ad14da Add module support level to ast_module_info structure. Print it in CLI "module show" .
ASTERISK-23919 #close
Reported by Malcolm Davenport

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 16:47:17 +00:00
Matthew Jordan fb5690ce4b Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages
This patch addresses some aesthetic issues in Asterisk. These are all just
minor tweaks to improve the look of the CLI when used in a variety of
settings. Specifically:
 * A number of chatty verbose messages were removed or demoted to DEBUG
   messages. Verbose messages with a verbosity level of 5 or higher were -
   if kept as verbose messages - demoted to level 4. Several messages
   that were emitted at verbose level 3 were demoted to 4, as announcement
   of dialplan applications being executed occur at level 3 (and so the
   effects of those applications should generally be less).
 * Some verbose messages that only appear when their respective 'debug'
   options are enabled were bumped up to always be displayed.
 * Prefix/timestamping of verbose messages were moved to the verboser
   handlers. This was done to prevent duplication of prefixes when the
   timestamp option (-T) is used with the CLI.
 * Verbose magic is removed from messages before being emitted to
   non-verboser handlers. This prevents the magic in multi-line verbose
   messages (such as SIP debug traces or the output of DumpChan) from
   being written to files.
 * _Slightly_ better support for the "light background" option (-W) was
   added. This includes using ast_term_quit in the output of XML
   documentation help, as well as changing the "Asterisk Ready" prompt to
   bright green on the default background (which stands a better chance of
   being displayed properly than bright white).

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 22:54:12 +00:00
Joshua Colp dcfae78574 res_config_odbc: Use dynamically sized buffers to store row data so values do not get truncated.
ASTERISK-23582 #close
ASTERISk-23582 #comment Reported by: Walter Doekes

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

Merged revisions 414693 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414694 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 414695 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 11:37:50 +00:00
Walter Doekes b14a4389e6 res_config_odbc: Fix old and new ast_string_field memory leaks.
The ODBC realtime driver uses ^NN parameter encoding to cope with the
special meaning of the semi-colon. A semi-colon in a field is
interpreted as if the key was supplied twice, something which isn't
otherwise possible with fixed database columns. E.g. allow=alaw;ulaw
is parsed as allow=alaw and allow=ulaw. A literal semi-colon is
rewritten to ^3B when stored in the database.

The module uses a stringfield to efficiently store the encoded
parameters. However, this stringfield wasn't always freed in some
off-nominal cases.

Commit r413241 fixed initialization so the encoding for INSERT and
DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
apparently.) But that commit forgot the frees. This change cleans
that up.

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

Merged revisions 414564 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414565 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 414566 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-27 20:03:00 +00:00
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:49:26 +00:00
Mark Michelson 2d572eafb9 Fix encoding of custom prepare extra data.
Patches:
	res_config_odbc-take2.patch by John Hardin (License #6512)
........

Merged revisions 413396 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413397 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413398 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 17:56:04 +00:00
Mark Michelson 3f5d4516bd Ensure that all parts of SQL UPDATEs and DELETEs are encoded.
Patches:
	res_config_odbc.patch by John Hardin (License #6512)
........

Merged revisions 413304 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413305 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413306 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 17:12:19 +00:00
Mark Michelson ff1841fcfb Prevent crashes in res_config_odbc due to uninitialized string fields.
Patches:
    odbc-crash.patch by John Hardin (License #6512)
........

Merged revisions 413241 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413251 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413258 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:28:23 +00:00
Matthew Jordan a438a0e65f res_config_odbc: Fix for nullable integer columns and keyfield existence check in update_odbc.
This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

Also, the check for existence of a mandatory column checked for the first
column in the list instead of the key field lookup column. This patch fixes
that issue as well.

Finally, the compatibility option allow_empty_string_in_nontext, which was
added to previous revisions to allow for some database backends with certain
schemas to function, has been removed.

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

ASTERISK-23459 #close
ASTERISK-23351 #close

(closes issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 17:09:14 +00:00
Michael L. Young 8f05ed46fe Fix Finding Extensions With Patterns Using ODBC Realtime
After the merge of support for the realtime sorcery module, extensions that
contained a pattern were not being found through odbc realtime.  It was tracked
down to this one line that was advancing to the next variable list before it
should have been.  The removal of this one line fixes this.

Tested this fix on my machine.

Received confirmation that this is the right fix from file on IRC.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10 20:28:18 +00:00
Joshua Colp 02be50b1ac Add support for a realtime sorcery module.
This change does the following:

1. Adds the sorcery realtime module
2. Adds unit tests for the sorcery realtime module
3. Changes the realtime core to use an ast_variable list instead of variadic arguments
4. Changes all realtime drivers to accept an ast_variable list

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-27 12:01:29 +00:00
Kinsey Moore c6142cf2cc Fix coverity UNUSED_VALUE findings in core support level files
Most of these were just saving returned values without using them and
in some cases the variable being saved to could be removed as well.

(issue ASTERISK-19672)
........

Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11 15:23:30 +00:00
Richard Mudgett dd2427c141 Coverity Report: Fix issues for error type REVERSE_INULL (core modules)
* Fixes findings: 0-2,5,7-15,24-26,28-31

(issue ASTERISK-19648)
Reported by: Matt Jordan
........

Merged revisions 368039 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368042 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-31 18:39:30 +00:00
Jonathan Rose f88a632d96 Make use of va_args more appropriate to form in various res_config modules plus utils.
A number of va_copy operations weren't matched with a corresponding va_end in res_config_odbc. Also, there was a potential for va_end to be invoked twice on the same va_arg in utils, which would mean invoking va_end on an undefined variable... which is bad.
va_end is removed from various functions in config_pgsql and config_curl since they aren't making their own copy.  The invokers of those functions are responsible for calling va_end on them.

(issue ASTERISK-19451)
Reported by: Walter Doekes
Review: https://reviewboard.asterisk.org/r/1848/
........

Merged revisions 362354 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 362357 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 21:10:50 +00:00
Tilghman Lesher e68be70646 Merged revisions 334230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334230 | tilghman | 2011-09-01 12:30:19 -0500 (Thu, 01 Sep 2011) | 25 lines
  
  Merged revisions 334229 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334229 | tilghman | 2011-09-01 12:28:09 -0500 (Thu, 01 Sep 2011) | 18 lines
    
    Create a local alias for ast_odbc_clear_cache.
    
    As a function pointer, the reference has to be resolved at load time
    irrespective of the RTLD_LAZY flag.  Creating a local alias solves
    this problem, because the structure is initialized with that local
    function pointer, while the actual function can remain lazily linked
    until runtime.
    
    The reason why this is important is because we lazily load function
    references during the module loading process, in order to obtain
    priority values for each module, ensuring that modules are loaded in
    the correct order.  Previous to this change, when this module was
    initially loaded, the module loader would emit a symbol resolution
    error, because of the above requirement.
    
    Closes ASTERISK-18399 (reported by Mikael Carlsson, fix suggested by
    Walter Doekes, patch by me)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-01 17:31:34 +00:00
Richard Mudgett bac5a51e21 Merged revisions 332830 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332830 | rmudgett | 2011-08-22 13:32:09 -0500 (Mon, 22 Aug 2011) | 15 lines
  
  Merged revisions 332816 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332816 | rmudgett | 2011-08-22 13:14:59 -0500 (Mon, 22 Aug 2011) | 8 lines
    
    Memory leaks in realtime_multi_xxx() when database access returns error.
    
    * Fix realtime_multi_pgsql() configuration memory leak when the database 
    access returns an error.  
    
    * Fix realtime_multi_odbc() configuration category use after free when the
    database access returns an error.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 18:33:27 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Jonathan Rose c545e3b1c5 Merged revisions 326689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r326689 | jrose | 2011-07-07 11:04:51 -0500 (Thu, 07 Jul 2011) | 10 lines
  
  res_odbc patch by tilghman to fix integers with null values
  
  Addresses some improper sql statements in res_odbc that would cause an update to fail on
  realtime peers due to trying to set as "(NULL)" rather than an actual NULL.
  
  (closes issue #1922STERISK-17791)
  Reported by: marcelloceschia
  Patches: 
        20110505__issue19223.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 16:18:18 +00:00
Russell Bryant f0f5e237bf Merged revisions 317474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317474 | russell | 2011-05-05 17:36:33 -0500 (Thu, 05 May 2011) | 2 lines
  
  Fix more "set but unused" warnings.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:44:52 +00:00
Tilghman Lesher 67c91388db Merged revisions 310142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310142 | tilghman | 2011-03-09 23:53:29 -0600 (Wed, 09 Mar 2011) | 19 lines
  
  Merged revisions 310141 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310141 | tilghman | 2011-03-09 23:51:37 -0600 (Wed, 09 Mar 2011) | 12 lines
    
    Merged revisions 310140 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310140 | tilghman | 2011-03-09 23:38:44 -0600 (Wed, 09 Mar 2011) | 5 lines
      
      Initialize column size to 0 to deal with a potential UnixODBC bug on 64-bit systems.
      
      (closes issue #18295)
       Reported by: pruiz
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-10 05:54:53 +00:00
Tilghman Lesher 6f50b888ee Merged revisions 298482 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298482 | tilghman | 2010-12-16 03:05:28 -0600 (Thu, 16 Dec 2010) | 28 lines
  
  Merged revisions 298481 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r298481 | tilghman | 2010-12-16 03:04:38 -0600 (Thu, 16 Dec 2010) | 21 lines
    
    Merged revisions 298480 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r298480 | tilghman | 2010-12-16 03:03:40 -0600 (Thu, 16 Dec 2010) | 14 lines
      
      Only increment the pointer once per loop, otherwise we corrupt the value.
      
      (closes issue #18251)
       Reported by: bcnit
       Patches: 
             20101110__issue18251.diff.txt uploaded by tilghman (license 14)
       Tested by: trev, jthurman, elguero
      
      (closes issue #18279)
       Reported by: zerohalo
       Patches: 
             20101109__issue18279.diff.txt uploaded by tilghman (license 14)
       Tested by: zerohalo
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-16 09:06:20 +00:00
Jason Parker 7dd1392fba Merged revisions 283882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r283882 | qwell | 2010-08-27 15:31:55 -0500 (Fri, 27 Aug 2010) | 22 lines
  
  Merged revisions 283881 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r283881 | qwell | 2010-08-27 15:30:27 -0500 (Fri, 27 Aug 2010) | 15 lines
    
    Merged revisions 283880 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r283880 | qwell | 2010-08-27 15:29:11 -0500 (Fri, 27 Aug 2010) | 8 lines
      
      Fix issue with decoding ^-escaped characters in realtime.
      
      (closes issue #17790)
      Reported by: denzs
      Patches: 
            17790-chunky.diff uploaded by qwell (license 4)
      Tested by: qwell, denzs
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-27 20:32:21 +00:00
Tilghman Lesher 3ab0041118 Merge the realtime failover branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 16:19:21 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Tilghman Lesher a7c92fad28 Merged revisions 277568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277568 | tilghman | 2010-07-16 16:54:29 -0500 (Fri, 16 Jul 2010) | 8 lines
  
  Since we split values at the semicolon, we should store values with a semicolon as an encoded value.
  
  (closes issue #17369)
   Reported by: gkservice
   Patches: 
         20100625__issue17369.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 17:39:28 +00:00
Tilghman Lesher c9dd40c1f6 Verify support for wide ODBC character types before using them.
(closes issue #15870)
 Reported by: nic_bellamy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 18:17:14 +00:00
Tilghman Lesher 6b53ec413d Fix 2 typos and add support for wide character types.
Reported by Benny Amorsen via the asterisk-users mailing list.
http://lists.digium.com/pipermail/asterisk-users/2009-June/233622.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-19 15:47:55 +00:00
Kevin P. Fleming ab3e9ddad1 Merged revisions 182808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182808 | kpfleming | 2009-03-17 20:55:22 -0500 (Tue, 17 Mar 2009) | 5 lines
  
  Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.
  
  With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:21:23 +00:00
Tilghman Lesher 47db0f64f2 Fix how we skip fields (to avoid fields which don't exist) when doing an UPDATE.
(closes issue #14205)
 Reported by: maxgo
 Patches: 
       20090128__bug14205__5.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28 22:48:01 +00:00
Kevin P. Fleming 9a7efae8fd remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC
this stops modules from being linked against both sets of libraries on systems that have both installed



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 20:18:53 +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
Kevin P. Fleming 448562af93 improve configure script to remember the previous value of each dependency in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 15:07:54 +00:00
Tilghman Lesher c1351ad237 Merge realtime_update2 branch, which adds a new realtime API call named
'update2', which permits updates which match across multiple columns, instead
of requiring all tables to have a single unique identifier.  All of the other
API calls with the exception of 'update' already had the ability to match on
multiple fields, so it was a missing and very desireable feature that an API
call implementing an update should have this, too.

This does not change any outward performance of Asterisk, but it should make
life easier for application developers who use the RealTime framework.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 00:08:52 +00:00
Michiel van Baak 4560279c69 All ODBC parts can now use either unixodbc or iodbc.
This allows for the ODBC parts to work on OpenBSD as well.

99.99% of the work is done by seanbright (bow, bow) and I actually
did nothing but test and yell at him that it still didn't work :)

Thanks for helping out !


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 23:14:33 +00:00
Tilghman Lesher 8b0f38cc57 Merged revisions 129741 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129741 | tilghman | 2008-07-10 16:19:48 -0500 (Thu, 10 Jul 2008) | 2 lines

Oops

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-10 21:23:23 +00:00
Tilghman Lesher 97fe3abeec Move the table cache routines to res_odbc, so they can be used from other
places (app_voicemail, for example).
(Related to bug #11678)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 21:14:58 +00:00
Tilghman Lesher 53459f86b2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:51:59 +00:00
Tilghman Lesher 9471b87d27 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 19:07:27 +00:00
Tilghman Lesher d02f74ebfe An offhand comment from Russell made me realize that the configuration file
caching would not work properly for users.conf and any other file read from
more than one place.  I needed to add the filename which requested the config
file to get it to work properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 22:55:16 +00:00
Tilghman Lesher f1de129e5f Merged revisions 89559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89559 | tilghman | 2007-11-25 11:17:10 -0600 (Sun, 25 Nov 2007) | 14 lines

We previously attempted to use the ESCAPE clause to set the escape delimiter to
a backslash.  Unfortunately, this does not universally work on all databases,
since on databases which natively use the backslash as a delimiter, the
backslash itself needs to be delimited, but on other databases that have no
delimiter, backslashing the backslash causes an error.

So the only solution that I can come up with is to create an option in res_odbc
that explicitly specifies whether or not backslash is a native delimiter.  If
it is, we use it natively; if not, we use the ESCAPE clause to make it one.

Reported by: elguero
Patch by: tilghman
(Closes issue #11364)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-25 17:50:07 +00:00
Tilghman Lesher 6792b619f7 Merged revisions 89534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89534 | tilghman | 2007-11-23 11:05:10 -0600 (Fri, 23 Nov 2007) | 5 lines

Use ESCAPE clause for the first parameter, not just 2nd-Nth parameters.
Reported by: apsaras
Patch by: tilghman
(Closes issue #11353)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23 17:09:06 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo 0595b5e2aa include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 18:52:04 +00:00
Luigi Rizzo fdb7f7ba3d 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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Russell Bryant d78463be1e 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: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 15:23:19 +00:00
Jason Parker d72ea80a00 Doxygen cleanups/fixes.
Closes issue #10654, patch by snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-05 16:31:39 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Tilghman Lesher c78ddffb04 store and destroy implementations for sqlite (closes issue #10446) and odbc (closes issue #10447)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 13:45:44 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00