Commit Graph

39 Commits

Author SHA1 Message Date
Russell Bryant 8555b694ee make trunk build again. murf will have to review this to see if it was the right fix, as it is related to his last change.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 21:25:07 +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 8b63009338 Change this flag... might not otherwise unlock in an OOM situation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 14:41:33 +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
Mark Michelson c4c0e45c8b Merged revisions 78103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines

Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers.
Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the
IP address.

In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:54:51 +00:00
Jason Parker 3f0a1faed2 Merged revisions 78180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #9938)
........
r78180 | qwell | 2007-08-06 11:30:51 -0500 (Mon, 06 Aug 2007) | 5 lines

Fix an issue with using UpdateConfig (manager action) where escaped semicolons
 in a config would be converted to just semicolons (\; to ;)

Issue 9938

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:31:42 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Luigi Rizzo 72b99a2817 Introduce ast_parse_arg() , a generic function to parse strings
in a consistent way. This is meant to replace the custom code
which is repeated all over the place in the various files when
parsing config files, CLI entries and other string information.

Right now the code supports parsing int32, uint32 and sockaddr_in with
optional default values and bound checks. It contains minimal error
checking, but that can be easily extended as the need arises.

Being a new API i am introducing this only in trunk, though I believe
that once the interface has been ironed out it might become a
worthwhile addition to 1.4 as well - basically, the first time
we will need to fix a piece of argument parsing code, we might as
well bring in this change and use the new API instead.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 14:32:15 +00:00
Jason Parker a5bdba6074 Merged revisions 69470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r69470 | qwell | 2007-06-14 18:22:51 -0500 (Thu, 14 Jun 2007) | 12 lines

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

........
r69469 | qwell | 2007-06-14 18:21:45 -0500 (Thu, 14 Jun 2007) | 4 lines

Fix an issue where the line number in an unterminated comment block error message would show the wrong line number.

"Reported" to me on #asterisk (somebody posted an error message, and I happened to catch it)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 23:23:35 +00:00
Russell Bryant 055d82cbce Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 19:39:12 +00:00
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Olle Johansson 980642a846 Merged revisions 63254 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63254 | oej | 2007-05-07 22:05:15 +0200 (Mon, 07 May 2007) | 2 lines

Don't remove configuration from memory just because one section failed.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-07 20:07:38 +00:00
Joshua Colp 489f9c68c3 Merged revisions 61959 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r61959 | file | 2007-04-25 21:27:18 -0400 (Wed, 25 Apr 2007) | 10 lines

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

........
r61958 | file | 2007-04-25 21:25:03 -0400 (Wed, 25 Apr 2007) | 2 lines

Don't count failed include attempts against the configuration include level. (issue #9593 reported by mostyn)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 01:29:23 +00:00
Russell Bryant 97d0661327 Merged revisions 61690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61690 | russell | 2007-04-20 13:19:18 -0500 (Fri, 20 Apr 2007) | 4 lines

Fix the UpdateConfig manager action to properly treat "variables" and "objects"
differently (a=b versus a=>b).
(issue #9568, reported by pari, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20 18:23:24 +00:00
Steve Murphy 69bb679e14 via 8118, a RealTime upgrade to make RT a complete storage abstraction. The store/destroy mechanisms needed these missing peices.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 13:41:17 +00:00
Steve Murphy d6943624c8 Merged revisions 59225 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59225 | murf | 2007-03-26 14:06:12 -0600 (Mon, 26 Mar 2007) | 1 line

Fix for 9257; by eliminating the globals in main/config.c, we make it thread-safe, which is a minimum requirement.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 20:27:02 +00:00
Olle Johansson 75d387acbc Doxygen additions, corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-24 20:29:41 +00:00
Olle Johansson 8ac0fb2bc3 New CLI command "Core show settings" to list some core settings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14 20:22:20 +00:00
Joshua Colp 3388474e15 Merged revisions 53118 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53118 | file | 2007-02-02 10:59:53 -0600 (Fri, 02 Feb 2007) | 10 lines

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

........
r53117 | file | 2007-02-02 10:58:09 -0600 (Fri, 02 Feb 2007) | 2 lines

Pass the glob expanded filename to process_text_line so that error messages contain the actual filename, not the original include one. (issue #8959 reported by tzafrir)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-02 17:01:04 +00:00
Joshua Colp 21b53af31d Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 00:11:32 +00:00
Russell Bryant a01ebfc13b Merged revisions 51057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51057 | russell | 2007-01-15 19:15:44 -0600 (Mon, 15 Jan 2007) | 3 lines

It is possible for the config pointer to be NULL here, so it needs to be
checked before dereferencing it.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 01:16:57 +00:00
Tilghman Lesher 836956f1df Bug 8803 - Fix crash in API
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-14 05:34:32 +00:00
Joshua Colp 278f2fe4c1 Merged revisions 50405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50405 | file | 2007-01-10 14:46:29 -0500 (Wed, 10 Jan 2007) | 2 lines

Fix parsing when using something like ldap settings. (done by anthonyl)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 19:49:26 +00:00
Tilghman Lesher c4c2c546da When calling the Realtime app more than once, unset fields which were
previously set are erroneously still set (Bug 6701).  After discussion,
it was determined this should only be changed in trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-07 16:21:12 +00:00
Kevin P. Fleming d0f3b18d16 a little more const-ification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 23:58:53 +00:00
Kevin P. Fleming 87b9abc892 Merged revisions 49676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines

reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 22:43:18 +00:00
Joshua Colp 50d9c8ad07 Merged revisions 49551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49551 | file | 2007-01-04 17:28:29 -0500 (Thu, 04 Jan 2007) | 2 lines

Only free comments and line buffer once we reach the first level. (issue #8678 reported by ssokol, fixed by anthonyl)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 22:34:24 +00:00
Kevin P. Fleming 1c86ec8222 Merged revisions 47690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47690 | kpfleming | 2006-11-15 14:01:22 -0600 (Wed, 15 Nov 2006) | 20 lines

Merged revisions 47686,47688-47689 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47686 | kpfleming | 2006-11-15 13:42:05 -0600 (Wed, 15 Nov 2006) | 2 lines

clear the category's variable tail pointer as well when variables are detached from it

........
r47688 | kpfleming | 2006-11-15 13:47:43 -0600 (Wed, 15 Nov 2006) | 2 lines

when appending a list of variable to a category, ensure the tail pointer points to the last variable in the list

........
r47689 | kpfleming | 2006-11-15 13:58:46 -0600 (Wed, 15 Nov 2006) | 2 lines

when re-writing the config file, don't repeat the path if it hasn't changed

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 20:05:26 +00:00
Kevin P. Fleming 00c5f6d032 Merged revisions 47684 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47684 | kpfleming | 2006-11-15 12:43:30 -0600 (Wed, 15 Nov 2006) | 10 lines

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

........
r47682 | kpfleming | 2006-11-15 12:39:47 -0600 (Wed, 15 Nov 2006) | 2 lines

ouch... don't use printf, use ast_log/ast_verbose

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 18:44:29 +00:00
Steve Murphy cd74836d3a This solves bug 8342, whereby a crash occurs under certain circumstances while reading a config file with comments-- a call to CB_ADD shouldn't happen if withcomments is zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 19:15:45 +00:00
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
Steve Murphy 1bb9f6b362 Cleanups suggested by Russell.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 17:46:40 +00:00
Mark Spencer b7517f1231 Fix comment preservation code (thanks murf!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 01:38:47 +00:00
Tilghman Lesher 2b55678e1f Remove deprecated CLI apps from the core
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:17:39 +00:00
Tilghman Lesher 70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Matt O'Gorman d0a1a0033d similar patch for verbose vs debug with minor changes
bug 2617


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:23:45 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Kevin P. Fleming c2c4f86c72 merge markster's usersconf branch with some slight changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 23:53:58 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00