aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_oss.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-09Merged revisions 269497 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r269497 | russell | 2010-06-09 17:19:20 -0500 (Wed, 09 Jun 2010) | 9 lines Merged revisions 269495 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r269495 | russell | 2010-06-09 17:18:37 -0500 (Wed, 09 Jun 2010) | 2 lines Don't stop Asterisk if chan_oss fails to register 'Console' (due to another channel driver already claiming it). ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@269502 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02Merged revisions 249893 via svnmerge from dvossel1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r249893 | dvossel | 2010-03-02 13:08:38 -0600 (Tue, 02 Mar 2010) | 11 lines fixes adaptive jitterbuffer configuration When configuring the adaptive jitterbuffer, the target_extra value not only could not be set from the configuration, but was not even being set to its proper default. This value is required in order for the adaptive jitterbuffer to work correctly. To resolve this a config option has been added to expose this value to the conf files, and a default value is provided when no config specific value is present. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@249895 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-07Merged revisions 209400 via svnmerge from tilghman1-7/+0
https://origsvn.digium.com/svn/asterisk/trunk ........ r209400 | kpfleming | 2009-07-28 08:49:46 -0500 (Tue, 28 Jul 2009) | 3 lines Define side-effect-safe MIN and MAX macros and remove duplicate definitions from various files. (closes issue #16251) Reported by: asgaroth ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@238499 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-12Merged revisions 229750 via svnmerge from qwell1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r229750 | qwell | 2009-11-12 17:30:10 -0600 (Thu, 12 Nov 2009) | 1 line Fix mute toggling on OSS channels. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@229752 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-25Merged revisions 171187 via svnmerge from tilghman1-10/+11
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r171187 | tilghman | 2009-01-25 17:44:01 -0600 (Sun, 25 Jan 2009) | 6 lines Correctly track the hookstate (closes issue #13686) Reported by: itiliti Patches: 20081013__bug13686.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171188 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-18Numerous documentation updates.file1-2/+3
(closes issue #13970) Reported by: pkempgen Patches: __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165792 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05Janitor, use ARRAY_LEN() when possible.eliel1-2/+2
(closes issue #13990) Reported by: eliel Patches: array_len.diff uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04improve configure script to remember the previous value of each dependency ↵kpfleming1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@154151 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵kpfleming1-4/+9
branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09(closes issue #13557)murf1-1/+1
Reported by: nickpeirson Patches: pbx.c.patch uploaded by nickpeirson (license 579) replace_bzero+bcopy.patch uploaded by nickpeirson (license 579) Tested by: nickpeirson, murf 1. replaced all refs to bzero and bcopy to memset and memmove instead. 2. added a note to the CODING-GUIDELINES 3. add two macros to asterisk.h to prevent bzero, bcopy from creeping back into the source 4. removed bzero from configure, configure.ac, autoconfig.h.in git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28Merge the cli_cleanup branch.mvanbaak1-8/+8
This work is done by lmadsen, junky and mvanbaak during AstriDevCon. This is the second audit the CLI got, and this time lmadsen made sure he had _ALL_ modules loaded that have CLI commands in them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-25(closes issue #13557)murf1-1/+1
Reported by: nickpeirson The user attached a patch, but the license is not yet recorded. I took the liberty of finding and replacing ALL index() calls with strchr() calls, and that involves more than just main/pbx.c; chan_oss, app_playback, func_cut also had calls to index(), and I changed them out. 1.4 had no references to index() at all. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@144569 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingtilghman1-0/+3
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-09Fix a memory leak in chan_ossmmichelson1-3/+7
(closes issue #13311) Reported by: eliel Patches: chan_oss.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141995 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-30implement the 'freeze' function for incoming frames;rizzo1-0/+5
fix a bug which caused a crash when a videodevice was specified after startgui=1 in the config file. This also involves a slightly different method to determine if the gui is active or not. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126572 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-29implement a 'toggle' option for 'console mute' and 'console unmute'rizzo1-6/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126311 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causemvanbaak1-6/+6
- make data member of the ast_frame struct a named union instead of a void Recently the ast_queue_hangup function got a new parameter, the hangupcause Feedback came in that this is no good and that instead a new function should be created. This I did. The hangupcause was stored in the seqno member of the ast_frame struct. This is not very elegant, and since there's already a data member that one should be used. Problem is, this member was a void *. Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone wants to store another type in there in the future. This commit is so massive, because all ast_frame.data uses have to be altered to ast_frame.data.data Thanks russellb and kpfleming for the feedback. (closes issue #12674) Reported by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-24Pass the hangup cause all the way to the calling app/channel.mvanbaak1-1/+1
(closes issue #11328) Reported by: rain Patches: 20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14) brought up-to-date to trunk by me git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114637 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-14Merged revisions 108796 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r108796 | russell | 2008-03-14 15:09:22 -0500 (Fri, 14 Mar 2008) | 5 lines Fix a channel name issue. chan_oss registers the "Console" channel type, but it created channels with an "OSS" prefix. (closes issue #12194, reported by davidw, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108797 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Merged revisions 106235 via svnmerge from file1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things. (closes issue #12148) Reported by: jcomellas ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106239 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09make get_video_desc() return the active console ifrizzo1-2/+3
passed a null argument (channel). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97389 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-03eliminiate sound_thread() and other stuff from chan_oss since Asterisk ↵kpfleming1-235/+14
indications can handle it remove gentone and all the headers containing tones that are no longer needed git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96270 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27remove useless castsrizzo1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95068 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-22Build console_video support by linking in, as opposed to including,rizzo1-34/+30
console_video.c This will ease the task of splitting console_video.c into its components (V4L and X11 grabbers, various video codecs and packetizers, SDL), as well as ease future extensions (e.g. additional video sources, codecs and rendering engines). For the time being nothing changes for users: video support is off by default, and requires -DHAVE_VIDEO_CONSOLE on the command line to be included (if SDL and FFMPEG are available). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94615 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-20add some macros to simplify parsing the config file,rizzo1-45/+17
see description in config.h . They are a variant of the set of macros i used in chan_oss.c, structured in a way to be more robust to the presence of spurious ';' - basically, they define wrappers for 'do {' and '} while (0)', plus some helper functions to deal with simple cases such as ast_copy_string, ast_malloc, strtoul, ast_true ... The prefix (CV_ as 'Config Variable') tries to be easy to remember and has been chosen to not conflict with other existing macros in the tree. For the time being, I have only updated the three source files in the tree that used the old M_* macros. Hopefully, more files will be converted. NOTE: I understand that inventing my own dialect of C is generally wrong; however, the lack of adequate support in the language encourages lazy programming practices (such as ignoring errors, bounds, etc.) and this increases the chance of vulnerability in the code, especially because we are parsing user input here. Hopefully, these macros and the use of ast_parse_arg (in config.h) should encourage the programmer to write more robust code. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94191 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17surprising as it may be, chan_oss compiles correctly under cygwin as well,rizzo1-2/+1
provided you look for soundcard.h in the right place... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17make the configure script detect that it is running on a Windows platform, ↵kpfleming1-0/+1
and report that information so that menuselect can use it (all information that is used to decide whether to build modules or not must be fed to menuselect so the user knows what will be built and why... don't make module build decisions in the makefiles, please) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93211 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-15remove some redundant headersrizzo1-12/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93143 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23put in the necessary hooks for video support in the console.rizzo1-2/+80
This is a NOP as far as the current code is concerned, but there is already support in ./configure and the Makefiles for the various libraries used by console_video.c (not yet in the tree) so addition is trivial. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89533 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-2/+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-4/+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-16move the inner part of config file parsing to a separate function,rizzo1-22/+27
so it can be reused in the implementation of cli commands when they have a similar syntax. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89320 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14make the 'name' and 'value' fields in ast_variable const char *rizzo1-4/+4
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-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-10/+10
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-10/+10
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)russell1-51/+67
(closes issue #10724) Reported by: eliel Patches: chan_skinny.c.patch uploaded by eliel (license 64) chan_oss.c.patch uploaded by eliel (license 64) chan_mgcp.c.patch2 uploaded by eliel (license 64) pbx_config.c.patch uploaded by seanbright (license 71) iax2-provision.c.patch uploaded by eliel (license 64) chan_gtalk.c.patch uploaded by eliel (license 64) pbx_ael.c.patch uploaded by seanbright (license 71) file.c.patch uploaded by seanbright (license 71) image.c.patch uploaded by seanbright (license 71) cli.c.patch uploaded by moy (license 222) astobj2.c.patch uploaded by moy (license 222) asterisk.c.patch uploaded by moy (license 222) res_limit.c.patch uploaded by seanbright (license 71) res_convert.c.patch uploaded by seanbright (license 71) res_crypto.c.patch uploaded by seanbright (license 71) app_osplookup.c.patch uploaded by seanbright (license 71) app_rpt.c.patch uploaded by seanbright (license 71) app_mixmonitor.c.patch uploaded by seanbright (license 71) channel.c.patch uploaded by seanbright (license 71) translate.c.patch uploaded by seanbright (license 71) udptl.c.patch uploaded by seanbright (license 71) threadstorage.c.patch uploaded by seanbright (license 71) db.c.patch uploaded by seanbright (license 71) cdr.c.patch uploaded by moy (license 222) pbd_dundi.c.patch uploaded by moy (license 222) app_osplookup-rev83558.patch uploaded by moy (license 222) res_clioriginate.c.patch uploaded by moy (license 222) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85460 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13Merged revisions 79174 via svnmerge from file1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines (closes issue #10437) Reported by: haklin Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79175 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-08Add support for using epoll instead of poll. This should increase ↵file1-2/+2
scalability and is done in such a way that we should be able to add support for other poll() replacements. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78683 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26Do a massive conversion for using the ast_verb() macrorussell1-6/+3
(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: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-5/+5
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-13Merged revisions 61644 via svnmerge from murf1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61644 | murf | 2007-04-13 11:01:02 -0600 (Fri, 13 Apr 2007) | 1 line A fix for chan_oss that resulted from the CDR changes; it helps to use the right info. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61646 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-10Merged revisions 60989 via svnmerge from murf1-5/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered. This also adds the mods from 1.4/r.61136; ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61152 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-18add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in ↵kpfleming1-1/+1
#if expressions will be caught convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important) Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated git-svn-id: http://svn.digium.com/svn/asterisk/trunk@55329 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23Merged revisions 51788 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51788 | file | 2007-01-23 17:46:31 -0500 (Tue, 23 Jan 2007) | 2 lines Update channel drivers to use module referencing so that unloading them while in use will not result in crashes. (issue #8897 reported by junky) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51801 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19Merged revisions 51311 via svnmerge from russell1-3/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51311 | russell | 2007-01-19 11:49:38 -0600 (Fri, 19 Jan 2007) | 23 lines Merge the changes from the /team/group/vldtmf_fixup branch. The main bug being addressed here is a problem introduced when two SIP channels using SIP INFO dtmf have their media directly bridged. So, when a DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk would try to emulate a digit of some length by first sending a DTMF BEGIN frame and sending a DTMF END later timed off of incoming audio. However, since there was no audio coming in, the DTMF_END was never generated. This caused DTMF based features to no longer work. To fix this, the core now knows when a channel doesn't care about DTMF BEGIN frames (such as a SIP channel sending INFO dtmf). If this is the case, then Asterisk will not emulate a digit of some length, and will instead just pass through the single DTMF END event. Channel drivers also now get passed the length of the digit to their digit_end callback. This improves SIP INFO support even further by enabling us to put the real digit duration in the INFO message instead of a hard coded 250ms. Also, for an incoming INFO message, the duration is read from the frame and passed into the core instead of just getting ignored. (issue #8597, maybe others...) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51314 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-15Feature: allow soundcard to be used in both modes (autoanswer and not),tilghman1-3/+28
selectable by how it is called in the dialplan. This allows a speaker system hooked up to the soundcard to be used for both ring notification, as well as paging. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@50847 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-29Convert various comments to doxygen format.russell1-54/+60
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49056 f38db490-d61c-443f-a65b-d21fe96a405b