Commit Graph

134 Commits

Author SHA1 Message Date
Sean Bright cce02a9d60 extconfig: Allow explicit DB result set ordering to be disabled.
Added a new boolean configuration flag -
`order_multi_row_results_by_initial_column` - to both res_pgsql.conf
and res_config_odbc.conf that allows the administrator to disable the
explicit `ORDER BY` that was previously being added to all generated
SQL statements that returned multiple rows.

Fixes: #179
(cherry picked from commit 29eb4fe620)
2023-09-06 16:55:59 +00:00
Kevin Harwell 4cbe12d6d1 cel_odbc & res_config_odbc: Add support for SQL_DATETIME field type
See also: ASTERISK_30023

ASTERISK-30096 #close
patches:
  inline on issue - submitted by Morvai Szabolcs

Change-Id: I79c0b74862100acd9c8319dca5cc456a654d02eb
2022-07-11 04:13:13 -05:00
Alexander Traud 00fc7212bd odbc: Fix for Doxygen.
ASTERISK-29754

Change-Id: Ia09eb68d283d201d9a6fbeccfc0efe83fe0502a5
2021-11-19 02:50:36 -06:00
Josh Soref 9ae9893c63 res: Spelling fixes
Correct typos of the following word families:

identifying
structures
actcount
initializer
attributes
statement
enough
locking
declaration
userevent
provides
unregister
session
execute
searches
verification
suppressed
prepared
passwords
recipients
event
because
brief
unidentified
redundancy
character
the
module
reload
operation
backslashes
accurate
incorrect
collision
initializing
instance
interpreted
buddies
omitted
manually
requires
queries
generator
scheduler
configuration has
owner
resource
performed
masquerade
apparently
routable

ASTERISK-29714

Change-Id: I88485116d2c59b776aa2e1f8b4ce8239a21decda
2021-11-15 16:37:34 -06:00
Sean Bright 60925c68e8 Revert "res_config_odbc: Preserve empty strings returned by the database"
This reverts commit a3a2fbaec6.

Reason for revert: There is a lot of code that relies on the broken
behavior that this fixes.

Change-Id: I410c395a0168acbdaf89e616e3cb5e1312d190cb
2020-04-07 18:11:55 -05:00
Sean Bright eb9252ea27 res_config_odbc: Preserve empty strings returned by the database
When res_config_odbc (and perhaps other realtime backends) reads a SQL
NULL from the database, it coalesces the value to the empty string
which prevents it from being returned to the realtime core.

However, if it instead reads the empty string from the database, it
needs a way to encode that fact without having the value omitted
entirely. It does this by changing the value to a string with a single
space. The realtime code in main/config.c recognizes this special case
and _turns the string back into the empty string_ before passing it to
realtime API consumers.

For all of this to work, we need to ensure that we actually pass the
single-space-string back to the realtime core, which is currently
failing because we are trimming the value before checking its
content. So instead we now special case the single-space-string case
so that empty values are returned properly.

ASTERISK-28719 #close
Reported by: EDV O-TON

Change-Id: I673ed8c31ad037aa224e80c78c7a1dc4e4a4e3de
2020-01-29 09:15:10 -06:00
Alexei Gradinari e5d990d01d res_config_odbc: set empty extended field as a single whitespace
If Realtime @ variable value is NULL or empty or contains only whitespaces
then when we try to retrieve it using PJSIP_ENDPOINT we get WARNING
pjsip_endpoint_function_read: Unknown property @my_var for PJSIP endpoint.
And the variable is missing in the result of CLI pjsip show endpoint.

This patch keeps empty sorcery extended field.

ASTERISK-28341 #close

Change-Id: I221fccc04cbfa2be17ce971f64ae0e74e465eea0
2019-03-25 10:43:54 -06:00
Sean Bright 719a4643ab res_config_odbc: Avoid deadlock when max_connections = 1
Rather than calling ast_odbc_find_table() in the prepare callback, call
it beforehand and pass it in to the callback to avoid the need for a
second connection.

ASTERISK-28166 #close

Change-Id: I6f8a0b9990d636fd6bc1a92ed70f7050d2436202
2019-02-28 14:46:16 -06:00
Joshua Colp 54a912b26d res_odbc: Add basic query logging.
When Asterisk is connected and used with a database the response
time of the database can cause problems in Asterisk if it is long.
Normally the only way to see this problem would be to retrieve a
backtrace from Asterisk and examine where things are blocked, or
examine the database to see if there is any indication of a
problem.

This change adds some basic query logging to make it easier to
investigate such a problem. When logging is enabled res_odbc will
now keep track of the number of queries executed, as well as the
query that has taken the longest time to execute. There is also
an option which will cause a WARNING message to be output if a
query takes longer than a configurable amount of time to execute.

This makes it easier and clearer for users that their database may
be experiencing a problem that could impact Asterisk.

ASTERISK-28277

Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
2019-02-07 08:23:14 -06:00
Alexei Gradinari e6a69ea2cf res_odbc: fix missing SQL error diagnostic
On SQL error there is not diagnostic information about this error.
There is only
WARNING res_odbc.c: SQL Execute error -1!

The function ast_odbc_print_errors calls a SQLGetDiagField to get the number
of available diagnostic records, but the SQLGetDiagField returns 0.
However SQLGetDiagRec could return one diagnostic records in this case.

Looking at many example of getting diagnostics error information
I found out that the best way it's to use only SQLGetDiagRec
while it returns SQL_SUCCESS.

Also this patch adds calls of ast_odbc_print_errors on SQL_ERROR
to res_config_odbc.

ASTERISK-28065 #close

Change-Id: Iba5ae5470ac49ecd911dd084effbe9efac68ccc1
2018-09-26 09:25:10 -05:00
Corey Farrell 572a508ef2 loader: Convert reload_classes to built-in modules.
* acl (named_acl.c)
* cdr
* cel
* ccss
* dnsmgr
* dsp
* enum
* extconfig (config.c)
* features
* http
* indications
* logger
* manager
* plc
* sounds
* udptl

These modules are now loaded at appropriate time by the module loader.
Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so
the module loader will abort startup on failure of these modules.

Some of these modules are still initialized or shutdown from outside the
module loader.  logger.c is initialized very early and shutdown very
late, manager.c is initialized by the module loader but is shutdown by
the Asterisk core (too much uses it without holding references).

Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
2018-03-14 05:20:12 -04:00
Alexander Traud 162fc4fba6 BuildSystem: Depend not implicitly but explicitly on external libraries.
ASTERISK-27722

Change-Id: Ie7b8c30d86cb00a54d6ac4e09e6f28f42d2bd52c
2018-03-06 14:33:14 +01:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Sean Bright 6e6c96d713 realtime: Centralize some common realtime backend code
All of the realtime backends create artificial ast_categorys to pass
back into the core as query results. These categories have no filename
or line number information associated with them and the backends differ
slightly on how they create them. So create a couple helper macros to
help make things more consistent.

Also updated the call sites to remove redundant error messages about
memory allocation failure.

Note that res_config_ldap sets the category filename to the 'table name'
but that is not read by anything in the core, so I've dropped it.

Change-Id: I3a1fd91e0c807dea1ce3b643b0a6fe5be9002897
2017-02-21 10:53:17 -06:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Richard Mudgett 2820b13393 res_config_odbc.c: Fix buffer size limitation creating invalid SQL.
Creating ODBC SQL queries resulted in queries too large to fit into the
supplied buffer.  The resulting truncated buffer contained an invalid SQL
query.

* Made SQL query generation code use a thread storage buffer that can
increase in size as needed.

* Fixed bad multi-line warning messages.

ASTERISK-26263 #close
Reported by: Jeppe Ryskov Larsen

Change-Id: I23f3cdd43c2dac80bed3ded4dd77d18cb17f21ae
2016-09-16 12:00:12 -05:00
Alexei Gradinari c832f100d9 res_sorcery_realtime: fix bug when successful UPDATE is treated as failed
If the SQL UPDATE statement changes nothing then SQLRowCount returns 0.
This value should be treated as success.
But the function sorcery_realtime_update treats it as failed.

This bug was found using stress tests on PJSIP.
If there are 2 consecutive SIP REGISTER requests with the same contact data
during 1 second then res_pjsip_registrar adds contact location on 1st request
and tries to update contact location on 2nd.
The update fails and res_pjsip_registrar even removes correct contact location.

The test "object_update_uncreated" was removed from test_sorcery_realtime.c
because it's now a valid situation.

This patch also adds missing debug of extra SQL parameter.

ASTERISK-26172 #close

Change-Id: I05a7f3051455336c9dda29efc229decf86071303
2016-07-07 12:16:14 -05:00
Rodrigo Ramírez Norambuena eec010829a AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-05-13 16:34:23 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
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