aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
AgeCommit message (Collapse)AuthorFilesLines
2008-12-17Merged revisions 165318 via svnmerge from mmichelson1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r165318 | mmichelson | 2008-12-17 15:17:20 -0600 (Wed, 17 Dec 2008) | 15 lines Merged revisions 165255 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines Fix some memory leaks found while looking at how realtime configs are handled. Also cleaned up some coding guidelines violations in app_realtime.c, mostly related to spacing ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@165322 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-11Don't blow up if we get NULL when trying to parse out the full name fieldrussell1-1/+1
(fixed for Jared in the training room) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@156012 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-29Merged revisions 152646 via svnmerge from mmichelson1-0/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r152646 | mmichelson | 2008-10-29 15:53:53 -0500 (Wed, 29 Oct 2008) | 9 lines If there was no named defined in a voicemail.conf mailbox entry, then app_directory would crash when attempting to read that entry from the file. We now check for the NULL or empty string properly so that there will be no crash. (closes issue #13804) Reported by: bluecrow76 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@152647 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-09whitespace fixes only.mvanbaak1-17/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103249 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-14Big improvement for app_directory. This patch breaks the do_directory ↵mmichelson1-397/+383
function up so that it is more easily parsed by the human brain. It also fixes some errors. I'll quote dimas from the original bug description: "app_directory contained some duplicate code even before addition of 'm' option. Addition of that option doubled amount of that code. Worst of all, there are minor differences between these code block and bugs caused by these differences. 1. There is a memory leak. In the 'menu' mode, result of the convert(pos) function is not freed while it should be. 2. In the 'menu' mode check for OPT_LISTBYFIRSTNAME flag ('f' option) is not negated as result, application works in the mode opposite to what user expect (checking last name when user wants the first nd vice versa). 3. select_item function plays message for user using res = func1() || func2() || func3()... construct. This construct loses the actual value returned by ast_waitstream() for example so at the end, res does not contain digit user dialed while listening to the message. 4. (also in 1.4) application announces entries from voicemail.conf/realtime separately from entries from users.conf. I see no reason why doing so instead of building combined list. 5. Alot of duplicated code as already mentioned." This was tested by dimas and I (I tested under valgrind). A word of caution: any bug fixes that happen in app_directory in 1.4 will almost certainly not merge cleanly into trunk as a result of this, but it is well worth it. Huge thanks to dimas for this wonderful submission. (closes issue #11744) Reported by: dimas Patches: dir3.patch uploaded by dimas (license 88) Tested by: putnopvut, dimas git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98888 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Resolve compiler warnings.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91193 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Added multiple name listing. (Closes issue #10413)tilghman1-105/+268
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91172 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22more removal of redundant headersrizzo1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89519 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19more errno.h removalrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-1/+0
were included almost everywhere. Remove some of the instances. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-3/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14make the 'name' and 'value' fields in ast_variable const char *rizzo1-2/+2
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵murf1-2/+2
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: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-3/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Merged revisions 78415 via svnmerge from tilghman1-15/+34
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78415 | tilghman | 2007-08-07 14:09:38 -0500 (Tue, 07 Aug 2007) | 2 lines Reconnection doesn't happen automatically when a DB goes down (fixes issue #9389) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78417 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵tilghman1-1/+1
few other formatting cleanups, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20Merged revisions 76139 via svnmerge from mmichelson1-3/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76139 | mmichelson | 2007-07-20 13:42:27 -0500 (Fri, 20 Jul 2007) | 6 lines When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available in the directory. (closes issue #10200, reported by mrskippy, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76140 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Applications no longer need to call ast_module_user_add and ↵file1-5/+0
ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Convert uses of strdup() to ast_strdup()russell1-1/+1
(issue #9983, eliel) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69436 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11Merged revisions 68781 via svnmerge from tilghman1-5/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r68781 | tilghman | 2007-06-11 15:45:53 -0500 (Mon, 11 Jun 2007) | 2 lines Issue 9947 - fn2 was unused / incorrectly used ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68782 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-6/+6
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-09Merged revisions 63566 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r63566 | tilghman | 2007-05-09 09:50:33 -0500 (Wed, 09 May 2007) | 10 lines Merged revisions 63565 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63565 | tilghman | 2007-05-09 09:48:06 -0500 (Wed, 09 May 2007) | 2 lines Replicate fix from 51158 (app_voicemail) to app_directory (Issue 9224) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63567 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09Merged revisions 60936 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r60936 | qwell | 2007-04-09 12:22:59 -0500 (Mon, 09 Apr 2007) | 13 lines Merged revisions 60935 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60935 | qwell | 2007-04-09 12:22:15 -0500 (Mon, 09 Apr 2007) | 5 lines Allow matching on names shorter than 3 chars. This also fixes the case where somebody wants to match on less then 3 chars. Issue 9071 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60937 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Merged revisions 59278 via svnmerge from russell1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r59278 | russell | 2007-03-27 18:20:22 -0500 (Tue, 27 Mar 2007) | 11 lines Merged revisions 59277 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59277 | russell | 2007-03-27 18:19:41 -0500 (Tue, 27 Mar 2007) | 3 lines Fix the check of the return value from mmap(). Thanks to Corydon for catching this one. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59279 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Merged revisions 59275 via svnmerge from russell1-10/+14
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59275 | russell | 2007-03-27 18:16:27 -0500 (Tue, 27 Mar 2007) | 3 lines Fix app_directory to actually compile with ODBC_STORAGE, and update the code to the latest res_odbc API. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59276 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21a quick fix to app_sms.c to get rid of cursed compiler warnings so I can ↵murf1-1/+1
compile under --enable-dev-mode git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48767 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-17This update fulfils the request of bug 7109, which claimed the language arg ↵murf1-5/+5
to ast_stream_and_wait() was redundant. Almost all calls just used chan->language, and seeing how chan is the first argument, this certainly seems redundant. A change of language could just as easily be done by simply changing the channel language before calling. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47821 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-5/+7
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-17Merged revisions 43072 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43072 | tilghman | 2006-09-17 08:54:34 -0500 (Sun, 17 Sep 2006) | 3 lines Directory used the wrong context for delivery of 0- and *- keypresses (according to Directory's own documentation) - Issue 7965 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43075 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16merge markster's usersconf branch with some slight changeskpfleming1-4/+60
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-19/+7
- 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: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-19Fix a bug with app_voicemail when trying to use app_directory to leave messagesqwell1-10/+19
to another user (options 3, 5, 2). If the context/extension didn't exist in the dialplan (and why should it have to?), it would fail, saying that it's an "invalid extension". (issue BE-71) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40426 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-30Merged revisions 36377 via svnmerge from tilghman1-0/+134
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r36377 | tilghman | 2006-06-30 09:05:53 -0500 (Fri, 30 Jun 2006) | 5 lines Bug 7349 - Directory did not work correctly when USE_ODBC_STORAGE was defined. Note: Russell agreed that this should have worked, which is why this is classified as a bugfix. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36380 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-30fix various typos and other bits (from Ian Kinner)kpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30800 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().russell1-4/+1
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26451 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-28minor cleanuprizzo1-46/+28
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23067 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21convert to use ast_stream_and_waitrizzo1-25/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22082 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14code simplificationsrizzo1-27/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20168 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-17/+8
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11 Provide the ability to read extension number after name #6938 (delink)bweschke1-5/+33
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19221 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-27Janitor work converting !ast_strlen_zero(a)?a:bmogorman1-1/+1
to S_OR functions. from bug note 6805 with minor modifications. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15283 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15remove the uses of the deprecated STANDARD_LOCAL_USERrussell1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10241 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21on this pass, only remove duplicate log messagesrussell1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8403 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21revert my pass through the tree to remove checks of the result of ast_strduparussell1-0/+6
(revisions 8378 through 8381) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8387 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21remove lots of useless checks of the result of ast_strduparussell1-6/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8379 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-11conversions to memory allocation wrappers (issue #6210)russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7991 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30update doxygen docs to specify authorsrussell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b