From: Jason Parker Date: Thu, 3 May 2012 20:06:49 +0000 (+0000) Subject: Multiple revisions 361208,361211,361270,361330,361333,361381,361422,361472,361522... X-Git-Tag: 10.5.0-digiumphones-rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0e27a76f0e446e40fd860cfd1a9b308fc385214;p=thirdparty%2Fasterisk.git Multiple revisions 361208,361211,361270,361330,361333,361381,361422,361472,361522,361560,361607,361658,361706,361754,361804,361855,361907,361956,361981,362080,362084,362152,362202,362205,362264,362305,362356-362357,362360,362364,362377,362429,362496,362537,362587,362678,362681,362730,362816,362869,362918,362998,363212,363376,363429,363688,363734,363789,363876,363935,363987,364047,364065,364109,364163,364204,364259,364285,364342,364365,364369,364536,364579,364650-364651,364777,364787,364845,364900,364903,364965,365014,365083 ........ r361208 | jrose | 2012-04-04 14:30:09 -0500 (Wed, 04 Apr 2012) | 10 lines Make 'help devstate change' display properly (get rid of excess comma) (closes issue ASTERISK-19444) Reported by: Makoto Dei Patches: devstate-change-usage-truncate.patch uploaded by Makoto Dei (license 5027) ........ Merged revisions 361201 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361211 | jrose | 2012-04-04 15:00:23 -0500 (Wed, 04 Apr 2012) | 12 lines Fix some stuff involving calls to memcpy and memset The important parts of the patch were already applied through other updates. (closes issue ASTERISK-19445) Reported by: Makoto Dei Patches: memset-memcpy-length.patch uploaded by Makoto Dei (license 5027) ........ Merged revisions 361210 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361270 | jrose | 2012-04-05 11:53:35 -0500 (Thu, 05 Apr 2012) | 10 lines Fix MusicOnHold in MeetMe so that it always uses the class if it's been defined There were a few instances of restarting music on hold in meetme that would cause Asterisk to revert to the default class of music on hold for no adequate reason. Review: https://reviewboard.asterisk.org/r/1844/ ........ Merged revisions 361269 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361330 | kmoore | 2012-04-06 08:31:51 -0500 (Fri, 06 Apr 2012) | 11 lines Remove unnecessary error message in app_dial.c The error message for failure to stop autoservice after a gosub or macro call during a dial was removed for macro while Asterisk 1.4 was still being actively developed. The corresponding gosub error message was never removed. (closes issue ASTERISK-19551) ........ Merged revisions 361329 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361333 | mjordan | 2012-04-06 09:01:33 -0500 (Fri, 06 Apr 2012) | 11 lines Fix a typo in the warning messages for an ignored media stream Added a '\n' to the warning messages when we ignore a media stream due to the port number being '0'. (closes issue ASTERISK-19646) Reported by: Badalian Vyacheslav ........ Merged revisions 361332 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361381 | russell | 2012-04-06 10:49:19 -0500 (Fri, 06 Apr 2012) | 5 lines Remove a few more files related to chan_usbradio and app_rpt. ........ Merged revisions 361380 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361422 | pabelanger | 2012-04-06 11:31:18 -0500 (Fri, 06 Apr 2012) | 14 lines Multiple revisions 361403,361412 ........ r361403 | pabelanger | 2012-04-06 12:24:36 -0400 (Fri, 06 Apr 2012) | 2 lines Fix typo in svn:keywords ........ r361412 | pabelanger | 2012-04-06 12:27:30 -0400 (Fri, 06 Apr 2012) | 2 lines Fix typo in svn:keywords ........ Merged revisions 361403,361412 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361472 | kmoore | 2012-04-06 13:13:04 -0500 (Fri, 06 Apr 2012) | 5 lines Add missing newlines to CLI logging ........ Merged revisions 361471 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361522 | rmudgett | 2012-04-06 14:47:29 -0500 (Fri, 06 Apr 2012) | 8 lines Don't add an empty MESSAGE_DATA(key) header if it doesn't already exist. Doing Set(MESSAGE_DATA(key)=) would add an empty key header if the key header did not already exist. If it already existed it would delete it. * Made msg_set_var_full() exit early if the named variable did not already exist and the value to set is empty. ........ r361560 | mjordan | 2012-04-06 15:32:13 -0500 (Fri, 06 Apr 2012) | 13 lines Fix memory leak when using MeetMeAdmin 'e' option with user specified A memory leak/reference counting leak occurs if the MeetMeAdmin 'e' command (eject last user that joined) is used in conjunction with a specified user. Regardless of the command being executed, if a user is specified for the command, MeetMeAdmin will look up that user. Because the 'e' option kicks the last user that joined, as opposed to the one specified, the reference to the user specified by the command would be leaked when the user variable was assigned to the last user that joined. ........ Merged revisions 361558 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361607 | mjordan | 2012-04-06 17:00:11 -0500 (Fri, 06 Apr 2012) | 12 lines Fix memory leak in res_calendar_ews when event email address node is empty If the XML calendar data returned by a Microsoft Exchange Web Service specifies an XML Event E-Mail Address ("EmailAddress"), and no e-mail address is provided, a condition existed where an ast_calendar_attendee struct would be allocated but not appended to the list of attendees. Because of that, the memory associated with the attendee would never be freed. This patch frees the memory if no e-mail address is provided. ........ Merged revisions 361606 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361658 | mjordan | 2012-04-09 14:42:53 -0500 (Mon, 09 Apr 2012) | 15 lines Change SHARED function to use a safe traversal when modifying a variable When the SHARED function modifies a variable, it removes it from its list of variables and reinserts the new value at the head of the list of variables. Doing this inside a standard list traversal can be dangerous, as the standard list traversal does not account for the list being changed. While the code in question should not cause a use after free violation due to its breaking out of the loop after freeing the variable, it could lead to a maintenance issue if the loop was modified. This also fixes a violation reported by a static analysis tool, which also makes this code easier to maintain in the future. ........ Merged revisions 361657 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361706 | mjordan | 2012-04-09 15:54:55 -0500 (Mon, 09 Apr 2012) | 17 lines Prevent invalid access of free'd memory if DAHDI channel during an MWI event In the MWI processing loop, when a valid event occurs the temporary caller ID information is deallocated. If a new DAHDI channel is successfully created, the event is passed up to the analog_ss_thread without error and the loop exits. If, however, the DAHDI channel is not created, then the caller ID struct has been free'd, and the gains reset to their previous level. This will almost certainly cause an invalid access to the free'd memory, either in subsequent calls to callerid_free or calls to callerid_feed. This patch makes it so that we only free the caller ID structure if a DAHDI channel is successfully created, and we bump the gains back up if we fail to make a DAHDI channel. ........ Merged revisions 361705 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361754 | mjordan | 2012-04-09 16:44:30 -0500 (Mon, 09 Apr 2012) | 12 lines Allow func_curl to exit gracefully if list allocation fails during write If the global_curl_info data structure could not be allocated, the datastore associated with the operation would be free'd, but the function would not return. This would later dereference the datastore, almost certainly causing Asterisk to crash. With this patch, if the data structure is not allocated the method will return an error code, and not attempt any further operation. ........ Merged revisions 361753 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361804 | mjordan | 2012-04-10 14:57:30 -0500 (Tue, 10 Apr 2012) | 10 lines Fix crash caused by unloading or reloading of res_http_post When unlinking itself from the registered HTTP URIs, res_http_post could inadvertently free all URIs registered with the HTTP server. This patch modifies the unregister method to only free the URI that is actually being unregistered, as opposed to all of them. ........ Merged revisions 361803 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361855 | rmudgett | 2012-04-10 16:47:42 -0500 (Tue, 10 Apr 2012) | 19 lines Prevent invalid access of free'd memory if DAHDI channel during an MWI event In the MWI processing loop, when a valid event occurs the temporary caller ID information is deallocated. If a new DAHDI channel is successfully created, the event is passed up to the analog_ss_thread without error and the loop exits. If, however, the DAHDI channel is not created, then the caller ID struct has been free'd, and the gains reset to their previous level. This will almost certainly cause an invalid access to the free'd memory, either in subsequent calls to callerid_free or calls to callerid_feed. * Rework the -r361705 patch to better manage the cs and mtd allocated resources. * Fixed use of mwimonitoractive flag to be correct if the mwi_thread() fails to start. ........ Merged revisions 361854 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361907 | jrose | 2012-04-11 11:07:50 -0500 (Wed, 11 Apr 2012) | 10 lines Change default value of 'ignorebusy' on Queue members so that behavior is more like 1.8 Prior to this patch, in order to restore that behavior, a function would have to be used on the QueueMember to make the ringinuse option do anything, which is pretty unreasonable. (closes issue ASTERISK-19536) reported by: Philippe Lindheimer Review: https://reviewboard.asterisk.org/r/1860/ ........ r361956 | kmoore | 2012-04-12 10:01:13 -0500 (Thu, 12 Apr 2012) | 13 lines Simplify build system architecture optimization This change to the build system rips out any usage of PROC along with architecture-specific optimizations in favor of using -march=native where it is supported. This fixes broken builds on 64bit Intel systems and results in better optimized code on systems running GCC 4.2+. Review: https://reviewboard.asterisk.org/r/1852/ (closes issue ASTERISK-19462) ........ Merged revisions 361955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r361981 | kmoore | 2012-04-12 11:22:28 -0500 (Thu, 12 Apr 2012) | 12 lines Make trunkfreq take effect when set Previously, setting trunkfreq had no effect on initial load or on reload and only ever used the default value. This causes trunkfreq to be used appropriately on initial load and reload. (closes issue ASTERISK-19521) Patch-by: Jaco Kroon ........ Merged revisions 361972 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362080 | jrose | 2012-04-13 10:30:22 -0500 (Fri, 13 Apr 2012) | 10 lines Send relative path named recordings to the meetme directory instead of sounds Prior to this patch, no effort was made to parse the path name to determine a proper destination for recordings of MeetMe's r option. This fixes that. Review: https://reviewboard.asterisk.org/r/1846/ ........ Merged revisions 362079 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362084 | jrose | 2012-04-13 11:04:22 -0500 (Fri, 13 Apr 2012) | 15 lines Make ForkCDR e option not set end time of the newly forked CDR log Prior to this patch, ForkCDR's e option would immediately set the end time of the forked CDR to that of the CDR that is being terminated. This resulted in the new CDR's end time being roughly the same as it's beginning time (which is in turn roughly the same as the original's end time). (closes issue ASTERISK-19164) Reported by: Steve Davies Patches: cdr_fork_end.v10.patch uploaded by Steve Davies (license 5012) ........ Merged revisions 362082 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362152 | mjordan | 2012-04-16 14:39:32 -0500 (Mon, 16 Apr 2012) | 19 lines Check for IO stream failures in various format's truncate/seek operations For the formats that support seek and/or truncate operations, many of the C library calls used to determine or set the current position indicator in the file stream were not being checked. In some situations, if an error occurred, a negative value would be returned from the library call. This could then be interpreted inappropriately as positional data. This patch checks the return values from these library calls before using them in subsequent operations. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362151 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362202 | mjordan | 2012-04-16 16:40:29 -0500 (Mon, 16 Apr 2012) | 18 lines Fix handling of negative return code when storing voicemails in ODBC storage When storing a voicemail message using an ODBC connection to a database, the voicemail message is first stored on disk. The sound file associated with the message is read into memory before being transmitted to the database. When this occurs, a failure in the C library's lseek function would cause a negative value to be passed to the mmap as the size of the memory map to create. This would almost certainly cause the creation of the memory map to fail, resulting in the message being lost. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863 ........ Merged revisions 362201 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362205 | mjordan | 2012-04-16 16:57:19 -0500 (Mon, 16 Apr 2012) | 25 lines Fix negative return handling in channel drivers In chan_agent, while handling a channel indicate, the agent channel driver must obtain a lock on both the agent channel, as well as the channel the agent channel is using. To do so, it attempts to lock the other channel first, then unlock the agent channel which is locked prior to entry into the indicate handler. If this unlock fails with a negative return value, which can occur if the object passed to agent_indicate is an invalid ao2 object or is NULL, the return value is passed directly to strerror, which can only accept positive integer values. In chan_dahdi, the return value of dahdi_get_index is used to directly index into the sub-channel array. If dahd_get_index returns a negative value, it would use that value to index into the array, which could cause an invalid memory access. If dahdi_get_index returns a negative number, we now default to SUB_REAL. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362204 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362264 | elguero | 2012-04-17 09:53:04 -0500 (Tue, 17 Apr 2012) | 23 lines Turn off warning message when bind address is set to any. When a bind address is set to an ANY address (udpbindport=::), a warning message is displayed stating that "Address remapping activated in sip.conf but we're using IPv6, which doesn't need it. Please remove 'localnet' and/or 'externaddr' settings." But if one is running dual stack, we shouldn't be told to turn those settings off. This patch checks if the bind address is an ANY address or not. The warning message will now only be displayed if the bind address is NOT an ANY address and IPv6 is being used. Also, updated the copyright year. (closes issue ASTERISK-19456) Reported by: Michael L. Young Tested by: Michael L. Young Patches: chan_sip_ipv6_message.diff uploaded by Michael L. Young (license 5026) ........ Merged revisions 362253 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362305 | mjordan | 2012-04-17 13:27:44 -0500 (Tue, 17 Apr 2012) | 15 lines Fix error that caused seek format operations to set max file size to '1' or '0' A very inappropriate placement of a ')' (introduced in r362151) caused the maximum size of a file to be set as the result of a comparison operation, as opposed to the result of the ftello operation. This resulted in seeking being restricted to the beginning of the file, or 1 byte into the file. Thanks to the Asterisk Test Suite for properly freaking out about this on at least one test. (issue ASTERISK-19655) Reported by: Matt Jordan ........ Merged revisions 362304 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362356 | mjordan | 2012-04-17 15:56:05 -0500 (Tue, 17 Apr 2012) | 17 lines Fix places where a negative return from ftello could be used as invalid input In a variety of locations in both reading and writing a file, the result from the C library function ftello is used as input to other functions. For the parameters and functions in question, a negative value is invalid input. This patch checks the return value from the ftello function to determine if we were able to determine the current position in the file stream and, if not, fail gracefully. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362355 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362357 | jrose | 2012-04-17 15:57:36 -0500 (Tue, 17 Apr 2012) | 12 lines 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 ........ r362360 | mjordan | 2012-04-17 16:07:29 -0500 (Tue, 17 Apr 2012) | 24 lines Fix places in main where a negative return value could impact execution This patch addresses a number of modules in main that did not handle the negative return value from function calls adequately, or were not sufficiently clear that the conditions leading to improper handling of the return values could not occur. This includes: * asterisk.c: A negative return value from the read function would be used directly as an index into a buffer. We now check for success of the read function prior to using its result as an index. * manager.c: Check for failures in mkstemp and lseek when handling the temporary file created for processing data returned from a CLI command in action_command. Also check that the result of an lseek is sanitized prior to using it as the size of a memory map to allocate. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362359 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362364 | mjordan | 2012-04-17 16:11:25 -0500 (Tue, 17 Apr 2012) | 29 lines Fix places in resources where a negative return value could impact execution This patch addresses a number of modules in resources that did not handle the negative return value from function calls adequately. This includes: * res_agi.c: if the result of the read function is a negative number, indicating some failure, the result would instead be treated as the number of bytes read. This patch now treats negative results in the same manner as an end of file condition, with the exception that it also logs the error code indicated by the return. * res_musiconhold.c: if spawn_mp3 fails to assign a file descriptor to srcfd, and instead assigns a negative value, that file descriptor could later be passed to functions that require a valid file descriptor. If spawn_mp3 fails, we now immediately retry instead of continuing in the logic. * res_rtp_asterisk.c: if no codec can be matched between two RTP instances in a peer to peer bridge, we immediately return instead of attempting to use the codec payload type as an index to determine the appropriate negotiated codec. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362377 | mjordan | 2012-04-17 16:22:37 -0500 (Tue, 17 Apr 2012) | 13 lines Handle case where an unknown format is used to get the preferred codec size In ast_codec_pref_getsize, if an unknown format is passed to the method, no preferred codec will be selected and a negative number will be used to index into the format list. The method now logs an unknown format as a warning, and returns an empty format list. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ r362429 | rmudgett | 2012-04-18 11:27:51 -0500 (Wed, 18 Apr 2012) | 19 lines Add ability to ignore layer 1 alarms for BRI PTMP lines. Several telcos bring the BRI PTMP layer 1 down when the line is idle. When layer 1 goes down, Asterisk cannot make outgoing calls. Incoming calls could fail as well because the alarm processing is handled by a different code path than the Q.931 messages. * Add the layer1_presence configuration option to ignore layer 1 alarms when the telco brings layer 1 down. This option can be configured by span while the similar DAHDI driver teignorered=1 option is system wide. This option unlike layer2_persistence does not require libpri v1.4.13 or newer. Related to JIRA AST-598 JIRA ABE-2845 ........ Merged revisions 362428 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362496 | mjordan | 2012-04-18 21:27:08 -0500 (Wed, 18 Apr 2012) | 50 lines Fix a variety of potential buffer overflows * chan_mobile: Fixed an overrun where the cind_state buffer (an integer array of size 16) would be overrun due to improper bounds checking. At worst, the buffer can be overrun by a total of 48 bytes (assuming 4-byte integers), which would still leave it within the allocated memory of struct hfp. This would corrupt other elements in that struct but not necessarily cause any further issues. * app_sms: The array imsg is of size 250, while the array (ud) that the data is copied into is of size 160. If the size of the inbound message is greater then 160, up to 90 bytes could be overrun in ud. This would corrupt the user data header (array udh) adjacent to ud. * chan_unistim: A number of invalid memmoves are corrected. These would move data (which may or may not be valid) into the ends of these buffers. * asterisk: ast_console_toggle_loglevel does not check that the console log level being set is less then or equal to the allowed log levels of 32. * format_pref: In ast_codec_pref_prepend, if any occurrence of the specified codec is not found, the value used to index into the array pref->order would be one greater then the maximum size of the array. * jitterbuf: If the element being placed into the jitter buffer lands in the last available slot in the jitter history buffer, the insertion sort attempts to move the last entry in the buffer into one slot past the maximum length of the buffer. Note that this occurred for both the min and max jitter history buffers. * tdd: If a read from fsk_serial returns a character that is greater then 32, an attempt to read past one of the statically defined arrays containing the values that character maps to would occur. * localtime: struct ast_time and tm are not the same size - ast_time is larger, although it contains the elements of tm within it in the same layout. Hence, when using memcpy to copy the contents of tm into ast_time, the size of tm should be used, as opposed to the size of ast_time. * extconf: this treats ast_timing's minmask array as if it had a length of 48, when it has defined the size of the array as 24. pbx.h defines minmask as having a size of 48. (issue ASTERISK-19668) Reported by: Matt Jordan ........ Merged revisions 362485 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362537 | twilson | 2012-04-19 09:31:59 -0500 (Thu, 19 Apr 2012) | 14 lines Handle multiple commands per connection via netconsole Asterisk would accept multiple NULL-delimited CLI commands via the netconsole socket, but would occasionally miss a command due to the command not being completely read into the buffer. This patch ensures that any partial commands get moved to the front of the read buffer, appended to, and properly sent. (closes issue ASTERISK-18308) Review: https://reviewboard.asterisk.org/r/1876/ ........ Merged revisions 362536 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362587 | seanbright | 2012-04-19 11:04:21 -0500 (Thu, 19 Apr 2012) | 12 lines Prevent a crash in ExternalIVR when the 'S' command is sent first. If the first command sent from an ExternalIVR client is an 'S' command, we were blindly removing the first element from the play list and deferencing it, even if it was NULL. This corrects that and also locks appropriately in one place. (issue ASTERISK-17889) Reported by: Chris Maciejewski ........ Merged revisions 362586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362678 | rmudgett | 2012-04-19 16:00:21 -0500 (Thu, 19 Apr 2012) | 5 lines Update membermacro and membergosub documentation in queues.conf.sample. ........ Merged revisions 362677 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362681 | elguero | 2012-04-19 16:11:35 -0500 (Thu, 19 Apr 2012) | 9 lines Add leading and trailing backslashes A couple of unit tests did not have have leading or trailing backslashes when setting their test category resulting in a warning message being displayed. Added the backslash where needed. ........ Merged revisions 362680 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362730 | wdoekes | 2012-04-19 16:59:43 -0500 (Thu, 19 Apr 2012) | 5 lines Fix documentation for ${VERSION(ASTERISK_VERSION_NUM)}. ........ Merged revisions 362729 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362816 | twilson | 2012-04-20 09:49:42 -0500 (Fri, 20 Apr 2012) | 13 lines Document Speech* apps hangup on failure and suggest TryExec The Speech API apps return -1 on failure, which will hang up the channel. This may not be desirable behavior for some, but it isn't something that can be changed without breaking people's dialplans or writing an option to all of the Speech apps that does what TryExec already does. This patch documents the hangup behavior of the apps, and suggests TryExec as the solution. (closes issue AST-813) ........ Merged revisions 362815 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362869 | twilson | 2012-04-20 11:12:34 -0500 (Fri, 20 Apr 2012) | 11 lines OpenBSD doesn't have rawmemchr, use strchr (closes issue ASTERISK-19758) Reported by: Barry Miller Tested by: Terry Wilson Patches: 362758-diff uploaded by Barry Miller (license 5434) ........ Merged revisions 362868 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r362918 | elguero | 2012-04-20 11:47:51 -0500 (Fri, 20 Apr 2012) | 11 lines Add missing payload type to events API The Security Events Framework API was changed while adding the generation of security events in chan_sip. A payload type and name was missed from being added to struct ie_maps. (closes issue ASTERISK-19759) Reported by: Michael L. Young Patches: issue-asterisk-19759.diff uploaded by Michael L. Young (license 5026) ........ r362998 | rmudgett | 2012-04-20 20:45:13 -0500 (Fri, 20 Apr 2012) | 5 lines Update app_dial M and U option GOTO return value documentation. ........ Merged revisions 362997 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363212 | tilghman | 2012-04-23 11:06:53 -0500 (Mon, 23 Apr 2012) | 8 lines On some platforms, O_RDONLY is not a flag to be checked, but merely the absence of O_RDWR and O_WRONLY. The POSIX specification does not mandate how these 3 flags must be specified, only that one of the three must be specified in every call. ........ Merged revisions 363209 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363376 | rmudgett | 2012-04-24 19:01:21 -0500 (Tue, 24 Apr 2012) | 5 lines Hangup affected channel in error paths of bridge_call_thread(). ........ Merged revisions 363375 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363429 | rmudgett | 2012-04-24 20:23:08 -0500 (Tue, 24 Apr 2012) | 27 lines Fix recalled party B feature flags for a failed DTMF atxfer. 1) B calls A with Dial option T 2) B DTMF atxfer to C 3) B hangs up 4) C does not answer 5) B is called back 6) B answers 7) B cannot initiate transfers anymore * Add dial features datastore to recalled party B channel that is a copy of the original party B channel's dial features datastore. * Extracted add_features_datastore() from add_features_datastores(). * Renamed struct ast_dial_features features_caller and features_callee members to my_features and peer_features respectively. These better names eliminate the need for some explanatory comments. * Simplified code accessing the struct ast_dial_features datastore. (closes issue ASTERISK-19383) Reported by: lgfsantos ........ Merged revisions 363428 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363688 | rmudgett | 2012-04-25 14:47:44 -0500 (Wed, 25 Apr 2012) | 19 lines Clear ISDN channel resetting state if the peer continues to use it. Some ISDN switches occasionally fail to send a RESTART ACKNOWLEDGE in response to a RESTART request. * Made the second SETUP received after sending a RESTART request clear the channel resetting state as if the peer had sent the expected RESTART ACKNOWLEDGE before continuing to process the SETUP. The peer may not be sending the expected RESTART ACKNOWLEDGE. (issue ASTERISK-19608) (issue AST-844) (issue AST-815) Patches: jira_ast_815_v1.8.patch (license #5621) patch uploaded by rmudgett (modified) ........ Merged revisions 363687 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363734 | rmudgett | 2012-04-25 15:48:22 -0500 (Wed, 25 Apr 2012) | 18 lines Make DAHDISendCallreroutingFacility wait 5 seconds for a reply before disconnecting the call. Some switches may not handle the call-deflection/call-rerouting message if the call is disconnected too soon after being sent. Asteisk was not waiting for any reply before disconnecting the call. * Added a 5 second delay before disconnecting the call to wait for a potential response if the peer does not disconnect first. (closes issue ASTERISK-19708) Reported by: mehdi Shirazi Patches: jira_asterisk_19708_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: rmudgett ........ Merged revisions 363730 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363789 | rmudgett | 2012-04-25 17:59:46 -0500 (Wed, 25 Apr 2012) | 5 lines Update Pickup application documentation. ........ Merged revisions 363788 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363876 | rmudgett | 2012-04-25 22:11:45 -0500 (Wed, 25 Apr 2012) | 5 lines Update Pickup application documentation. (Even better) ........ Merged revisions 363875 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363935 | alecdavis | 2012-04-26 04:46:38 -0500 (Thu, 26 Apr 2012) | 14 lines chan_sip: [general] maxforwards, not checked for a value greater than 255 The peer maxforwards is checked for both '< 1' and '> 255', but the default 'maxforwards' in the [general] section is only checked for '< 1' alecdavis (license 585) Reported by: alecdavis Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1888/ ........ Merged revisions 363934 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r363987 | kmoore | 2012-04-26 08:27:34 -0500 (Thu, 26 Apr 2012) | 15 lines Fix reference leaks involving SIP Replaces transfers The reference held for SIP blind transfers using the Replaces header in an INVITE was never freed on success and also failed to be freed in some error conditions. This caused a file descriptor leak since the RTP structures in use at the time of the transfer were never freed. This reference leak and another relating to subscriptions in the same code path have now been corrected. (Closes issue ASTERISK-19579) Reported by: Maciej Krajewski Tested by: Maciej Karjewski ........ Merged revisions 363986 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364047 | twilson | 2012-04-26 14:30:55 -0500 (Thu, 26 Apr 2012) | 8 lines Add more constness to the end_buf pointer in the netconsole issue ASTERISK-18308 Review: https://reviewboard.asterisk.org/r/1876/ ........ Merged revisions 364046 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364065 | rmudgett | 2012-04-26 15:25:05 -0500 (Thu, 26 Apr 2012) | 24 lines Fix DTMF atxfer running h exten after the wrong bridge ends. When party B does an attended transfer of party A to party C, the attending bridge between party B and C should not be running an h exten when the bridge ends. Running an h exten now sets a softhangup flag to ensure that an AGI will run in dead AGI mode. * Set the AST_FLAG_BRIDGE_HANGUP_DONT on the party B channel for the attending bridge between party B and C. (closes issue AST-870) (closes issue ASTERISK-19717) Reported by: Mario (closes issue ASTERISK-19633) Reported by: Andrey Solovyev Patches: jira_asterisk_19633_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: rmudgett, Andrey Solovyev, Mario ........ Merged revisions 364060 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364109 | rmudgett | 2012-04-26 16:10:46 -0500 (Thu, 26 Apr 2012) | 5 lines Update Pickup application documentation. (With feeling this time.) ........ Merged revisions 364108 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364163 | schmidts | 2012-04-27 07:54:19 -0500 (Fri, 27 Apr 2012) | 3 lines fix a wrong behavior of alarm timezones in caldav and icalendar when an alarm doesnt use utc. This change uses the same timezone from the start time. ........ r364204 | mjordan | 2012-04-27 09:44:13 -0500 (Fri, 27 Apr 2012) | 23 lines Allow for reloading SRTP crypto keys within the same SIP dialog As a continuation of the patch in r356604, which allowed for the reloading of SRTP keys in re-INVITE transfer scenarios, this patch addresses the more common case where a new key is requested within the context of a current SIP dialog. This can occur, for example, when certain phones request a SIP hold. Previously, once a dialog was associated with an SRTP object, any subsequent attempt to process crypto keys in any SDP offer - either the current one or a new offer in a new SIP request - were ignored. This patch changes this behavior to only ignore subsequent crypto keys within the current SDP offer, but allows future SDP offers to change the keys. (issue ASTERISK-19253) Reported by: Thomas Arimont Tested by: Thomas Arimont Review: https://reviewboard.asteriskorg/r/1885/ ........ Merged revisions 364203 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364259 | kmoore | 2012-04-27 13:58:34 -0500 (Fri, 27 Apr 2012) | 14 lines Allow SIP pvts involved in Replaces transfers to fall out of reference sooner Unref the SIP pvt stored in the refer structure as soon as it is no longer needed so that the pvt and associated file descriptors can be freed sooner. This change makes a reference decrement unnecessary in code that handles SIP BYE/Also transfers which should not touch the reference anyway. (Closes issue ASTERISK-19579) Reported by: Maciej Krajewski Tested by: Maciej Krajewski ........ Merged revisions 364258 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364285 | mjordan | 2012-04-27 14:30:19 -0500 (Fri, 27 Apr 2012) | 43 lines Prevent overflow in calculation in ast_tvdiff_ms on 32-bit machines The method ast_tvdiff_ms attempts to calculate the difference, in milliseconds, between two timeval structs, and return the difference in a 64-bit integer. Unfortunately, it assumes that the long tv_sec/tv_usec members in the timeval struct are large enough to hold the calculated values before it returns. On 64-bit machines, this might be the case, as a long may be 64-bits. On 32-bit machines, however, a long may be less (32-bits), in which case, the calculation can overflow. This overflow caused significant problems in MixMonitor, which uses the method to determine if an audio factory, which has not presented audio to an audiohook, is merely late in providing said audio or will never provide audio. In an overflow situation, the audiohook would incorrectly determine that an audio factory that will never provide audio is merely late instead. This led to situations where a MixMonitor never recorded any audio. Note that this happened most frequently when that MixMonitor was started by the ConfBridge application itself, or when the MixMonitor was attached to a Local channel. (issue ASTERISK-19497) Reported by: Ben Klang Tested by: Ben Klang Patches: 32-bit-time-overflow-10-2012-04-26.diff (license #6283) by mjordan (closes issue ASTERISK-19727) Reported by: Mark Murawski Tested by: Michael L. Young Patches: 32-bit-time-overflow-2012-04-27.diff (license #6283) by mjordan) (closes issue ASTERISK-19471) Reported by: feyfre Tested by: feyfre (issue ASTERISK-19426) Reported by: Johan Wilfer Review: https://reviewboard.asterisk.org/r/1889/ ........ Merged revisions 364277 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364342 | mmichelson | 2012-04-27 16:58:06 -0500 (Fri, 27 Apr 2012) | 10 lines Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails. (closes issue ASTERISK-18321) Reported by Dan Lukes Patches: ASTERISK-18321.patch by Mark Michelson (license #5049) ........ Merged revisions 364341 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364365 | twilson | 2012-04-27 17:31:01 -0500 (Fri, 27 Apr 2012) | 11 lines Fix ast_parse_arg numeric type range checking and add tests ast_parse_arg wasn't checking for strto* parse errors or limiting the results by the actual range of the numeric types. This patch fixes that and adds unit tests as well. Review: https://reviewboard.asterisk.org/r/1879/ ........ Merged revisions 364340 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364369 | twilson | 2012-04-27 17:33:10 -0500 (Fri, 27 Apr 2012) | 2 lines Add missing test_config.c ........ r364536 | elguero | 2012-04-28 21:21:10 -0500 (Sat, 28 Apr 2012) | 13 lines Fix configuring custom sound_leader_has_left in confbridge.conf The configuration option to specify a custom sound_leader_has_left file for a conference bridge was not being parsed. This patch fixes it so that a custom sound file will now be used. (closes issue ASTERISK-19771) Reported by: Pawel Kuzak Tested by: Pawel Kuzak, Michael L. Young Patches: leaderhasleft_sound.dpatch uploaded by Pawel Kuzak (license 6380) Review: https://reviewboard.asterisk.org/r/1884/ ........ r364579 | mjordan | 2012-04-29 14:43:53 -0500 (Sun, 29 Apr 2012) | 15 lines Fix error that caused truncate operations to fail Another very inappropriate placement of a ')' (again introduced in r362151) caused the various truncate operations to attempt to truncate the sound file at a position of '0'. (issue ASTERISK-19655) Reported by: Matt Jordan (issue ASTERISK-19810) Reported by: colbec ........ Merged revisions 364578 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364650 | markm | 2012-04-30 11:43:11 -0500 (Mon, 30 Apr 2012) | 15 lines Merged revisions 364635 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r364635 | markm | 2012-04-30 11:51:12 -0400 (Mon, 30 Apr 2012) | 10 lines Sanatize result from bfd_find_nearest_line (BETTER_BACKTRACES) bfd_find_nearest_line can possibly set file to null resulting in a crash when strrchr(file) runs (closes issue ASTERISK-19815) Reported by Mark Murawski Tested by Mark Murawski ........ ........ r364651 | may | 2012-04-30 11:48:57 -0500 (Mon, 30 Apr 2012) | 10 lines Fix use freed pointer in return value from call thread (issue ASTERISK-19663) Reported by: Matt Jordan Patches: ASTERISK-19663-ooh323.patch (License #5415) ........ Merged revisions 364649 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364777 | jrose | 2012-05-01 13:23:08 -0500 (Tue, 01 May 2012) | 13 lines Fix bad check in voicemail functions for ast_inboxcount2_func Check looks for ast_inboxcount_func instead of ast_inboxcount2_func on ast_inboxcount2_func calls. (closes issue ASTERISK-19718) Reported by: Corey Farrell Patches: ast_app_inboxcount2-null-refcheck.patch uploaded by Corey Farrell (license 5909) ........ Merged revisions 364769 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364787 | kmoore | 2012-05-01 14:07:09 -0500 (Tue, 01 May 2012) | 12 lines Play conf-placeintoconf message to the correct channel Correct the code in app_confbridge to play the conf-placeintoconf message to the marked user entering the bridge instead of to the conference while the marked user hears silence. (closes issue ASTERISK-19641) Reported-by: Mark A Walters ........ Merged revisions 364786 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364845 | rmudgett | 2012-05-01 16:50:32 -0500 (Tue, 01 May 2012) | 7 lines * Fix error path resouce leak in local_request(). * Restructure local_request() to reduce indentation. ........ Merged revisions 364840 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364900 | mmichelson | 2012-05-01 18:10:16 -0500 (Tue, 01 May 2012) | 16 lines Fix Coverity-reported ARRAY_VS_SINGLETON error. As it turned out, this wasn't a huge deal. We were calling ast_app_parse_options() for a set of options of which none took arguments. The proper thing to do for this case is to pass NULL for the "args" parameter here. We were instead passing a seemingly-randomly chosen char * from the function. While this would never get written to, you can rest assured things would have gotten bad had new options (which took arguments) been added to func_volume. (closes issue ASTERISK-19656) ........ Merged revisions 364899 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364903 | rmudgett | 2012-05-01 18:14:12 -0500 (Tue, 01 May 2012) | 10 lines Fixed __ao2_ref() validating user_data twice. (closes issue ASTERISK-19755) Reported by: Gunther Kelleter Patches: ao2_ref.patch (license #6372) patch uploaded by Gunther Kelleter ........ Merged revisions 364902 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ r364965 | mjordan | 2012-05-01 21:44:15 -0500 (Tue, 01 May 2012) | 11 lines Only log a failure to get read/write samples from factories if it didn't happen In audiohook_read_frame_both, anytime samples are obtained from the read/write factories a debug statement is logged stating that samples were not obtained from the factories. This statement used to only occur if option_debug was turned on and no samples were obtained; in some refactoring when the option_debug statement was removed, the "else" clause was removed as well. This patch makes it so that those debug log statements only occur if the condition leading up to them actually happened. ........ r365014 | elguero | 2012-05-02 11:16:03 -0500 (Wed, 02 May 2012) | 18 lines Update security events unit tests The security events framework API was changed in Asterisk 10 but the unit tests were not updated at the same time. This patch does the following: * Adds two more security events that were added to the API * Add challenge, received_challenge and received_hash in the inval_password security event unit test (issue ASTERISK-19760) Reported by: Michael L. Young Tested by: Michael L. Young Patches: issue-asterisk-19760-branch10.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/1877/ ........ r365083 | twilson | 2012-05-02 12:29:54 -0500 (Wed, 02 May 2012) | 33 lines Multiple revisions 365006,365068 ........ r365006 | twilson | 2012-05-02 10:49:03 -0500 (Wed, 02 May 2012) | 12 lines Fix a CEL LINKEDID_END race and local channel linkedids This patch has the ;2 channel inherit the linkedid of the ;1 channel and fixes the race condition by no longer scanning the channel list for "other" channels with the same linkedid. Instead, cel.c has an ao2 container of linkedid strings and uses the refcount of the string as a counter of how many channels with the linkedid exist. Not only does this eliminate the race condition, but it also allows us to look up the linkedid by the hashed key instead of traversing the entire channel list. Review: https://reviewboard.asterisk.org/r/1895/ ........ r365068 | twilson | 2012-05-02 12:02:39 -0500 (Wed, 02 May 2012) | 11 lines Don't leak a ref if out of memory and can't link the linkedid If the ao2_link fails, we are most likely out of memory and bad things are going to happen. Before those bad things happen, make sure to clean up the linkedid references. This patch also adds a comment explaining why linkedid can't be passed to both local channel allocations and combines two ao2_ref calls into 1. Review: https://reviewboard.asterisk.org/r/1895/ ........ Merged revisions 365006,365068 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 361208,361211,361270,361330,361333,361381,361422,361472,361522,361560,361607,361658,361706,361754,361804,361855,361907,361956,361981,362080,362084,362152,362202,362205,362264,362305,362356-362357,362360,362364,362377,362429,362496,362537,362587,362678,362681,362730,362816,362869,362918,362998,363212,363376,363429,363688,363734,363789,363876,363935,363987,364047,364065,364109,364163,364204,364259,364285,364342,364365,364369,364536,364579,364650-364651,364777,364787,364845,364900,364903,364965,365014,365083 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@365264 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/CHANGES b/CHANGES index b4df62d0a9..e66e02035f 100644 --- a/CHANGES +++ b/CHANGES @@ -24,6 +24,14 @@ Background DNS Update Manager should help reduce the 'doing dnsmgr_lookup for' message from spamming the CLI. +Queue changes +------------- + * Default value for 'ignorebusy' flag on queue members is now 1 instead of 0 + to get the default behavior in line with 1.8. The only way to change this + flag in 10 is to use the QUEUE_MEMBER function to change ignorebusy unless + using realtime queue members (in which case it can be manipualted on the + database normally). + ------------------------------------------------------------------------------ --- Functionality changes since Asterisk 10.1.0 ------------------------------ ------------------------------------------------------------------------------ diff --git a/Makefile b/Makefile index f0fbad7fe0..1034c26445 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,6 @@ export ASTCONFPATH export ASTKEYDIR export OSARCH # Operating system -export PROC # Processor type export NOISY_BUILD # Used in Makefile.rules export MENUSELECT_CFLAGS # Options selected in menuselect. @@ -163,39 +162,6 @@ OTHER_SUBDIR_CFLAGS="-I$(ASTTOPDIR)/include" # Create OPTIONS variable, but probably we can assign directly to ASTCFLAGS OPTIONS= -ifeq ($(OSARCH),linux-gnu) - ifeq ($(PROC),x86_64) - # You must have GCC 3.4 to use k8, otherwise use athlon - PROC=k8 - #PROC=athlon - endif - - ifeq ($(PROC),sparc64) - #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. - #This works for even old (2.96) versions of gcc and provides a small boost either way. - #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it. - #So we go lowest common available by gcc and go a step down, still a step up from - #the default as we now have a better instruction set to work with. - Belgarath - PROC=ultrasparc - OPTIONS+=$(shell if $(CC) -mtune=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mtune=$(PROC)"; fi) - OPTIONS+=$(shell if $(CC) -mcpu=v8 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mcpu=v8"; fi) - OPTIONS+=-fomit-frame-pointer - endif - - ifeq ($(PROC),arm) - # The Cirrus logic is the only heavily shipping arm processor with a real floating point unit - ifeq ($(SUB_PROC),maverick) - OPTIONS+=-fsigned-char -mcpu=ep9312 - else - ifeq ($(SUB_PROC),xscale) - OPTIONS+=-fsigned-char -mcpu=xscale - else - OPTIONS+=-fsigned-char - endif - endif - endif -endif - ifeq ($(findstring -save-temps,$(_ASTCFLAGS) $(ASTCFLAGS)),) ifeq ($(findstring -pipe,$(_ASTCFLAGS) $(ASTCFLAGS)),) _ASTCFLAGS+=-pipe @@ -224,26 +190,7 @@ ifneq ($(findstring BSD,$(OSARCH)),) _ASTCFLAGS+=-isystem /usr/local/include endif -ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),) - ifneq ($(AST_MARCH_NATIVE),) - _ASTCFLAGS+=$(AST_MARCH_NATIVE) - else - ifneq ($(PROC),ultrasparc) - _ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) - endif - endif -endif - -ifeq ($(PROC),ppc) - _ASTCFLAGS+=-fsigned-char -endif - ifeq ($(OSARCH),FreeBSD) - ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),) - ifeq ($(PROC),i386) - _ASTCFLAGS+=-march=i686 - endif - endif # -V is understood by BSD Make, not by GNU make. BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) diff --git a/Makefile.rules b/Makefile.rules index f40a8f041a..5b4dfab96b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -84,6 +84,10 @@ ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_DEVMODE),DONT_OPTIMI COMPILE_DOUBLE=yes endif +ifeq ($(findstring BUILD_NATIVE,$(MENUSELECT_CFLAGS)),BUILD_NATIVE) + _ASTCFLAGS+=-march=native +endif + %.o: %.s $(ECHO_PREFIX) echo " [AS] $< -> $@" ifeq ($(COMPILE_DOUBLE),yes) diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c index 6c7e216a34..e03e8647e0 100644 --- a/addons/chan_mobile.c +++ b/addons/chan_mobile.c @@ -1719,7 +1719,7 @@ static int rfcomm_read_result(int rsock, char **buf, size_t count, size_t *in_co return 1; e_return: - ast_log(LOG_ERROR, "error parsing AT result on rfcomm socket"); + ast_log(LOG_ERROR, "error parsing AT result on rfcomm socket\n"); return res; } @@ -2120,7 +2120,7 @@ static int hfp_parse_ciev(struct hfp_pvt *hfp, char *buf, int *value) return HFP_CIND_NONE; } - if (i >= sizeof(hfp->cind_state)) { + if (i >= ARRAY_LEN(hfp->cind_state)) { ast_debug(2, "[%s] CIEV event index too high (%s)\n", hfp->owner->id, buf); return HFP_CIND_NONE; } @@ -2602,7 +2602,7 @@ static int hfp_parse_cind_indicator(struct hfp_pvt *hfp, int group, char *indica int value; /* store the current indicator */ - if (group >= sizeof(hfp->cind_state)) { + if (group >= ARRAY_LEN(hfp->cind_state)) { ast_debug(1, "ignoring CIND state '%s' for group %d, we only support up to %d indicators\n", indicator, group, (int) sizeof(hfp->cind_state)); return -1; } diff --git a/addons/ooh323cDriver.c b/addons/ooh323cDriver.c index 3171b8a730..1672849cab 100644 --- a/addons/ooh323cDriver.c +++ b/addons/ooh323cDriver.c @@ -124,7 +124,7 @@ void* ooh323c_call_thread(void* dummy) free(mycthread); ast_module_unref(myself); ast_update_use_count(); - return dummy; + return NULL; } int ooh323c_start_call_thread(ooCallData *call) { @@ -152,7 +152,6 @@ int ooh323c_start_call_thread(ooCallData *call) { } ast_module_ref(myself); - memset(cur, 0, sizeof(cur)); if ((socketpair(PF_LOCAL, SOCK_STREAM, 0, cur->thePipe)) == -1) { ast_log(LOG_ERROR, "Can't create thread pipe for call %s\n", call->callToken); free(cur); diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 870c423689..95ff8a40d8 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -1081,7 +1081,7 @@ static int chanspy_exec(struct ast_channel *chan, const char *data) if (strchr("0123456789*#", tmp) && tmp != '\0') { user_options.exit = tmp; } else { - ast_log(LOG_NOTICE, "Argument for option 'x' must be a valid DTMF digit."); + ast_log(LOG_NOTICE, "Argument for option 'x' must be a valid DTMF digit.\n"); } } @@ -1090,7 +1090,7 @@ static int chanspy_exec(struct ast_channel *chan, const char *data) if (strchr("0123456789*#", tmp) && tmp != '\0') { user_options.cycle = tmp; } else { - ast_log(LOG_NOTICE, "Argument for option 'c' must be a valid DTMF digit."); + ast_log(LOG_NOTICE, "Argument for option 'c' must be a valid DTMF digit.\n"); } } @@ -1207,7 +1207,7 @@ static int extenspy_exec(struct ast_channel *chan, const char *data) if (strchr("0123456789*#", tmp) && tmp != '\0') { user_options.exit = tmp; } else { - ast_log(LOG_NOTICE, "Argument for option 'x' must be a valid DTMF digit."); + ast_log(LOG_NOTICE, "Argument for option 'x' must be a valid DTMF digit.\n"); } } @@ -1216,7 +1216,7 @@ static int extenspy_exec(struct ast_channel *chan, const char *data) if (strchr("0123456789*#", tmp) && tmp != '\0') { user_options.cycle = tmp; } else { - ast_log(LOG_NOTICE, "Argument for option 'c' must be a valid DTMF digit."); + ast_log(LOG_NOTICE, "Argument for option 'c' must be a valid DTMF digit.\n"); } } diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 6c3f4304d0..d07edf1339 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -741,12 +741,12 @@ static int post_join_marked(struct conference_bridge *conference_bridge, struct /* Next play the audio file stating they are going to be placed into the conference */ if (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_QUIET)) { - ao2_unlock(conference_bridge); - ast_autoservice_start(conference_bridge_user->chan); - play_sound_file(conference_bridge, - conf_get_sound(CONF_SOUND_PLACE_IN_CONF, conference_bridge_user->b_profile.sounds)); - ast_autoservice_stop(conference_bridge_user->chan); - ao2_lock(conference_bridge); + if (play_prompt_to_channel(conference_bridge, + conference_bridge_user->chan, + conf_get_sound(CONF_SOUND_PLACE_IN_CONF, conference_bridge_user->b_profile.sounds))) { + /* user hungup while the sound was playing */ + return -1; + } } /* Finally iterate through and unmute them all */ diff --git a/apps/app_dial.c b/apps/app_dial.c index b5d06870fd..63bcbab544 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -288,15 +288,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Hangup the called party and allow the calling party to continue dialplan execution at the next priority - - + Transfer the call to the specified destination. You cannot use any additional action post answer options in conjunction - with this option. Also, pbx services are not run on the peer (called) channel, + with this option. Also, pbx services are run on the peer (called) channel, so you will not be able to set timeouts via the TIMEOUT() function in this macro. Be aware of the limitations that macros have, specifically with regards to use of @@ -405,16 +404,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Hangup the called party and allow the calling party to continue dialplan execution at the next priority. - - - Transfer the call to the specified priority. Optionally, an extension, or - extension and priority can be specified. + + Transfer the call to the specified destination. You cannot use any additional action post answer options in conjunction - with this option. Also, pbx services are not run on the peer (called) channel, + with this option. Also, pbx services are run on the peer (called) channel, so you will not be able to set timeouts via the TIMEOUT() function in this routine. @@ -2767,7 +2764,6 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast } if (ast_autoservice_stop(chan) < 0) { - ast_log(LOG_ERROR, "Could not stop autoservice on calling channel\n"); res9 = -1; } diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index b01ec4c691..8de631cbac 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -55,25 +55,42 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Directed extension call pickup. - - - - - - - - + + + + Specification of the pickup target. + + + + + Additional specifications of pickup targets. + + + - This application can pickup any ringing channel that is calling - the specified extension. If no context - is specified, the current context will be used. If you use the special string PICKUPMARK - for the context parameter, for example 10@PICKUPMARK, this application - tries to find a channel which has defined a PICKUPMARK - channel variable with the same value as extension - (in this example, 10). When no parameter is specified, the application - will pickup a channel matching the pickup group of the active channel. + This application can pickup a specified ringing channel. The channel + to pickup can be specified in the following ways. + 1) If no extension targets are specified, + the application will pickup a channel matching the pickup group of the + requesting channel. + 2) If the extension is specified with a + context of the special string + PICKUPMARK (for example 10@PICKUPMARK), the application + will pickup a channel which has defined the channel variable + PICKUPMARK with the same value as + extension (in this example, + 10). + 3) If the extension is specified + with or without a context, the channel with a + matching extension and context + will be picked up. If no context is specified, + the current context will be used. + The extension is typically set on + matching channels by the dial application that created the channel. The + context is set on matching channels by the + channel driver for the device. diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index 03ef884c87..6cbfbd1377 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -683,13 +683,14 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, if (f->frametype == AST_FRAME_DTMF) { send_eivr_event(eivr_events, f->subclass.integer, NULL, chan); if (u->option_autoclear) { + AST_LIST_LOCK(&u->playlist); if (!u->abort_current_sound && !u->playing_silence) { /* send interrupted file as T data */ - entry = AST_LIST_REMOVE_HEAD(&u->playlist, list); - send_eivr_event(eivr_events, 'T', entry->filename, chan); - ast_free(entry); + if ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) { + send_eivr_event(eivr_events, 'T', entry->filename, chan); + ast_free(entry); + } } - AST_LIST_LOCK(&u->playlist); while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) { send_eivr_event(eivr_events, 'D', entry->filename, chan); ast_free(entry); @@ -768,9 +769,10 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, AST_LIST_LOCK(&u->playlist); if (!u->abort_current_sound && !u->playing_silence) { /* send interrupted file as T data */ - entry = AST_LIST_REMOVE_HEAD(&u->playlist, list); - send_eivr_event(eivr_events, 'T', entry->filename, chan); - ast_free(entry); + if ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) { + send_eivr_event(eivr_events, 'T', entry->filename, chan); + ast_free(entry); + } } while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) { send_eivr_event(eivr_events, 'D', entry->filename, chan); diff --git a/apps/app_forkcdr.c b/apps/app_forkcdr.c index ffeeca8ece..d4fc2affc0 100644 --- a/apps/app_forkcdr.c +++ b/apps/app_forkcdr.c @@ -191,6 +191,14 @@ static void ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, ch if (!(newcdr = ast_cdr_dup_unique(cdr))) return; + /* + * End the original CDR if requested BEFORE appending the new CDR + * otherwise we incorrectly end the new CDR also. + */ + if (ast_test_flag(&optflags, OPT_ENDCDR)) { + ast_cdr_end(cdr); + } + ast_cdr_append(cdr, newcdr); if (!ast_test_flag(&optflags, OPT_NORESET)) @@ -218,9 +226,6 @@ static void ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, ch if (ast_test_flag(&optflags, OPT_RESETDEST)) newcdr->dstchannel[0] = 0; - if (ast_test_flag(&optflags, OPT_ENDCDR)) - ast_cdr_end(cdr); - if (ast_test_flag(&optflags, OPT_ANSLOCK)) ast_set_flag(cdr, AST_CDR_FLAG_ANSLOCKED); diff --git a/apps/app_ices.c b/apps/app_ices.c index 52c03ae09e..f296c493f2 100644 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -97,7 +97,7 @@ static int icesencode(char *filename, int fd) execl(path_BIN "ices2", "ices", filename, SENTINEL); execlp("ices2", "ices", filename, SENTINEL); - ast_debug(1, "Couldn't find ices version 2, attempting to use ices version 1."); + ast_debug(1, "Couldn't find ices version 2, attempting to use ices version 1.\n"); execl(path_LOCAL "ices", "ices", filename, SENTINEL); execl(path_BIN "ices", "ices", filename, SENTINEL); diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 6122a55cd3..e6e465e05e 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -3738,7 +3738,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc } if (musiconhold && mohtempstopped && confsilence > MEETME_DELAYDETECTENDTALK) { mohtempstopped = 0; - ast_moh_start(chan, NULL, NULL); + conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]); } } } else { @@ -3760,7 +3760,7 @@ bailoutandtrynormal: } if (musiconhold && mohtempstopped && confsilence > MEETME_DELAYDETECTENDTALK) { mohtempstopped = 0; - ast_moh_start(chan, NULL, NULL); + conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]); } } } else { @@ -4673,6 +4673,12 @@ static int admin_exec(struct ast_channel *chan, const char *data) { case 101: /* e: Eject last user*/ { int max_no = 0; + + /* If they passed in a user, disregard it */ + if (user) { + ao2_ref(user, -1); + } + ao2_callback(cnf->usercontainer, OBJ_NODATA, user_max_cmp, &max_no); user = ao2_find(cnf->usercontainer, &max_no, 0); if (!ast_test_flag64(&user->userflags, CONFFLAG_ADMIN)) @@ -5024,6 +5030,31 @@ static int action_meetmelistrooms(struct mansession *s, const struct message *m) return 0; } +/*! \internal + * \brief creates directory structure and assigns absolute path from relative paths for filenames + * + * \param filename contains the absolute or relative path to the desired file + * \param buffer stores completed filename, absolutely must be a buffer of PATH_MAX length + */ +static void filename_parse(char *filename, char *buffer) +{ + char *slash; + if (ast_strlen_zero(filename)) { + ast_log(LOG_WARNING, "No file name was provided for a file save option.\n"); + } else if (filename[0] != '/') { + snprintf(buffer, PATH_MAX, "%s/meetme/%s", ast_config_AST_SPOOL_DIR, filename); + } else { + ast_copy_string(buffer, filename, PATH_MAX); + } + + slash = buffer; + if ((slash = strrchr(slash, '/'))) { + *slash = '\0'; + ast_mkdir(buffer, 0777); + *slash = '/'; + } +} + static void *recordthread(void *args) { struct ast_conference *cnf = args; @@ -5033,11 +5064,15 @@ static void *recordthread(void *args) int res = 0; int x; const char *oldrecordingfilename = NULL; + char filename_buffer[PATH_MAX]; if (!cnf || !cnf->lchan) { pthread_exit(0); } + filename_buffer[0] = '\0'; + filename_parse(cnf->recordingfilename, filename_buffer); + ast_stopstream(cnf->lchan); flags = O_CREAT | O_TRUNC | O_WRONLY; @@ -5049,9 +5084,9 @@ static void *recordthread(void *args) AST_LIST_UNLOCK(&confs); break; } - if (!s && cnf->recordingfilename && (cnf->recordingfilename != oldrecordingfilename)) { - s = ast_writefile(cnf->recordingfilename, cnf->recordingformat, NULL, flags, 0, AST_FILE_MODE); - oldrecordingfilename = cnf->recordingfilename; + if (!s && !(ast_strlen_zero(filename_buffer)) && (filename_buffer != oldrecordingfilename)) { + s = ast_writefile(filename_buffer, cnf->recordingformat, NULL, flags, 0, AST_FILE_MODE); + oldrecordingfilename = filename_buffer; } f = ast_read(cnf->lchan); diff --git a/apps/app_queue.c b/apps/app_queue.c index b1cdaae999..e3ff606c37 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1627,6 +1627,7 @@ static struct member *create_queue_member(const char *interface, const char *mem struct member *cur; if ((cur = ao2_alloc(sizeof(*cur), NULL))) { + cur->ignorebusy = 1; cur->penalty = penalty; cur->paused = paused; ast_copy_string(cur->interface, interface, sizeof(cur->interface)); diff --git a/apps/app_sms.c b/apps/app_sms.c index e3f8c5260b..8ce251cba2 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -1269,8 +1269,8 @@ static int sms_handleincoming_proto2(sms_t *h) switch (msg) { case 0x13: /* Body */ ast_verb(3, "SMS-P2 Body#%02X=[%.*s]\n", msg, msgsz, &h->imsg[f]); - if (msgsz >= sizeof(h->imsg)) { - msgsz = sizeof(h->imsg) - 1; + if (msgsz >= sizeof(h->ud)) { + msgsz = sizeof(h->ud) - 1; } for (i = 0; i < msgsz; i++) { h->ud[i] = h->imsg[f + i]; @@ -1373,7 +1373,7 @@ static void sms_messagerx2(sms_t * h) h->hangup = 1; /* hangup */ } else { /* XXX depending on what we are.. */ - ast_log(LOG_NOTICE, "SMS_SUBMIT or SMS_DELIVERY"); + ast_log(LOG_NOTICE, "SMS_SUBMIT or SMS_DELIVERY\n"); sms_nextoutgoing (h); } break; @@ -1801,7 +1801,7 @@ static void sms_process(sms_t * h, int samples, signed short *data) h->iphasep -= 80; if (h->ibitn++ == 9) { /* end of byte */ if (!bit) { /* bad stop bit */ - ast_log(LOG_NOTICE, "bad stop bit"); + ast_log(LOG_NOTICE, "bad stop bit\n"); h->ierr = 0xFF; /* unknown error */ } else { if (h->ibytep < sizeof(h->imsg)) { @@ -1809,14 +1809,14 @@ static void sms_process(sms_t * h, int samples, signed short *data) h->ibytec += h->ibytev; h->ibytep++; } else if (h->ibytep == sizeof(h->imsg)) { - ast_log(LOG_NOTICE, "msg too large"); + ast_log(LOG_NOTICE, "msg too large\n"); h->ierr = 2; /* bad message length */ } if (h->ibytep > 1 && h->ibytep == 3 + h->imsg[1] && !h->ierr) { if (!h->ibytec) { sms_messagerx(h); } else { - ast_log(LOG_NOTICE, "bad checksum"); + ast_log(LOG_NOTICE, "bad checksum\n"); h->ierr = 1; /* bad checksum */ } } diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 637aac613a..410c6fa308 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -53,6 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This application creates information to be used by all the other applications. It must be called before doing any speech recognition activities such as activating a grammar. It takes the engine name to use as the argument, if not specified the default engine will be used. + Sets the ERROR channel variable to 1 if the engine cannot be used. @@ -66,6 +67,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This activates the specified grammar to be recognized by the engine. A grammar tells the speech recognition engine what to recognize, and how to portray it back to you in the dialplan. The grammar name is the only argument to this application. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -76,6 +78,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); Tell the speech recognition engine that it should start trying to get results from audio being fed to it. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -104,6 +107,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)} and ${SPEECH_SCORE(1)}. The first argument is the sound file and the second is the timeout integer in seconds. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -118,6 +122,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This deactivates the specified grammar so that it is no longer recognized. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -130,6 +135,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This changes the processing sound that SpeechBackground plays back when the speech recognition engine is processing and working to get results. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -141,6 +147,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); This destroys the information used by all the other speech recognition applications. If you call this application but end up wanting to recognize more speech, you must call SpeechCreate() again before calling any other application. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -153,6 +160,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); Load a grammar only on the channel, not globally. + Hangs up the channel on failure. If this is not desired, use TryExec. @@ -164,6 +172,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); Unload a grammar. + Hangs up the channel on failure. If this is not desired, use TryExec. diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index e43963db29..2b0ac95430 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3818,7 +3818,7 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail int res = 0; int fd = -1; void *fdm = MAP_FAILED; - size_t fdlen = -1; + off_t fdlen = -1; SQLHSTMT stmt; char sql[PATH_MAX]; char msgnums[20]; @@ -3883,11 +3883,14 @@ static int store_file(const char *dir, const char *mailboxuser, const char *mail } } fdlen = lseek(fd, 0, SEEK_END); - lseek(fd, 0, SEEK_SET); - printf("Length is %zd\n", fdlen); + if (fdlen < 0 || lseek(fd, 0, SEEK_SET) < 0) { + ast_log(AST_LOG_WARNING, "Failed to process sound file '%s': %s\n", full_fn, strerror(errno)); + res = -1; + break; + } fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (fdm == MAP_FAILED) { - ast_log(AST_LOG_WARNING, "Memory map failed!\n"); + ast_log(AST_LOG_WARNING, "Memory map failed for sound file '%s'!\n", full_fn); res = -1; break; } @@ -4129,8 +4132,7 @@ static int copy(char *infile, char *outfile) close(ifd); close(ofd); unlink(outfile); - } - if (len) { + } else if (len) { res = write(ofd, buf, len); if (errno == ENOMEM || errno == ENOSPC || res != len) { ast_log(AST_LOG_WARNING, "Write failed on %s (%d of %d): %s\n", outfile, res, len, strerror(errno)); @@ -13034,7 +13036,7 @@ static int vmsayname_exec(struct ast_channel *chan, const char *data) int res; if (ast_strlen_zero(data)) { - ast_log(LOG_WARNING, "VMSayName requires argument mailbox@context"); + ast_log(LOG_WARNING, "VMSayName requires argument mailbox@context\n"); return -1; } diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c index a92495c3c6..a35874732a 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c @@ -239,6 +239,8 @@ static int set_sound(const char *sound_name, const char *sound_file, struct brid ast_string_field_set(sounds, placeintoconf, sound_file); } else if (!strcasecmp(sound_name, "sound_wait_for_leader")) { ast_string_field_set(sounds, waitforleader, sound_file); + } else if (!strcasecmp(sound_name, "sound_leader_has_left")) { + ast_string_field_set(sounds, leaderhasleft, sound_file); } else if (!strcasecmp(sound_name, "sound_get_pin")) { ast_string_field_set(sounds, getpin, sound_file); } else if (!strcasecmp(sound_name, "sound_invalid_pin")) { @@ -328,6 +330,7 @@ static int set_bridge_option(const char *name, const char *value, struct bridge_ ast_string_field_set(sounds, otherinparty, tmp->sounds->otherinparty); ast_string_field_set(sounds, placeintoconf, tmp->sounds->placeintoconf); ast_string_field_set(sounds, waitforleader, tmp->sounds->waitforleader); + ast_string_field_set(sounds, leaderhasleft, tmp->sounds->leaderhasleft); ast_string_field_set(sounds, getpin, tmp->sounds->getpin); ast_string_field_set(sounds, invalidpin, tmp->sounds->invalidpin); ast_string_field_set(sounds, locked, tmp->sounds->locked); @@ -1021,6 +1024,7 @@ static char *handle_cli_confbridge_show_bridge_profile(struct ast_cli_entry *e, ast_cli(a->fd,"sound_other_in_party: %s\n", conf_get_sound(CONF_SOUND_OTHER_IN_PARTY, b_profile.sounds)); ast_cli(a->fd,"sound_place_into_conference: %s\n", conf_get_sound(CONF_SOUND_PLACE_IN_CONF, b_profile.sounds)); ast_cli(a->fd,"sound_wait_for_leader: %s\n", conf_get_sound(CONF_SOUND_WAIT_FOR_LEADER, b_profile.sounds)); + ast_cli(a->fd,"sound_leader_has_left: %s\n", conf_get_sound(CONF_SOUND_LEADER_HAS_LEFT, b_profile.sounds)); ast_cli(a->fd,"sound_get_pin: %s\n", conf_get_sound(CONF_SOUND_GET_PIN, b_profile.sounds)); ast_cli(a->fd,"sound_invalid_pin: %s\n", conf_get_sound(CONF_SOUND_INVALID_PIN, b_profile.sounds)); ast_cli(a->fd,"sound_locked: %s\n", conf_get_sound(CONF_SOUND_LOCKED, b_profile.sounds)); diff --git a/apps/rpt_flow.pdf b/apps/rpt_flow.pdf deleted file mode 100644 index 2085af0f20..0000000000 Binary files a/apps/rpt_flow.pdf and /dev/null differ diff --git a/build_tools/cflags.xml b/build_tools/cflags.xml index eabb02951a..99ac5d1000 100644 --- a/build_tools/cflags.xml +++ b/build_tools/cflags.xml @@ -80,4 +80,9 @@ extended + + core + yes + native_arch + diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in index d1f6afb7ed..e159c20d51 100644 --- a/build_tools/menuselect-deps.in +++ b/build_tools/menuselect-deps.in @@ -66,3 +66,4 @@ VPB=@PBX_VPB@ WINARCH=@PBX_WINARCH@ ZLIB=@PBX_ZLIB@ TIMERFD=@PBX_TIMERFD@ +NATIVE_ARCH=@AST_NATIVE_ARCH@ diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 979cbba344..1acbc82e49 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -779,7 +779,7 @@ static int agent_indicate(struct ast_channel *ast, int condition, const void *da while (ast_channel_trylock(p->chan)) { int res; if ((res = ast_channel_unlock(ast))) { - ast_log(LOG_ERROR, "chan_agent bug! Channel was not locked upon entry to agent_indicate: %s\n", strerror(res)); + ast_log(LOG_ERROR, "chan_agent bug! Channel was not locked upon entry to agent_indicate: %s\n", res > 0 ? strerror(res) : "Bad ao2obj data"); ast_mutex_unlock(&p->lock); return -1; } diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index ba4d28ccb6..23dd52d63e 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3132,8 +3132,19 @@ static void my_handle_dchan_exception(struct sig_pri_span *pri, int index) int x; ioctl(pri->fds[index], DAHDI_GETEVENT, &x); - if (x) { - ast_log(LOG_NOTICE, "PRI got event: %s (%d) on D-channel of span %d\n", event2str(x), x, pri->span); + switch (x) { + case DAHDI_EVENT_NONE: + break; + case DAHDI_EVENT_ALARM: + case DAHDI_EVENT_NOALARM: + if (sig_pri_is_alarm_ignored(pri)) { + break; + } + /* Fall through */ + default: + ast_log(LOG_NOTICE, "PRI got event: %s (%d) on D-channel of span %d\n", + event2str(x), x, pri->span); + break; } /* Keep track of alarm state */ switch (x) { @@ -3823,6 +3834,12 @@ static void dahdi_queue_frame(struct dahdi_pvt *p, struct ast_frame *f) static void handle_clear_alarms(struct dahdi_pvt *p) { +#if defined(HAVE_PRI) + if (dahdi_sig_pri_lib_handles(p->sig) && sig_pri_is_alarm_ignored(p->pri)) { + return; + } +#endif /* defined(HAVE_PRI) */ + if (report_alarms & REPORT_CHANNEL_ALARMS) { ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", p->channel); manager_event(EVENT_FLAG_SYSTEM, "AlarmClear", "Channel: %d\r\n", p->channel); @@ -5960,7 +5977,7 @@ static int dahdi_send_callrerouting_facility_exec(struct ast_channel *chan, cons /* Data will be our digit string */ struct dahdi_pvt *pvt; char *parse; - int res = -1; + int res; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(destination); AST_APP_ARG(original); @@ -6007,10 +6024,17 @@ static int dahdi_send_callrerouting_facility_exec(struct ast_channel *chan, cons args.reason = NULL; } - pri_send_callrerouting_facility_exec(pvt->sig_pvt, chan->_state, args.destination, - args.original, args.reason); + res = pri_send_callrerouting_facility_exec(pvt->sig_pvt, chan->_state, + args.destination, args.original, args.reason); + if (!res) { + /* + * Wait up to 5 seconds for a reply before hanging up this call + * leg if the peer does not disconnect first. + */ + ast_safe_sleep(chan, 5000); + } - return res; + return -1; } #endif /* defined(HAVE_PRI_PROG_W_CAUSE) */ #endif /* defined(HAVE_PRI) */ @@ -7893,8 +7917,15 @@ static void dahdi_handle_dtmf(struct ast_channel *ast, int idx, struct ast_frame static void handle_alarms(struct dahdi_pvt *p, int alms) { - const char *alarm_str = alarm2str(alms); + const char *alarm_str; +#if defined(HAVE_PRI) + if (dahdi_sig_pri_lib_handles(p->sig) && sig_pri_is_alarm_ignored(p->pri)) { + return; + } +#endif /* defined(HAVE_PRI) */ + + alarm_str = alarm2str(alms); if (report_alarms & REPORT_CHANNEL_ALARMS) { ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", p->channel, alarm_str); manager_event(EVENT_FLAG_SYSTEM, "Alarm", @@ -8811,7 +8842,9 @@ static struct ast_frame *__dahdi_exception(struct ast_channel *ast) int usedindex = -1; struct dahdi_pvt *p = ast->tech_pvt; - idx = dahdi_get_index(ast, p, 1); + if ((idx = dahdi_get_index(ast, p, 0)) < 0) { + idx = SUB_REAL; + } p->subs[idx].f.frametype = AST_FRAME_NULL; p->subs[idx].f.datalen = 0; @@ -11091,9 +11124,7 @@ static void *mwi_thread(void *data) struct ast_format tmpfmt; if (!(cs = callerid_new(mtd->pvt->cid_signalling))) { - mtd->pvt->mwimonitoractive = 0; - - return NULL; + goto quit_no_clean; } callerid_feed(cs, mtd->buf, mtd->len, ast_format_set(&tmpfmt, AST_LAW(mtd->pvt), 0)); @@ -11149,6 +11180,7 @@ static void *mwi_thread(void *data) if ((chan = dahdi_new(mtd->pvt, AST_STATE_RING, 0, SUB_REAL, 0, NULL))) { int result; + if (analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) { result = analog_ss_thread_start(mtd->pvt->sig_pvt, chan); } else { @@ -11160,13 +11192,11 @@ static void *mwi_thread(void *data) if (res < 0) ast_log(LOG_WARNING, "Unable to play congestion tone on channel %d\n", mtd->pvt->channel); ast_hangup(chan); - goto quit; } - goto quit_no_clean; - } else { ast_log(LOG_WARNING, "Could not create channel to handle call\n"); } + goto quit_no_clean; } } else if (i & DAHDI_IOMUX_READ) { if ((res = read(mtd->pvt->subs[SUB_REAL].dfd, mtd->buf, sizeof(mtd->buf))) < 0) { @@ -11221,7 +11251,6 @@ quit: quit_no_clean: mtd->pvt->mwimonitoractive = 0; - ast_free(mtd); return NULL; @@ -11884,11 +11913,12 @@ static void *do_monitor(void *data) mtd->pvt = i; memcpy(mtd->buf, buf, res); mtd->len = res; + i->mwimonitoractive = 1; if (ast_pthread_create_background(&threadid, &attr, mwi_thread, mtd)) { ast_log(LOG_WARNING, "Unable to start mwi thread on channel %d\n", i->channel); + i->mwimonitoractive = 0; ast_free(mtd); } - i->mwimonitoractive = 1; } } /* If configured to check for a DTMF CID spill that comes without alert (e.g no polarity reversal) */ @@ -12671,6 +12701,12 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf, pris[span].pri.aoc_passthrough_flag = conf->pri.pri.aoc_passthrough_flag; pris[span].pri.aoce_delayhangup = conf->pri.pri.aoce_delayhangup; #endif /* defined(HAVE_PRI_AOC_EVENTS) */ + if (chan_sig == SIG_BRI_PTMP) { + pris[span].pri.layer1_ignored = conf->pri.pri.layer1_ignored; + } else { + /* Option does not apply to this line type. */ + pris[span].pri.layer1_ignored = 0; + } pris[span].pri.append_msn_to_user_tag = conf->pri.pri.append_msn_to_user_tag; ast_copy_string(pris[span].pri.initial_user_tag, conf->chan.cid_tag, sizeof(pris[span].pri.initial_user_tag)); ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list)); @@ -15478,8 +15514,9 @@ static char *dahdi_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli struct sig_pri_chan *chan = tmp->sig_pvt; ast_cli(a->fd, "PRI Flags: "); - if (chan->resetting) - ast_cli(a->fd, "Resetting "); + if (chan->resetting != SIG_PRI_RESET_IDLE) { + ast_cli(a->fd, "Resetting=%d ", chan->resetting); + } if (chan->call) ast_cli(a->fd, "Call "); if (chan->allocated) { @@ -17922,6 +17959,15 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct } else if (!strcasecmp(v->name, "datetime_send")) { confp->pri.pri.datetime_send = dahdi_datetime_send_option(v->value); #endif /* defined(HAVE_PRI_DATETIME_SEND) */ + } else if (!strcasecmp(v->name, "layer1_presence")) { + if (!strcasecmp(v->value, "required")) { + confp->pri.pri.layer1_ignored = 0; + } else if (!strcasecmp(v->value, "ignore")) { + confp->pri.pri.layer1_ignored = 1; + } else { + /* Default */ + confp->pri.pri.layer1_ignored = 0; + } #if defined(HAVE_PRI_L2_PERSISTENCE) } else if (!strcasecmp(v->name, "layer2_persistence")) { if (!strcasecmp(v->value, "keep_up")) { diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index b762094a96..523714dc5b 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -304,7 +304,7 @@ static int add_codec_to_answer(const struct gtalk_pvt *p, struct ast_format *cod if(!payload_eg711u || !payload_pcmu) { iks_delete(payload_pcmu); iks_delete(payload_eg711u); - ast_log(LOG_WARNING,"Failed to allocate iks node"); + ast_log(LOG_WARNING,"Failed to allocate iks node\n"); return -1; } iks_insert_attrib(payload_pcmu, "id", "0"); @@ -326,7 +326,7 @@ static int add_codec_to_answer(const struct gtalk_pvt *p, struct ast_format *cod if(!payload_eg711a || !payload_pcma) { iks_delete(payload_eg711a); iks_delete(payload_pcma); - ast_log(LOG_WARNING,"Failed to allocate iks node"); + ast_log(LOG_WARNING,"Failed to allocate iks node\n"); return -1; } iks_insert_attrib(payload_pcma, "id", "8"); @@ -345,7 +345,7 @@ static int add_codec_to_answer(const struct gtalk_pvt *p, struct ast_format *cod if (!strcasecmp("ilbc", format)) { iks *payload_ilbc = iks_new("payload-type"); if(!payload_ilbc) { - ast_log(LOG_WARNING,"Failed to allocate iks node"); + ast_log(LOG_WARNING,"Failed to allocate iks node\n"); return -1; } iks_insert_attrib(payload_ilbc, "id", "97"); @@ -358,7 +358,7 @@ static int add_codec_to_answer(const struct gtalk_pvt *p, struct ast_format *cod if (!strcasecmp("g723", format)) { iks *payload_g723 = iks_new("payload-type"); if(!payload_g723) { - ast_log(LOG_WARNING,"Failed to allocate iks node"); + ast_log(LOG_WARNING,"Failed to allocate iks node\n"); return -1; } iks_insert_attrib(payload_g723, "id", "4"); @@ -371,7 +371,7 @@ static int add_codec_to_answer(const struct gtalk_pvt *p, struct ast_format *cod if (!strcasecmp("speex", format)) { iks *payload_speex = iks_new("payload-type"); if(!payload_speex) { - ast_log(LOG_WARNING,"Failed to allocate iks node"); + ast_log(LOG_WARNING,"Failed to allocate iks node\n"); return -1; } iks_insert_attrib(payload_speex, "id", "110"); @@ -384,7 +384,7 @@ static int add_codec_to_answer(const struct gtalk_pvt *p, struct ast_format *cod if (!strcasecmp("gsm", format)) { iks *payload_gsm = iks_new("payload-type"); if(!payload_gsm) { - ast_log(LOG_WARNING,"Failed to allocate iks node"); + ast_log(LOG_WARNING,"Failed to allocate iks node\n"); return -1; } iks_insert_attrib(payload_gsm, "id", "103"); @@ -908,7 +908,7 @@ static int gtalk_create_candidates(struct gtalk *client, struct gtalk_pvt *p, ch gtalk_get_local_ip(&us); if (!strcmp(ast_sockaddr_stringify_addr(&us), "127.0.0.1")) { - ast_log(LOG_WARNING, "Found a loopback IP on the system, check your network configuration or set the bindaddr attribute."); + ast_log(LOG_WARNING, "Found a loopback IP on the system, check your network configuration or set the bindaddr attribute.\n"); } /* Setup our gtalk candidates */ diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index eee69ccfbc..b273b4fac4 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -5517,7 +5517,7 @@ static int iax2_start_transfer(unsigned short callno0, unsigned short callno1, i unsigned int transferid = (unsigned int)ast_random(); if (IAX_CALLENCRYPTED(iaxs[callno0]) || IAX_CALLENCRYPTED(iaxs[callno1])) { - ast_debug(1, "transfers are not supported for encrypted calls at this time"); + ast_debug(1, "transfers are not supported for encrypted calls at this time\n"); ast_set_flag64(iaxs[callno0], IAX_NOTRANSFER); ast_set_flag64(iaxs[callno1], IAX_NOTRANSFER); return 0; @@ -7983,7 +7983,7 @@ static int authenticate_verify(struct chan_iax2_pvt *p, struct iax_ies *ies) user = user_unref(user); } if (ast_test_flag64(p, IAX_FORCE_ENCRYPT) && !p->encmethods) { - ast_log(LOG_NOTICE, "Call Terminated, Incoming call is unencrypted while force encrypt is enabled."); + ast_log(LOG_NOTICE, "Call Terminated, Incoming call is unencrypted while force encrypt is enabled.\n"); return res; } if (!ast_test_flag(&p->state, IAX_STATE_AUTHENTICATED)) @@ -8331,7 +8331,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin, if (ies->encmethods) { ast_set_flag64(p, IAX_ENCRYPTED | IAX_KEYPOPULATED); } else if (ast_test_flag64(iaxs[callno], IAX_FORCE_ENCRYPT)) { - ast_log(LOG_NOTICE, "Call initiated without encryption while forceencryption=yes option is set"); + ast_log(LOG_NOTICE, "Call initiated without encryption while forceencryption=yes option is set\n"); return -1; /* if force encryption is yes, and no encryption methods, then return -1 to hangup */ } if (!res) { @@ -13366,6 +13366,9 @@ static int set_config(const char *config_file, int reload) ast_log(LOG_NOTICE, "trunkfreq must be between 10ms and 1000ms, using 1000ms instead.\n"); trunkfreq = 1000; } + if (timer) { + ast_timer_set_rate(timer, 1000 / trunkfreq); + } } else if (!strcasecmp(v->name, "trunkmtu")) { mtuv = atoi(v->value); if (mtuv == 0 ) diff --git a/channels/chan_local.c b/channels/chan_local.c index 937ede4c22..ae46a04691 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -1119,8 +1119,11 @@ static struct ast_channel *local_new(struct local_pvt *p, int state, const char ama = p->owner->amaflags; else ama = 0; + + /* Make sure that the ;2 channel gets the same linkedid as ;1. You can't pass linkedid to both + * allocations since if linkedid isn't set, then each channel will generate its own linkedid. */ if (!(tmp = ast_channel_alloc(1, state, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%04x;1", p->exten, p->context, randnum)) - || !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%04x;2", p->exten, p->context, randnum))) { + || !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, tmp->linkedid, ama, "Local/%s@%s-%04x;2", p->exten, p->context, randnum))) { if (tmp) { tmp = ast_channel_release(tmp); } @@ -1166,20 +1169,26 @@ static struct ast_channel *local_new(struct local_pvt *p, int state, const char /*! \brief Part of PBX interface */ static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause) { - struct local_pvt *p = NULL; - struct ast_channel *chan = NULL; + struct local_pvt *p; + struct ast_channel *chan; /* Allocate a new private structure and then Asterisk channel */ - if ((p = local_alloc(data, cap))) { - if (!(chan = local_new(p, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL))) { - ao2_unlink(locals, p); - } - if (chan && ast_channel_cc_params_init(chan, requestor ? ast_channel_get_cc_config_params((struct ast_channel *)requestor) : NULL)) { - chan = ast_channel_release(chan); - ao2_unlink(locals, p); - } - ao2_ref(p, -1); /* kill the ref from the alloc */ + p = local_alloc(data, cap); + if (!p) { + return NULL; + } + chan = local_new(p, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL); + if (!chan) { + ao2_unlink(locals, p); + } else if (ast_channel_cc_params_init(chan, requestor ? ast_channel_get_cc_config_params((struct ast_channel *)requestor) : NULL)) { + ao2_unlink(locals, p); + p->owner = ast_channel_release(p->owner); + ast_module_user_remove(p->u_owner); + p->chan = ast_channel_release(p->chan); + ast_module_user_remove(p->u_chan); + chan = NULL; } + ao2_ref(p, -1); /* kill the ref from the alloc */ return chan; } diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 9df36eb7a9..07fb89a034 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1306,7 +1306,7 @@ static int mgcp_senddigit_begin(struct ast_channel *ast, char digit) ast_debug(1, "Sending DTMF using inband/hybrid\n"); res = -1; /* Let asterisk play inband indications */ } else if (p->dtmfmode & MGCP_DTMF_RFC2833) { - ast_debug(1, "Sending DTMF using RFC2833"); + ast_debug(1, "Sending DTMF using RFC2833\n"); ast_rtp_instance_dtmf_begin(sub->rtp, digit); } else { ast_log(LOG_ERROR, "Don't know about DTMF_MODE %d\n", p->dtmfmode); diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d8b7d92c98..81c1712a41 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright (C) 1999 - 2006, Digium, Inc. + * Copyright (C) 1999 - 2012, Digium, Inc. * * Mark Spencer * @@ -2806,7 +2806,7 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s case TCPTLS_ALERT_DATA: ao2_lock(me); if (!(packet = AST_LIST_REMOVE_HEAD(&me->packet_q, entry))) { - ast_log(LOG_WARNING, "TCPTLS thread alert_pipe indicated packet should be sent, but frame_q is empty"); + ast_log(LOG_WARNING, "TCPTLS thread alert_pipe indicated packet should be sent, but frame_q is empty\n"); } ao2_unlock(me); @@ -3462,7 +3462,7 @@ static void ast_sip_ouraddrfor(const struct ast_sockaddr *them, struct ast_socka ast_sockaddr_copy(&theirs, them); if (ast_sockaddr_is_ipv6(&theirs)) { - if (localaddr && !ast_sockaddr_isnull(&externaddr)) { + if (localaddr && !ast_sockaddr_isnull(&externaddr) && !ast_sockaddr_is_any(&bindaddr)) { ast_log(LOG_WARNING, "Address remapping activated in sip.conf " "but we're using IPv6, which doesn't need it. Please " "remove \"localnet\" and/or \"externaddr\" settings.\n"); @@ -5640,7 +5640,7 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout) p->options->replaces = ast_var_value(current); } else if (!strcasecmp(ast_var_name(current), "SIP_MAX_FORWARDS")) { if (sscanf(ast_var_value(current), "%30d", &(p->maxforwards)) != 1) { - ast_log(LOG_WARNING, "The SIP_MAX_FORWARDS channel variable is not a valid integer."); + ast_log(LOG_WARNING, "The SIP_MAX_FORWARDS channel variable is not a valid integer.\n"); } } } @@ -5867,8 +5867,12 @@ void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist) } if (p->udptl) ast_udptl_destroy(p->udptl); - if (p->refer) + if (p->refer) { + if (p->refer->refer_call) { + p->refer->refer_call = dialog_unref(p->refer->refer_call, "unref dialog p->refer->refer_call"); + } ast_free(p->refer); + } if (p->route) { free_old_route(p->route); p->route = NULL; @@ -6303,7 +6307,7 @@ static int sip_hangup(struct ast_channel *ast) return 0; } if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE) || ast->hangupcause == AST_CAUSE_ANSWERED_ELSEWHERE) { - ast_debug(1, "This call was answered elsewhere"); + ast_debug(1, "This call was answered elsewhere\n"); if (ast->hangupcause == AST_CAUSE_ANSWERED_ELSEWHERE) { ast_debug(1, "####### It's the cause code, buddy. The cause code!!!\n"); } @@ -9168,6 +9172,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action int video = FALSE; int image = FALSE; int text = FALSE; + int processed_crypto = FALSE; char protocol[5] = {0,}; int x; @@ -9182,7 +9187,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action if ((sscanf(m, "audio %30u/%30u RTP/%4s %n", &x, &numberofports, protocol, &len) == 3 && len > 0) || (sscanf(m, "audio %30u RTP/%4s %n", &x, protocol, &len) == 2 && len > 0)) { if (x == 0) { - ast_log(LOG_WARNING, "ignoring 'audio' media offer because port number is zero"); + ast_log(LOG_WARNING, "ignoring 'audio' media offer because port number is zero\n"); continue; } if (!strcmp(protocol, "SAVP")) { @@ -9218,7 +9223,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action } else if ((sscanf(m, "video %30u/%30u RTP/%4s %n", &x, &numberofports, protocol, &len) == 3 && len > 0) || (sscanf(m, "video %30u RTP/%4s %n", &x, protocol, &len) == 2 && len > 0)) { if (x == 0) { - ast_log(LOG_WARNING, "ignoring 'video' media offer because port number is zero"); + ast_log(LOG_WARNING, "ignoring 'video' media offer because port number is zero\n"); continue; } if (!strcmp(protocol, "SAVP")) { @@ -9254,7 +9259,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action } else if ((sscanf(m, "text %30u/%30u RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) || (sscanf(m, "text %30u RTP/AVP %n", &x, &len) == 1 && len > 0)) { if (x == 0) { - ast_log(LOG_WARNING, "ignoring 'text' media offer because port number is zero"); + ast_log(LOG_WARNING, "ignoring 'text' media offer because port number is zero\n"); continue; } if (p->offered_media[SDP_TEXT].order_offered) { @@ -9284,7 +9289,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action } else if (((sscanf(m, "image %30u udptl t38%n", &x, &len) == 1 && len > 0) || (sscanf(m, "image %30u UDPTL t38%n", &x, &len) == 1 && len > 0))) { if (x == 0) { - ast_log(LOG_WARNING, "ignoring 'image' media offer because port number is zero"); + ast_log(LOG_WARNING, "ignoring 'image' media offer because port number is zero\n"); continue; } if (initialize_udptl(p)) { @@ -9349,28 +9354,34 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action case 'a': /* Audio specific scanning */ if (audio) { - if (process_sdp_a_sendonly(value, &sendonly)) + if (process_sdp_a_sendonly(value, &sendonly)) { processed = TRUE; - else if (process_crypto(p, p->rtp, &p->srtp, value)) + } else if (!processed_crypto && process_crypto(p, p->rtp, &p->srtp, value)) { + processed_crypto = TRUE; processed = TRUE; - else if (process_sdp_a_audio(value, p, &newaudiortp, &last_rtpmap_codec)) + } else if (process_sdp_a_audio(value, p, &newaudiortp, &last_rtpmap_codec)) { processed = TRUE; + } } /* Video specific scanning */ else if (video) { - if (process_sdp_a_sendonly(value, &vsendonly)) + if (process_sdp_a_sendonly(value, &vsendonly)) { processed = TRUE; - else if (process_crypto(p, p->vrtp, &p->vsrtp, value)) + } else if (!processed_crypto && process_crypto(p, p->vrtp, &p->vsrtp, value)) { + processed_crypto = TRUE; processed = TRUE; - else if (process_sdp_a_video(value, p, &newvideortp, &last_rtpmap_codec)) + } else if (process_sdp_a_video(value, p, &newvideortp, &last_rtpmap_codec)) { processed = TRUE; + } } /* Text (T.140) specific scanning */ else if (text) { - if (process_sdp_a_text(value, p, &newtextrtp, red_fmtp, &red_num_gen, red_data_pt, &last_rtpmap_codec)) + if (process_sdp_a_text(value, p, &newtextrtp, red_fmtp, &red_num_gen, red_data_pt, &last_rtpmap_codec)) { processed = TRUE; - else if (process_crypto(p, p->trtp, &p->tsrtp, value)) + } else if (!processed_crypto && process_crypto(p, p->trtp, &p->tsrtp, value)) { + processed_crypto = TRUE; processed = TRUE; + } } /* Image (T.38 FAX) specific scanning */ else if (image) { @@ -13392,7 +13403,7 @@ static int manager_sipnotify(struct mansession *s, const struct message *m) ast_str_append(&p->notify->content, 0, "\r\n"); ast_str_append(&p->notify->content, 0, "%s", var->value); } else if (!strcasecmp(var->name, "Content-Length")) { - ast_log(LOG_WARNING, "it is not necessary to specify Content-Length, ignoring"); + ast_log(LOG_WARNING, "it is not necessary to specify Content-Length, ignoring\n"); } else { header->next = ast_variable_new(var->name, var->value, ""); header = header->next; @@ -16304,7 +16315,6 @@ static int get_also_info(struct sip_pvt *p, struct sip_request *oreq) ast_copy_string(referdata->refer_to, c, sizeof(referdata->refer_to)); ast_copy_string(referdata->referred_by, "", sizeof(referdata->referred_by)); ast_copy_string(referdata->refer_contact, "", sizeof(referdata->refer_contact)); - referdata->refer_call = dialog_unref(referdata->refer_call, "unreffing referdata->refer_call"); /* Set new context */ ast_string_field_set(p, context, transfer_context); return 0; @@ -19764,7 +19774,7 @@ static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_arg ast_str_append(&p->notify->content, 0, "\r\n"); ast_str_append(&p->notify->content, 0, "%s", buf); } else if (!strcasecmp(var->name, "Content-Length")) { - ast_log(LOG_WARNING, "it is not necessary to specify Content-Length in sip_notify.conf, ignoring"); + ast_log(LOG_WARNING, "it is not necessary to specify Content-Length in sip_notify.conf, ignoring\n"); } else { header->next = ast_variable_new(var->name, buf, ""); header = header->next; @@ -23211,6 +23221,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (subscription->owner) { ast_channel_unlock(subscription->owner); } + subscription = dialog_unref(subscription, "unref dialog subscription"); } } @@ -23229,7 +23240,6 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (p->refer->refer_call == p) { ast_log(LOG_NOTICE, "INVITE with replaces into it's own call id (%s == %s)!\n", replace_id, p->callid); - p->refer->refer_call = dialog_unref(p->refer->refer_call, "unref dialog p->refer->refer_call"); transmit_response_reliable(p, "400 Bad request", req); /* The best way to not not accept the transfer */ error = 1; } @@ -23257,6 +23267,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (p->refer->refer_call->owner) { ast_channel_unlock(p->refer->refer_call->owner); } + p->refer->refer_call = dialog_unref(p->refer->refer_call, "unref dialog p->refer->refer_call"); } refer_locked = 0; p->invitestate = INV_COMPLETED; @@ -23837,6 +23848,7 @@ request_invite_cleanup: if (p->refer->refer_call->owner) { ast_channel_unlock(p->refer->refer_call->owner); } + p->refer->refer_call = dialog_unref(p->refer->refer_call, "unref dialog p->refer->refer_call"); } if (authpeer) { authpeer = sip_unref_peer(authpeer, "sip_unref_peer, from handle_request_invite authpeer"); @@ -28805,7 +28817,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str ast_string_field_set(peer, tohost, srvlookup); - if (global_dynamic_exclude_static) { + if (global_dynamic_exclude_static && !ast_sockaddr_isnull(&peer->addr)) { int ha_error = 0; sip_cfg.contact_ha = ast_append_ha("deny", ast_sockaddr_stringify_addr(&peer->addr), sip_cfg.contact_ha, &ha_error); @@ -29691,7 +29703,8 @@ static int reload_config(enum channelreloadreason reason) } else if (!strcasecmp(v->name, "use_q850_reason")) { ast_set2_flag(&global_flags[1], ast_true(v->value), SIP_PAGE2_Q850_REASON); } else if (!strcasecmp(v->name, "maxforwards")) { - if ((sscanf(v->value, "%30d", &sip_cfg.default_max_forwards) != 1) || (sip_cfg.default_max_forwards < 1)) { + if (sscanf(v->value, "%30d", &sip_cfg.default_max_forwards) != 1 + || sip_cfg.default_max_forwards < 1 || 255 < sip_cfg.default_max_forwards) { ast_log(LOG_WARNING, "'%s' is not a valid maxforwards value at line %d. Using default.\n", v->value, v->lineno); sip_cfg.default_max_forwards = DEFAULT_MAX_FORWARDS; } @@ -30691,12 +30704,6 @@ static int process_crypto(struct sip_pvt *p, struct ast_rtp_instance *rtp, struc } } - /* For now, when we receive an INVITE just take the first successful crypto line */ - if ((*srtp)->crypto && !ast_test_flag(&p->flags[0], SIP_OUTGOING)) { - ast_debug(3, "We've already processed a crypto attribute, skipping '%s'\n", a); - return FALSE; - } - if (!(*srtp)->crypto && !((*srtp)->crypto = sdp_crypto_setup())) { return FALSE; } diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 9a8c064c28..4d9e2bbfad 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -1558,14 +1558,13 @@ static void rcv_mac_addr(struct unistimsession *pte, const unsigned char *buf) int tmp, i = 0; char addrmac[19]; int res = 0; - if (unistimdebug) - ast_verb(0, "Mac Address received : "); for (tmp = 15; tmp < 15 + SIZE_HEADER; tmp++) { sprintf(&addrmac[i], "%.2x", (unsigned char) buf[tmp]); i += 2; } - if (unistimdebug) - ast_verb(0, "%s\n", addrmac); + if (unistimdebug) { + ast_verb(0, "Mac Address received : %s\n", addrmac); + } strcpy(pte->macaddr, addrmac); res = unistim_register(pte); if (!res) { @@ -3249,7 +3248,7 @@ static void key_main_page(struct unistimsession *pte, char keycode) if (!ast_strlen_zero(pte->device->call_forward)) { /* Cancel call forwarding */ memmove(pte->device->call_forward + 1, pte->device->call_forward, - sizeof(pte->device->call_forward)); + sizeof(pte->device->call_forward) - 1); pte->device->call_forward[0] = '\0'; Sendicon(TEXT_LINE0, FAV_ICON_NONE, pte); pte->device->output = OUTPUT_HANDSET; /* Seems to be reseted somewhere */ @@ -5033,7 +5032,7 @@ static int ParseBookmark(const char *text, struct unistim_device *d) ast_log(LOG_WARNING, "Invalid position %d for bookmark : already used\n:", p); return 0; } - memmove(line, line + 2, sizeof(line)); + memmove(line, line + 2, sizeof(line) - 2); } else { /* No position specified, looking for a free slot */ for (p = 0; p <= 5; p++) { @@ -5201,7 +5200,7 @@ static struct unistim_device *build_device(const char *cat, const struct ast_var else if (!strcasecmp(v->name, "contrast")) { d->contrast = atoi(v->value); if ((d->contrast < 0) || (d->contrast > 15)) { - ast_log(LOG_WARNING, "constrast must be beetween 0 and 15"); + ast_log(LOG_WARNING, "contrast must be beetween 0 and 15\n"); d->contrast = 8; } } else if (!strcasecmp(v->name, "nat")) diff --git a/channels/console_gui.c b/channels/console_gui.c index 375a4019c4..f49152a732 100644 --- a/channels/console_gui.c +++ b/channels/console_gui.c @@ -976,7 +976,7 @@ static void eventhandler(struct video_desc *env, const char *caption) case SDL_ACTIVEEVENT: #if 0 /* do not react, we don't want to die because the window is minimized */ if (ev[i].active.gain == 0 && ev[i].active.state & SDL_APPACTIVE) { - ast_log(LOG_WARNING, "/* somebody has killed us ? */"); + ast_log(LOG_WARNING, "/* somebody has killed us ? */\n"); ast_cli_command(gui->outfd, "stop now"); } #endif @@ -1635,7 +1635,7 @@ static int keypad_cfg_read(struct gui_info *gui, const char *val) if (gui->kp_size == 0) { gui->kp = ast_calloc(10, sizeof(e)); if (gui->kp == NULL) { - ast_log(LOG_WARNING, "cannot allocate kp"); + ast_log(LOG_WARNING, "cannot allocate kp\n"); return 0; } gui->kp_size = 10; @@ -1643,7 +1643,7 @@ static int keypad_cfg_read(struct gui_info *gui, const char *val) if (gui->kp_size == gui->kp_used) { /* must allocate */ struct keypad_entry *a = ast_realloc(gui->kp, sizeof(e)*(gui->kp_size+10)); if (a == NULL) { - ast_log(LOG_WARNING, "cannot reallocate kp"); + ast_log(LOG_WARNING, "cannot reallocate kp\n"); return 0; } gui->kp = a; diff --git a/channels/console_video.c b/channels/console_video.c index c26ac983fe..ba12f83c99 100644 --- a/channels/console_video.c +++ b/channels/console_video.c @@ -657,7 +657,7 @@ static void my_scale(struct fbuf_t *in, AVPicture *p_in, eff_w, eff_h, out->pix_fmt, SWS_BICUBIC, NULL, NULL, NULL); if (convert_ctx == NULL) { - ast_log(LOG_ERROR, "FFMPEG::convert_cmodel : swscale context initialization failed"); + ast_log(LOG_ERROR, "FFMPEG::convert_cmodel : swscale context initialization failed\n"); return; } if (0) diff --git a/channels/sig_pri.c b/channels/sig_pri.c index 2628163849..48633ab7ce 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -190,12 +190,17 @@ static void sig_pri_set_outgoing(struct sig_pri_chan *p, int is_outgoing) void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm) { + if (sig_pri_is_alarm_ignored(p->pri)) { + /* Always set not in alarm */ + in_alarm = 0; + } + /* - * Clear the channel restart flag when the channel alarm changes - * to prevent the flag from getting stuck when the link goes - * down. + * Clear the channel restart state when the channel alarm + * changes to prevent the state from getting stuck when the link + * goes down. */ - p->resetting = 0; + p->resetting = SIG_PRI_RESET_IDLE; p->inalarm = in_alarm; if (p->calls->set_alarm) { @@ -1152,7 +1157,8 @@ static void pri_find_dchan(struct sig_pri_span *pri) */ static int sig_pri_is_chan_in_use(struct sig_pri_chan *pvt) { - return pvt->owner || pvt->call || pvt->allocated || pvt->resetting || pvt->inalarm; + return pvt->owner || pvt->call || pvt->allocated || pvt->inalarm + || pvt->resetting != SIG_PRI_RESET_IDLE; } /*! @@ -1707,7 +1713,7 @@ static void pri_check_restart(struct sig_pri_span *pri) } if (pri->resetpos < pri->numchans) { /* Mark the channel as resetting and restart it */ - pri->pvts[pri->resetpos]->resetting = 1; + pri->pvts[pri->resetpos]->resetting = SIG_PRI_RESET_ACTIVE; pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[pri->resetpos])); } else { pri->resetting = 0; @@ -5944,13 +5950,40 @@ static void *pri_dchannel(void *vpri) "Span %d: SETUP on unconfigured channel %d/%d\n", pri->span, PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel)); - } else if (!sig_pri_is_chan_available(pri->pvts[chanpos])) { - /* This is where we handle initial glare */ - ast_debug(1, - "Span %d: SETUP requested unavailable channel %d/%d. Attempting to renegotiate.\n", - pri->span, PRI_SPAN(e->ring.channel), - PRI_CHANNEL(e->ring.channel)); - chanpos = -1; + } else { + switch (pri->pvts[chanpos]->resetting) { + case SIG_PRI_RESET_IDLE: + break; + case SIG_PRI_RESET_ACTIVE: + /* + * The peer may have lost the expected ack or not received the + * RESTART yet. + */ + pri->pvts[chanpos]->resetting = SIG_PRI_RESET_NO_ACK; + break; + case SIG_PRI_RESET_NO_ACK: + /* The peer likely is not going to ack the RESTART. */ + ast_debug(1, + "Span %d: Second SETUP while waiting for RESTART ACKNOWLEDGE on channel %d/%d\n", + pri->span, PRI_SPAN(e->ring.channel), + PRI_CHANNEL(e->ring.channel)); + + /* Assume we got the ack. */ + pri->pvts[chanpos]->resetting = SIG_PRI_RESET_IDLE; + if (pri->resetting) { + /* Go on to the next idle channel to RESTART. */ + pri_check_restart(pri); + } + break; + } + if (!sig_pri_is_chan_available(pri->pvts[chanpos])) { + /* This is where we handle initial glare */ + ast_debug(1, + "Span %d: SETUP requested unavailable channel %d/%d. Attempting to renegotiate.\n", + pri->span, PRI_SPAN(e->ring.channel), + PRI_CHANNEL(e->ring.channel)); + chanpos = -1; + } } #if defined(ALWAYS_PICK_CHANNEL) if (e->ring.flexible) { @@ -6771,12 +6804,12 @@ static void *pri_dchannel(void *vpri) #if defined(FORCE_RESTART_UNAVAIL_CHANS) if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL && pri->sig != SIG_BRI_PTMP && !pri->resetting - && !pri->pvts[chanpos]->resetting) { + && pri->pvts[chanpos]->resetting == SIG_PRI_RESET_IDLE) { ast_verb(3, "Span %d: Forcing restart of channel %d/%d since channel reported in use\n", pri->span, pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset); - pri->pvts[chanpos]->resetting = 1; + pri->pvts[chanpos]->resetting = SIG_PRI_RESET_ACTIVE; pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos])); } #endif /* defined(FORCE_RESTART_UNAVAIL_CHANS) */ @@ -6919,12 +6952,12 @@ static void *pri_dchannel(void *vpri) #if defined(FORCE_RESTART_UNAVAIL_CHANS) if (e->hangup.cause == PRI_CAUSE_REQUESTED_CHAN_UNAVAIL && pri->sig != SIG_BRI_PTMP && !pri->resetting - && !pri->pvts[chanpos]->resetting) { + && pri->pvts[chanpos]->resetting == SIG_PRI_RESET_IDLE) { ast_verb(3, "Span %d: Forcing restart of channel %d/%d since channel reported in use\n", pri->span, pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset); - pri->pvts[chanpos]->resetting = 1; + pri->pvts[chanpos]->resetting = SIG_PRI_RESET_ACTIVE; pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos])); } #endif /* defined(FORCE_RESTART_UNAVAIL_CHANS) */ @@ -6988,7 +7021,8 @@ static void *pri_dchannel(void *vpri) channel number, so we have to figure it out... This must be why everybody resets exactly a channel at a time. */ for (x = 0; x < pri->numchans; x++) { - if (pri->pvts[x] && pri->pvts[x]->resetting) { + if (pri->pvts[x] + && pri->pvts[x]->resetting != SIG_PRI_RESET_IDLE) { chanpos = x; sig_pri_lock_private(pri->pvts[chanpos]); ast_debug(1, @@ -7002,7 +7036,7 @@ static void *pri_dchannel(void *vpri) pri->pvts[chanpos]->prioffset); pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV; } - pri->pvts[chanpos]->resetting = 0; + pri->pvts[chanpos]->resetting = SIG_PRI_RESET_IDLE; ast_verb(3, "Span %d: Channel %d/%d successfully restarted\n", pri->span, pri->pvts[chanpos]->logicalspan, @@ -7021,6 +7055,15 @@ static void *pri_dchannel(void *vpri) } } else { sig_pri_lock_private(pri->pvts[chanpos]); + if (pri->pvts[chanpos]->resetting == SIG_PRI_RESET_IDLE) { + /* The channel is not in the resetting state. */ + ast_debug(1, + "Span %d: Unexpected or late restart ack on channel %d/%d (Ignoring)\n", + pri->span, pri->pvts[chanpos]->logicalspan, + pri->pvts[chanpos]->prioffset); + sig_pri_unlock_private(pri->pvts[chanpos]); + break; + } if (pri->pvts[chanpos]->owner) { ast_log(LOG_WARNING, "Span %d: Got restart ack on channel %d/%d with owner\n", @@ -7028,7 +7071,7 @@ static void *pri_dchannel(void *vpri) pri->pvts[chanpos]->prioffset); pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV; } - pri->pvts[chanpos]->resetting = 0; + pri->pvts[chanpos]->resetting = SIG_PRI_RESET_IDLE; ast_verb(3, "Span %d: Channel %d/%d successfully restarted\n", pri->span, pri->pvts[chanpos]->logicalspan, @@ -8809,6 +8852,18 @@ void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm) pri_rel(p->pri); } +/*! + * \brief Determine if layer 1 alarms are ignored. + * + * \param p Channel private pointer. + * + * \return TRUE if the alarm is ignored. + */ +int sig_pri_is_alarm_ignored(struct sig_pri_span *pri) +{ + return pri->layer1_ignored; +} + struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup) { struct sig_pri_chan *p; @@ -8965,7 +9020,7 @@ int pri_send_keypad_facility_exec(struct sig_pri_chan *p, const char *digits) int pri_send_callrerouting_facility_exec(struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason) { - int res = -1; + int res; sig_pri_lock_private(p); diff --git a/channels/sig_pri.h b/channels/sig_pri.h index 02e7ce5a95..493e5913ba 100644 --- a/channels/sig_pri.h +++ b/channels/sig_pri.h @@ -162,6 +162,27 @@ enum sig_pri_call_level { SIG_PRI_CALL_LEVEL_CONNECT, }; +enum sig_pri_reset_state { + /*! \brief The channel is not being RESTARTed. */ + SIG_PRI_RESET_IDLE, + /*! + * \brief The channel is being RESTARTed. + * \note Waiting for a RESTART ACKNOWLEDGE from the peer. + */ + SIG_PRI_RESET_ACTIVE, + /*! + * \brief Peer may not be sending the expected RESTART ACKNOWLEDGE. + * + * \details We have already received a SETUP on this channel. + * If another SETUP comes in on this channel then the peer + * considers this channel useable. Assume that the peer is + * never going to give us a RESTART ACKNOWLEDGE and assume that + * we have received one. This is not according to Q.931, but + * some peers occasionally fail to send a RESTART ACKNOWLEDGE. + */ + SIG_PRI_RESET_NO_ACK, +}; + struct sig_pri_span; struct sig_pri_callback { @@ -311,7 +332,6 @@ struct sig_pri_chan { unsigned int alreadyhungup:1; /*!< TRUE if the call has already gone/hungup */ unsigned int isidlecall:1; /*!< TRUE if this is an idle call */ unsigned int progress:1; /*!< TRUE if the call has seen inband-information progress through the network */ - unsigned int resetting:1; /*!< TRUE if this channel is being reset/restarted */ /*! * \brief TRUE when this channel is allocated. @@ -340,6 +360,8 @@ struct sig_pri_chan { /*! Call establishment life cycle level for simple comparisons. */ enum sig_pri_call_level call_level; + /*! \brief Channel reset/restart state. */ + enum sig_pri_reset_state resetting; int prioffset; /*!< channel number in span */ int logicalspan; /*!< logical span number within trunk group */ int mastertrunkgroup; /*!< what trunk group is our master */ @@ -442,6 +464,8 @@ struct sig_pri_span { /*! \brief TRUE if we will allow incoming ISDN call waiting calls. */ unsigned int allow_call_waiting_calls:1; #endif /* defined(HAVE_PRI_CALL_WAITING) */ + /*! TRUE if layer 1 alarm status is ignored */ + unsigned int layer1_ignored:1; /*! * TRUE if a new call's sig_pri_chan.user_tag[] has the MSN * appended to the initial_user_tag[]. @@ -619,8 +643,8 @@ int sig_pri_start_pri(struct sig_pri_span *pri); void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm); void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm); +int sig_pri_is_alarm_ignored(struct sig_pri_span *pri); void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri); - void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri); struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability); diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile index a3dd201249..a072e6d2dd 100644 --- a/codecs/gsm/Makefile +++ b/codecs/gsm/Makefile @@ -45,35 +45,6 @@ ifeq ($(shell $(CC) -v 2>&1 | awk '/^gcc version/ { split($$3, v, "."); printf " OPTIMIZE=-O2 endif -# If the compiler's '-march' flag has been specified already, then assume it's a value -# that is what the user wants (or has been determined by the configure script). If not, -# do some simple logic to set a decent value -ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),) - ifeq (,$(findstring $(shell uname -s),Darwin SunOS)) - ifeq (,$(strip $(findstring $(PROC) ,"x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips "))) - ifeq (,$(strip $(findstring $(shell uname -m) ,"ppc ppc64 alpha armv4l s390 "))) - OPTIMIZE+=-march=$(PROC) - endif - endif - else - ifneq (,$(findstring $(OSARCH),Darwin)) - ifeq ($(shell if test `/usr/bin/sw_vers -productVersion | cut -c4` -gt 5; then echo 6; else echo 0; fi),6) - # Snow Leopard/Lion reports i386, even though it's really x86_64 - OPTIMIZE+=-mtune=native - endif - endif - endif - - #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. - #This works for even old (2.96) versions of gcc and provides a small boost either way. - #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it. - #So we go lowest common available by gcc and go a step down, still a step up from - #the default as we now have a better instruction set to work with. - Belgarath - ifeq ($(PROC),ultrasparc) - OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3 - endif -endif - PG = #PG = -g -pg ######### Profiling flags. If you don't know what that means, leave it blank. @@ -224,17 +195,6 @@ GSM_SOURCES = $(SRC)/add.c \ $(SRC)/short_term.c \ $(SRC)/table.c -# add k6-specific code only if not on a non-k6 hardware or proc. -# XXX Keep a space after each findstring argument -# XXX should merge with GSM_OBJECTS -ifeq ($(OSARCH),linux-gnu) -ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 )) -ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips )) -GSM_SOURCES+= $(SRC)/k6opt.s -endif -endif -endif - TOAST_SOURCES = $(SRC)/toast.c \ $(SRC)/toast_lin.c \ $(SRC)/toast_ulaw.c \ @@ -279,14 +239,6 @@ GSM_OBJECTS = $(SRC)/add.o \ $(SRC)/short_term.o \ $(SRC)/table.o -ifeq ($(OSARCH),linux-gnu) -ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc )) -ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips )) -GSM_OBJECTS+= $(SRC)/k6opt.o -endif -endif -endif - TOAST_OBJECTS = $(SRC)/toast.o \ $(SRC)/toast_lin.o \ $(SRC)/toast_ulaw.o \ diff --git a/codecs/gsm/src/k6opt.s b/codecs/gsm/src/k6opt.s index d84d54cbf3..e69de29bb2 100644 --- a/codecs/gsm/src/k6opt.s +++ b/codecs/gsm/src/k6opt.s @@ -1,739 +0,0 @@ - .file "k6opt.s" - .version "01.01" -/* gcc2_compiled.: */ -.section .rodata - .align 4 - .type coefs,@object - .size coefs,24 -coefs: - .value -134 - .value -374 - .value 0 - .value 2054 - .value 5741 - .value 8192 - .value 5741 - .value 2054 - .value 0 - .value -374 - .value -134 - .value 0 -.text - .align 4 -/* void Weighting_filter (const short *e, short *x) */ -.globl Weighting_filter - .type Weighting_filter,@function -Weighting_filter: - pushl %ebp - movl %esp,%ebp - pushl %edi - pushl %esi - pushl %ebx - movl 12(%ebp),%edi - movl 8(%ebp),%ebx - addl $-10,%ebx - emms - movl $0x1000,%eax; movd %eax,%mm5 /* for rounding */ - movq coefs,%mm1 - movq coefs+8,%mm2 - movq coefs+16,%mm3 - xorl %esi,%esi - .p2align 2 -.L21: - movq (%ebx,%esi,2),%mm0 - pmaddwd %mm1,%mm0 - - movq 8(%ebx,%esi,2),%mm4 - pmaddwd %mm2,%mm4 - paddd %mm4,%mm0 - - movq 16(%ebx,%esi,2),%mm4 - pmaddwd %mm3,%mm4 - paddd %mm4,%mm0 - - movq %mm0,%mm4 - punpckhdq %mm0,%mm4 /* mm4 has high int32 of mm0 dup'd */ - paddd %mm4,%mm0; - - paddd %mm5,%mm0 /* add for roundoff */ - psrad $13,%mm0 - packssdw %mm0,%mm0 - movd %mm0,%eax /* ax has result */ - movw %ax,(%edi,%esi,2) - incl %esi - cmpl $39,%esi - jle .L21 - emms - popl %ebx - popl %esi - popl %edi - leave - ret -.Lfe1: - .size Weighting_filter,.Lfe1-Weighting_filter - -.macro ccstep n -.if \n - movq \n(%edi),%mm1 - movq \n(%esi),%mm2 -.else - movq (%edi),%mm1 - movq (%esi),%mm2 -.endif - pmaddwd %mm2,%mm1 - paddd %mm1,%mm0 -.endm - - .align 4 -/* long k6maxcc(const short *wt, const short *dp, short *Nc_out) */ -.globl k6maxcc - .type k6maxcc,@function -k6maxcc: - pushl %ebp - movl %esp,%ebp - pushl %edi - pushl %esi - pushl %ebx - emms - movl 8(%ebp),%edi - movl 12(%ebp),%esi - movl $0,%edx /* will be maximum inner-product */ - movl $40,%ebx - movl %ebx,%ecx /* will be index of max inner-product */ - subl $80,%esi - .p2align 2 -.L41: - movq (%edi),%mm0 - movq (%esi),%mm2 - pmaddwd %mm2,%mm0 - ccstep 8 - ccstep 16 - ccstep 24 - ccstep 32 - ccstep 40 - ccstep 48 - ccstep 56 - ccstep 64 - ccstep 72 - - movq %mm0,%mm1 - punpckhdq %mm0,%mm1 /* mm1 has high int32 of mm0 dup'd */ - paddd %mm1,%mm0; - movd %mm0,%eax /* eax has result */ - - cmpl %edx,%eax - jle .L40 - movl %eax,%edx - movl %ebx,%ecx - .p2align 2 -.L40: - subl $2,%esi - incl %ebx - cmpl $120,%ebx - jle .L41 - movl 16(%ebp),%eax - movw %cx,(%eax) - movl %edx,%eax - emms - popl %ebx - popl %esi - popl %edi - leave - ret -.Lfe2: - .size k6maxcc,.Lfe2-k6maxcc - - - .align 4 -/* long k6iprod (const short *p, const short *q, int n) */ -.globl k6iprod - .type k6iprod,@function -k6iprod: - pushl %ebp - movl %esp,%ebp - pushl %edi - pushl %esi - emms - pxor %mm0,%mm0 - movl 8(%ebp),%esi - movl 12(%ebp),%edi - movl 16(%ebp),%eax - leal -32(%esi,%eax,2),%edx /* edx = top - 32 */ - - cmpl %edx,%esi; ja .L202 - - .p2align 2 -.L201: - ccstep 0 - ccstep 8 - ccstep 16 - ccstep 24 - - addl $32,%esi - addl $32,%edi - cmpl %edx,%esi; jbe .L201 - - .p2align 2 -.L202: - addl $24,%edx /* now edx = top-8 */ - cmpl %edx,%esi; ja .L205 - - .p2align 2 -.L203: - ccstep 0 - - addl $8,%esi - addl $8,%edi - cmpl %edx,%esi; jbe .L203 - - .p2align 2 -.L205: - addl $4,%edx /* now edx = top-4 */ - cmpl %edx,%esi; ja .L207 - - movd (%edi),%mm1 - movd (%esi),%mm2 - pmaddwd %mm2,%mm1 - paddd %mm1,%mm0 - - addl $4,%esi - addl $4,%edi - - .p2align 2 -.L207: - addl $2,%edx /* now edx = top-2 */ - cmpl %edx,%esi; ja .L209 - - movswl (%edi),%eax - movd %eax,%mm1 - movswl (%esi),%eax - movd %eax,%mm2 - pmaddwd %mm2,%mm1 - paddd %mm1,%mm0 - - .p2align 2 -.L209: - movq %mm0,%mm1 - punpckhdq %mm0,%mm1 /* mm1 has high int32 of mm0 dup'd */ - paddd %mm1,%mm0; - movd %mm0,%eax /* eax has result */ - - emms - popl %esi - popl %edi - leave - ret -.Lfe3: - .size k6iprod,.Lfe3-k6iprod - - - .align 4 -/* void k6vsraw P3((short *p, int n, int bits) */ -.globl k6vsraw - .type k6vsraw,@function -k6vsraw: - pushl %ebp - movl %esp,%ebp - pushl %esi - movl 8(%ebp),%esi - movl 16(%ebp),%ecx - andl %ecx,%ecx; jle .L399 - movl 12(%ebp),%eax - leal -16(%esi,%eax,2),%edx /* edx = top - 16 */ - emms - movd %ecx,%mm3 - movq ones,%mm2 - psllw %mm3,%mm2; psrlw $1,%mm2 - cmpl %edx,%esi; ja .L306 - - .p2align 2 -.L302: /* 8 words per iteration */ - movq (%esi),%mm0 - movq 8(%esi),%mm1 - paddsw %mm2,%mm0 - psraw %mm3,%mm0; - paddsw %mm2,%mm1 - psraw %mm3,%mm1; - movq %mm0,(%esi) - movq %mm1,8(%esi) - addl $16,%esi - cmpl %edx,%esi - jbe .L302 - - .p2align 2 -.L306: - addl $12,%edx /* now edx = top-4 */ - cmpl %edx,%esi; ja .L310 - - .p2align 2 -.L308: /* do up to 6 words, two at a time */ - movd (%esi),%mm0 - paddsw %mm2,%mm0 - psraw %mm3,%mm0; - movd %mm0,(%esi) - addl $4,%esi - cmpl %edx,%esi - jbe .L308 - - .p2align 2 -.L310: - addl $2,%edx /* now edx = top-2 */ - cmpl %edx,%esi; ja .L315 - - movzwl (%esi),%eax - movd %eax,%mm0 - paddsw %mm2,%mm0 - psraw %mm3,%mm0; - movd %mm0,%eax - movw %ax,(%esi) - - .p2align 2 -.L315: - emms -.L399: - popl %esi - leave - ret -.Lfe4: - .size k6vsraw,.Lfe4-k6vsraw - - .align 4 -/* void k6vsllw P3((short *p, int n, int bits) */ -.globl k6vsllw - .type k6vsllw,@function -k6vsllw: - pushl %ebp - movl %esp,%ebp - pushl %esi - movl 8(%ebp),%esi - movl 16(%ebp),%ecx - andl %ecx,%ecx; jle .L499 - movl 12(%ebp),%eax - leal -16(%esi,%eax,2),%edx /* edx = top - 16 */ - emms - movd %ecx,%mm3 - cmpl %edx,%esi; ja .L406 - - .p2align 2 -.L402: /* 8 words per iteration */ - movq (%esi),%mm0 - movq 8(%esi),%mm1 - psllw %mm3,%mm0; - psllw %mm3,%mm1; - movq %mm0,(%esi) - movq %mm1,8(%esi) - addl $16,%esi - cmpl %edx,%esi - jbe .L402 - - .p2align 2 -.L406: - addl $12,%edx /* now edx = top-4 */ - cmpl %edx,%esi; ja .L410 - - .p2align 2 -.L408: /* do up to 6 words, two at a time */ - movd (%esi),%mm0 - psllw %mm3,%mm0; - movd %mm0,(%esi) - addl $4,%esi - cmpl %edx,%esi - jbe .L408 - - .p2align 2 -.L410: - addl $2,%edx /* now edx = top-2 */ - cmpl %edx,%esi; ja .L415 - - movzwl (%esi),%eax - movd %eax,%mm0 - psllw %mm3,%mm0; - movd %mm0,%eax - movw %ax,(%esi) - - .p2align 2 -.L415: - emms -.L499: - popl %esi - leave - ret -.Lfe5: - .size k6vsllw,.Lfe5-k6vsllw - - -.section .rodata - .align 4 - .type extremes,@object - .size extremes,8 -extremes: - .long 0x80008000 - .long 0x7fff7fff - .type ones,@object - .size ones,8 -ones: - .long 0x00010001 - .long 0x00010001 - -.text - .align 4 -/* long k6maxmin (const short *p, int n, short *out) */ -.globl k6maxmin - .type k6maxmin,@function -k6maxmin: - pushl %ebp - movl %esp,%ebp - pushl %esi - emms - movl 8(%ebp),%esi - movl 12(%ebp),%eax - leal -8(%esi,%eax,2),%edx - - cmpl %edx,%esi - jbe .L52 - movd extremes,%mm0 - movd extremes+4,%mm1 - jmp .L58 - - .p2align 2 -.L52: - movq (%esi),%mm0 /* mm0 will be max's */ - movq %mm0,%mm1 /* mm1 will be min's */ - addl $8,%esi - cmpl %edx,%esi - ja .L56 - - .p2align 2 -.L54: - movq (%esi),%mm2 - - movq %mm2,%mm3 - pcmpgtw %mm0,%mm3 /* mm3 is bitmask for words where mm2 > mm0 */ - movq %mm3,%mm4 - pand %mm2,%mm3 /* mm3 is mm2 masked to new max's */ - pandn %mm0,%mm4 /* mm4 is mm0 masked to its max's */ - por %mm3,%mm4 - movq %mm4,%mm0 /* now mm0 is updated max's */ - - movq %mm1,%mm3 - pcmpgtw %mm2,%mm3 /* mm3 is bitmask for words where mm2 < mm1 */ - pand %mm3,%mm2 /* mm2 is mm2 masked to new min's */ - pandn %mm1,%mm3 /* mm3 is mm1 masked to its min's */ - por %mm3,%mm2 - movq %mm2,%mm1 /* now mm1 is updated min's */ - - addl $8,%esi - cmpl %edx,%esi - jbe .L54 - - .p2align 2 -.L56: /* merge down the 4-word max/mins to lower 2 words */ - - movq %mm0,%mm2 - psrlq $32,%mm2 - movq %mm2,%mm3 - pcmpgtw %mm0,%mm3 /* mm3 is bitmask for words where mm2 > mm0 */ - pand %mm3,%mm2 /* mm2 is mm2 masked to new max's */ - pandn %mm0,%mm3 /* mm3 is mm0 masked to its max's */ - por %mm3,%mm2 - movq %mm2,%mm0 /* now mm0 is updated max's */ - - movq %mm1,%mm2 - psrlq $32,%mm2 - movq %mm1,%mm3 - pcmpgtw %mm2,%mm3 /* mm3 is bitmask for words where mm2 < mm1 */ - pand %mm3,%mm2 /* mm2 is mm2 masked to new min's */ - pandn %mm1,%mm3 /* mm3 is mm1 masked to its min's */ - por %mm3,%mm2 - movq %mm2,%mm1 /* now mm1 is updated min's */ - - .p2align 2 -.L58: - addl $4,%edx /* now dx = top-4 */ - cmpl %edx,%esi - ja .L62 - /* here, there are >= 2 words of input remaining */ - movd (%esi),%mm2 - - movq %mm2,%mm3 - pcmpgtw %mm0,%mm3 /* mm3 is bitmask for words where mm2 > mm0 */ - movq %mm3,%mm4 - pand %mm2,%mm3 /* mm3 is mm2 masked to new max's */ - pandn %mm0,%mm4 /* mm4 is mm0 masked to its max's */ - por %mm3,%mm4 - movq %mm4,%mm0 /* now mm0 is updated max's */ - - movq %mm1,%mm3 - pcmpgtw %mm2,%mm3 /* mm3 is bitmask for words where mm2 < mm1 */ - pand %mm3,%mm2 /* mm2 is mm2 masked to new min's */ - pandn %mm1,%mm3 /* mm3 is mm1 masked to its min's */ - por %mm3,%mm2 - movq %mm2,%mm1 /* now mm1 is updated min's */ - - addl $4,%esi - - .p2align 2 -.L62: - /* merge down the 2-word max/mins to 1 word */ - - movq %mm0,%mm2 - psrlq $16,%mm2 - movq %mm2,%mm3 - pcmpgtw %mm0,%mm3 /* mm3 is bitmask for words where mm2 > mm0 */ - pand %mm3,%mm2 /* mm2 is mm2 masked to new max's */ - pandn %mm0,%mm3 /* mm3 is mm0 masked to its max's */ - por %mm3,%mm2 - movd %mm2,%ecx /* cx is max so far */ - - movq %mm1,%mm2 - psrlq $16,%mm2 - movq %mm1,%mm3 - pcmpgtw %mm2,%mm3 /* mm3 is bitmask for words where mm2 < mm1 */ - pand %mm3,%mm2 /* mm2 is mm2 masked to new min's */ - pandn %mm1,%mm3 /* mm3 is mm1 masked to its min's */ - por %mm3,%mm2 - movd %mm2,%eax /* ax is min so far */ - - addl $2,%edx /* now dx = top-2 */ - cmpl %edx,%esi - ja .L65 - - /* here, there is one word of input left */ - cmpw (%esi),%cx - jge .L64 - movw (%esi),%cx - .p2align 2 -.L64: - cmpw (%esi),%ax - jle .L65 - movw (%esi),%ax - - .p2align 2 -.L65: /* (finally!) cx is the max, ax the min */ - movswl %cx,%ecx - movswl %ax,%eax - - movl 16(%ebp),%edx /* ptr to output max,min vals */ - andl %edx,%edx; jz .L77 - movw %cx,(%edx) /* max */ - movw %ax,2(%edx) /* min */ - .p2align 2 -.L77: - /* now calculate max absolute val */ - negl %eax - cmpl %ecx,%eax - jge .L81 - movl %ecx,%eax - .p2align 2 -.L81: - emms - popl %esi - leave - ret -.Lfe6: - .size k6maxmin,.Lfe6-k6maxmin - -/* void Short_term_analysis_filtering (short *u0, const short *rp0, int kn, short *s) */ - .equiv pm_u0,8 - .equiv pm_rp0,12 - .equiv pm_kn,16 - .equiv pm_s,20 - .equiv lv_u_top,-4 - .equiv lv_s_top,-8 - .equiv lv_rp,-40 /* local version of rp0 with each word twice */ - .align 4 -.globl Short_term_analysis_filteringx - .type Short_term_analysis_filteringx,@function -Short_term_analysis_filteringx: - pushl %ebp - movl %esp,%ebp - subl $40,%esp - pushl %edi - pushl %esi - - movl pm_rp0(%ebp),%esi; - leal lv_rp(%ebp),%edi; - cld - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - emms - movl $0x4000,%eax; - movd %eax,%mm4; - punpckldq %mm4,%mm4 /* (0x00004000,0x00004000) for rounding dword product pairs */ - - movl pm_u0(%ebp),%eax - addl $16,%eax - movl %eax,lv_u_top(%ebp) /* UTOP */ - movl pm_s(%ebp),%edx /* edx is local s ptr throughout below */ - movl pm_kn(%ebp),%eax - leal (%edx,%eax,2),%eax - movl %eax,lv_s_top(%ebp) - cmpl %eax,%edx - jae .L179 - .p2align 2 -.L181: - leal lv_rp(%ebp),%esi /* RP */ - movl pm_u0(%ebp),%edi /* U */ - movw (%edx),%ax /* (0,DI) */ - roll $16,%eax - movw (%edx),%ax /* (DI,DI) */ - .p2align 2 -.L185: /* RP is %esi */ - movl %eax,%ecx - movw (%edi),%ax /* (DI,U) */ - movd (%esi),%mm3 /* mm3 is (0,0,RP,RP) */ - movw %cx,(%edi) - - movd %eax,%mm2 /* mm2 is (0,0,DI,U) */ - rorl $16,%eax - movd %eax,%mm1 /* mm1 is (0,0,U,DI) */ - - movq %mm1,%mm0 - pmullw %mm3,%mm0 - pmulhw %mm3,%mm1 - punpcklwd %mm1,%mm0 /* mm0 is (RP*U,RP*DI) */ - paddd %mm4,%mm0 /* mm4 is 0x00004000,0x00004000 */ - psrad $15,%mm0 /* (RP*U,RP*DI) adjusted */ - packssdw %mm0,%mm0 /* (*,*,RP*U,RP*DI) adjusted and saturated to word */ - paddsw %mm2,%mm0 /* mm0 is (?,?, DI', U') */ - movd %mm0,%eax /* (DI,U') */ - - addl $2,%edi - addl $4,%esi - cmpl lv_u_top(%ebp),%edi - jb .L185 - - rorl $16,%eax - movw %ax,(%edx) /* last DI goes to *s */ - addl $2,%edx /* next s */ - cmpl lv_s_top(%ebp),%edx - jb .L181 - .p2align 2 -.L179: - emms - popl %esi - popl %edi - leave - ret -.Lfe7: - .size Short_term_analysis_filteringx,.Lfe7-Short_term_analysis_filteringx - -.end - -/* 'as' macro's seem to be case-insensitive */ -.macro STEP n -.if \n - movd \n(%esi),%mm3 /* mm3 is (0,0,RP,RP) */ -.else - movd (%esi),%mm3 /* mm3 is (0,0,RP,RP) */ -.endif - movq %mm5,%mm1; - movd %mm4,%ecx; movw %cx,%ax /* (DI,U) */ - psllq $48,%mm1; psrlq $16,%mm4; por %mm1,%mm4 - psllq $48,%mm0; psrlq $16,%mm5; por %mm0,%mm5 - - movd %eax,%mm2 /* mm2 is (0,0,DI,U) */ - rorl $16,%eax - movd %eax,%mm1 /* mm1 is (0,0,U,DI) */ - - movq %mm1,%mm0 - pmullw %mm3,%mm0 - pmulhw %mm3,%mm1 - punpcklwd %mm1,%mm0 /* mm0 is (RP*U,RP*DI) */ - paddd %mm6,%mm0 /* mm6 is 0x00004000,0x00004000 */ - psrad $15,%mm0 /* (RP*U,RP*DI) adjusted */ - packssdw %mm0,%mm0 /* (*,*,RP*U,RP*DI) adjusted and saturated to word */ - paddsw %mm2,%mm0 /* mm0 is (?,?, DI', U') */ - movd %mm0,%eax /* (DI,U') */ -.endm - -/* void Short_term_analysis_filtering (short *u0, const short *rp0, int kn, short *s) */ - .equiv pm_u0,8 - .equiv pm_rp0,12 - .equiv pm_kn,16 - .equiv pm_s,20 - .equiv lv_rp_top,-4 - .equiv lv_s_top,-8 - .equiv lv_rp,-40 /* local version of rp0 with each word twice */ - .align 4 -.globl Short_term_analysis_filteringx - .type Short_term_analysis_filteringx,@function -Short_term_analysis_filteringx: - pushl %ebp - movl %esp,%ebp - subl $56,%esp - pushl %edi - pushl %esi - pushl %ebx - - movl pm_rp0(%ebp),%esi; - leal lv_rp(%ebp),%edi; - cld - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - lodsw; stosw; stosw - movl %edi,lv_rp_top(%ebp) - emms - - movl $0x4000,%eax; - movd %eax,%mm6; - punpckldq %mm6,%mm6 /* (0x00004000,0x00004000) for rounding dword product pairs */ - - movl pm_u0(%ebp),%ebx - movq (%ebx),%mm4; movq 8(%ebx),%mm5 /* the 8 u's */ - movl pm_s(%ebp),%edx /* edx is local s ptr throughout below */ - movl pm_kn(%ebp),%eax - leal (%edx,%eax,2),%eax - movl %eax,lv_s_top(%ebp) - cmpl %eax,%edx - jae .L179 - .p2align 2 -.L181: - leal lv_rp(%ebp),%esi /* RP */ - movw (%edx),%ax /* (0,DI) */ - roll $16,%eax - movw (%edx),%ax /* (DI,DI) */ - movd %eax,%mm0 - .p2align 2 -.L185: /* RP is %esi */ - step 0 - step 4 - step 8 - step 12 -/* - step 16 - step 20 - step 24 - step 28 -*/ - addl $16,%esi - cmpl lv_rp_top(%ebp),%esi - jb .L185 - - rorl $16,%eax - movw %ax,(%edx) /* last DI goes to *s */ - addl $2,%edx /* next s */ - cmpl lv_s_top(%ebp),%edx - jb .L181 -.L179: - movq %mm4,(%ebx); movq %mm5,8(%ebx) /* the 8 u's */ - emms - popl %ebx - popl %esi - popl %edi - leave - ret -.Lfe7: - .size Short_term_analysis_filteringx,.Lfe7-Short_term_analysis_filteringx - .ident "GCC: (GNU) 2.95.2 19991109 (Debian GNU/Linux)" diff --git a/codecs/lpc10/Makefile b/codecs/lpc10/Makefile index e7d52a9de0..bdf1a3ad7f 100644 --- a/codecs/lpc10/Makefile +++ b/codecs/lpc10/Makefile @@ -27,37 +27,6 @@ CFLAGS+= -fPIC -Wno-comment # fails miserably. Remove it for the time being. _ASTCFLAGS:=$(_ASTCFLAGS:-Werror=) -# If the compiler's '-march' flag has been specified already, then assume it's a value -# that is what the user wants (or has been determined by the configure script). If not, -# do some simple logic to set a decent value -ifeq ($(findstring -march,$(_ASTCFLAGS) $(ASTCFLAGS)),) - #fix for PPC processors and ALPHA, And UltraSparc too - ifneq ($(OSARCH),Darwin) - ifneq ($(findstring BSD,${OSARCH}),BSD) - ifneq ($(PROC),ppc) - ifneq ($(PROC),x86_64) - ifneq ($(PROC),alpha) - #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only. - #This works for even old (2.96) versions of gcc and provides a small boost either way. - #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it. - #So we go lowest common available by gcc and go a step down, still a step up from - #the default as we now have a better instruction set to work with. - Belgarath - ifeq ($(PROC),ultrasparc) - CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer - else - ifneq ($(OSARCH),SunOS) - ifneq ($(OSARCH),arm) - # CFLAGS+= -march=$(PROC) - endif - endif - endif - endif - endif - endif - endif - endif -endif - LIB = $(LIB_TARGET_DIR)/liblpc10.a .PHONY: all clean diff --git a/configs/chan_dahdi.conf.sample b/configs/chan_dahdi.conf.sample index 841787c4c5..c633b4510c 100644 --- a/configs/chan_dahdi.conf.sample +++ b/configs/chan_dahdi.conf.sample @@ -259,6 +259,18 @@ ; The default is no. ;hold_disconnect_transfer=yes +; BRI PTMP layer 1 presence. +; You should normally not need to set this option. +; You may need to set this option if your telco brings layer 1 down when +; the line is idle. +; required: Layer 1 presence required for outgoing calls. (default) +; ignore: Ignore alarms from DAHDI about this span. +; (Layer 1 and 2 will be brought back up for an outgoing call.) +; NOTE: You will not be able to detect physical line problems +; until an outgoing call is attempted and fails. +; +;layer1_presence=ignore + ; BRI PTMP layer 2 persistence. ; You should normally not need to set this option. ; You may need to set this option if your telco brings layer 1 down when diff --git a/configs/queues.conf.sample b/configs/queues.conf.sample index 4142faaf72..c2577ead57 100644 --- a/configs/queues.conf.sample +++ b/configs/queues.conf.sample @@ -68,7 +68,7 @@ monitor-type = MixMonitor ; app_queue allows calls to members in a "Unknown" state to be treated as available ; setting check_state_unknown = yes will cause app_queue to query the channel driver ; to better determine the state this only applies to queues with ringinuse or ignorebusy -; set appropriately. +; set appropriately. ; ;check_state_unknown = no ; @@ -248,12 +248,18 @@ monitor-type = MixMonitor ; QUEUESRVLEVELPERF current service level performance ; ;setqueuevar=no -; + ; if set, run this macro when connected to the queue member ; you can override this macro by setting the macro option on ; the queue application ; -; membermacro=somemacro +;membermacro=macro_name[,arg1[,...][,argN]] + +; if set, run this gosub when connected to the queue member +; you can override this gosub by setting the gosub option on +; the queue application +; +;membergosub=gosub_context_name[,arg1[,...][,argN]] ; How often to announce queue position and/or estimated ; holdtime to caller (0=off) @@ -481,11 +487,10 @@ monitor-type = MixMonitor ; ; If you want the queue to avoid sending calls to members whose devices are ; known to be 'in use' (via the channel driver supporting that device state) -; uncomment this option. (Note: only the SIP channel driver currently is able -; to report 'in use'.) -; -; A member can have the ignorebusy flag set or unset when ringinuse is set to -; allow a per member control. +; uncomment this option. This can be controlled on a per member basis by +; setting 'ignorebusy' in the QUEUE_MEMBER function. (Note: only the SIP +; channel driver currently is able to report 'in use'.) (Note: if this option +; is set to 'no' it will override the per-member 'ignorebusy' setting. ; ; ringinuse = no ; diff --git a/configs/rpt.conf.sample b/configs/rpt.conf.sample deleted file mode 100644 index f1c86a11b2..0000000000 --- a/configs/rpt.conf.sample +++ /dev/null @@ -1,193 +0,0 @@ -; Radio Repeater / Remote Base configuration file (for use with app_rpt) -; As of app_rpt version 0.39, 12/20/2005 -; - -;[000] ; Node ID of first repeater - -;rxchannel = DAHDI/1 ; Rx audio/signalling channel -; Note: if you use a unified interface (tx/rx on one channel), only -; specify the rxchannel and the txchannel will be assumed from the rxchannel -;txchannel = DAHDI/2 ; Tx audio/signalling channel -;duplex = 2 ; (Optional) set duplex operating mode -;; 0 = half duplex (telemetry and courtesy tones do not transmit) -;; 1 = semi-half duplex (telemetry and courtesy tones transmit, but not -;; repeated audio -;; 2 = normal full-duplex mode (Default) -;; 3 = full-duplex mode, without repeated audio from main input source -;functions = functions-repeater ; DTMF function list -;; specify this for a different function list then local when on link -;;link_functions = functions-different ; DTMF function list for link -;;phone_functions = functions-phone ; (optional) different functions for 'P' mode -;;dphone_functions = functions-dphone ; (optional) different functions for 'D' mode -;;nodes = nodes-different ; (optional) different node list -;tonezone = us ; use US tones (default) -;context = default ; dialing context for phone -;callerid = "WB6NIL Repeater" <(213) 555-0123> ; Callerid for phone calls -;idrecording = wb6nil ; id recording -;accountcode=RADIO ; account code (optional) -;funcchar = * ; function lead-in character (defaults to '*') -;endchar = # ; command mode end character (defaults to '#') -;;nobusyout=yes ; (optional) Do not busy-out reverse-patch when - ; normal patch in use -;hangtime=1000 ; squelch tail hang time (in ms) (optional) -;totime=100000 ; transmit time-out time (in ms) (optional) -;idtime=30000 ; id interval time (in ms) (optional) -;politeid=30000 ; time in milliseconds before ID timer - ; expires to try and ID in the tail. - ; (optional, default is 30000). -;idtalkover=|iwb6nil/rpt ; Talkover ID (optional) default is none -;unlinkedct=ct2 ; unlinked courtesy tone (optional) default is none - -;; The tailmessagetime,tailsquashedtime, and tailmessages need to be set -;; to support tail messages. They can be omitted otherwise. -;tailmessagetime=300000 ; Play a tail message every 5 mins -;tailsquashedtime=30000 ; If squashed by another user, -;; try again after 30 seconds -;tailmessages=msg1,msg2,msg3 ;list of messages to be played for tail message - -; The default values for hangtime, time-out time, and id interval time are -; 5 seconds (5000 ms), 3 minutes (180000 ms), and 5 minutes (300000 ms) -; respectively - -;[001] ; Node ID of first repeater - -;rxchannel = DAHDI/3 ; Rx audio/signalling channel -; Note: if you use a unified interface (tx/rx on one channel), only -; specify the rxchannel and the txchannel will be assumed from the rxchannel -;txchannel = DAHDI/4 ; Tx audio/signalling channel -;functions = functions-repeater ; DTMF function list -;; specify this for a different function list then local when on link -;;link_functions = functions-different ; DTMF function list for link -;;phone_functions = functions-phone ; (optional) different functions for 'P' mode -;;dphone_functions = functions-dphone ; (optional) different functions for 'D' mode -;;nodes = nodes-different ; (optional) different node list -;tonezone = us ; use US tones (default) -;context = default ; dialing context for phone -;callerid = "WB6NIL Repeater" <(213) 555-0123> ; Callerid for phone calls -;idrecording = wb6nil ; id recording -;accountcode=RADIO ; account code (optional) -;funcchar = * ; function lead-in character (defaults to '*') -;endchar = # ; command mode end character (defaults to '#') -;;nobusyout=yes ; (optional) Do not busy-out reverse-patch when - ; normal patch in use -;hangtime=1000 ; squelch tail hang time (in ms) (optional) -;totime=100000 ; transmit time-out time (in ms) (optional) -;idtime=30000 ; id interval time (in ms) (optional) -;politeid=30000 ; time in milliseconds before ID timer - ; expires to try and ID in the tail. - ; (optional, default is 30000). -;idtalkover=|iwb6nil/rpt ; Talkover ID (optional) default is none -;unlinkedct=ct2 ; unlinked courtesy tone (optional) default is none - -;[002] ; Node ID of remote base - -;rxchannel = DAHDI/5 ; Rx audio/signalling channel -; Note: if you use a unified interface (tx/rx on one channel), only -; specify the rxchannel and the txchannel will be assumed from the rxchannel -;txchannel = DAHDI/6 ; Tx audio/signalling channel -;functions = functions-remote -;remote = ft897 ; Set remote=y for dumb remote or - ; remote=ft897 for Yaesu FT-897 or - ; remote=rbi for Doug Hall RBI1 -;iobase = 0x378 ; Specify IO port for parallel port (optional) - -;[functions-repeater] -;1=ilink,1 ; Specific link disconnect -;2=ilink,2 ; Specific Link connect - monitor only -;3=ilink,3 ; Specific Link connect - transceive -;4=ilink,4 ; Enter command mode on a specific link -;7=ilink,5 ; Link status -;;XX=ilink,6 ; Disconnect all links (not used here) - -;80=status,1 ; System info -;81=status,2 ; Time -;82=status,3 ; app_rpt.c Version - -;6=autopatchup ; Autopatch up -;0=autopatchdn ; Autopatch down - -;90=cop,1 ; System warm boot -;91=cop,2 ; System enable -;92=cop,3 ; System disable - -;[functions-remote] - -;0=remote,1 ; Retrieve Memory -;1=remote,2 ; Set freq. -;2=remote,3 ; Set Rx PL tone. -;40=remote,100 ; Rx PL off -;41=remote,101 ; Rx PL on -;42=remote,102 ; Tx PL off -;43=remote,103 ; Tx PL on -;44=remote,104 ; Low Pwr -;45=remote,105 ; Med Pwr -;46=remote,106 ; Hi Pwr -;5=remote,5 ; Status - -;[telemetry] - -; Telemetry entries are shared across all repeaters -; Can be a tone sequence, morse string, or a file -; -; |t - Tone escape sequence -; -; Tone sequences consist of 1 or more 4-tuple entries (freq1, freq2, duration, amplitude) -; Single frequencies are created by setting freq1 or freq2 to zero. -; -; |m - Morse escape sequence -; -; Sends Morse code at the telemetry amplitude and telemetry frequency as defined in the -; [morse] section. -; -; Follow with an alphanumeric string -; -; |i - Morse ID escape sequence -; -; Sends Morse code at the ID amplitude and ID frequency as defined in the -; [morse] section. -; -; Follow with an alphanumeric string - - -;ct1=|t(350,0,100,2048)(500,0,100,2048)(660,0,100,2048) -;ct2=|t(660,880,150,2048) -;ct3=|t(440,0,150,2048) -;ct4=|t(550,0,150,2048) -;ct5=|t(660,0,150,2048) -;ct6=|t(880,0,150,2048) -;ct7=|t(660,440,150,2048) -;ct8=|t(700,1100,150,2048) -;remotetx=|t(2000,0,75,2048)(0,0,75,0)(1600,0,75,2048); -;remotemon=|t(1600,0,75,2048) -;cmdmode=|t(900,903,200,2048) -;functcomplete=|t(1000,0,100,2048)(0,0,100,0)(1000,0,100,2048) - - -;[morse] - -;speed=20 ; Approximate speed in WPM -;frequency=800 ; Morse Telemetry Frequency -;amplitude=4096 ; Morse Telemetry Amplitude -;idfrequency=330 ; Morse ID Frequency -;idamplitude=2048 ; Morse ID Amplitude - -;[nodes] - -;000 = context_A@foo.bar.com/1234,foo.bar.com -;001 = context_B@baz.waldo.com/4321,baz.waldo.com -;002 = context_C@pepper.salt.com/5678,pepper.salt.com,y ; this is a remote - -;of course, you can also specify these with domain names, but why rely -;on DNS working unnecessarily? - -;[memory] - -;; this example gives you 146.460, simplex, 100.0 HZ PL, hi-power, transmit PL -;00 = 146.460,100.0,sht -;; this example gives you 146.940, minus offset, 100.0 HZ PL, low-power, no PL -;01 = 146.940,100.0,-l - -; The format for these entries is: Receive-Freq,Receive-PL,Attrbutes -; Attributes: l=low power, m=medium power, h=high power, -=minus offset, -; s=simplex, +=plus offset, t=tx PL enable, r=rx PL enable - diff --git a/configs/usbradio.conf.sample b/configs/usbradio.conf.sample deleted file mode 100644 index 6af373e6d1..0000000000 --- a/configs/usbradio.conf.sample +++ /dev/null @@ -1,61 +0,0 @@ -[general] - -; General config options, with default values shown. -; You should use one section per device, with [general] being used -; for the device. - -; debug = 0x0 ; misc debug flags, default is 0 - -; Set the device to use for I/O -; devicenum = 0 -; Set hardware type here -; hdwtype=0 ; 0=limey, 1=sph - -; rxboost=0 ; no rx gain boost -; rxctcssrelax=1 ; reduce talkoff from radios w/o CTCSS Tx HPF -; rxctcssfreq=100.0 ; rx ctcss freq in floating point. must be in table -; txctcssfreq=100.0 ; tx ctcss freq, any frequency permitted - -; carrierfrom=dsp ;no,usb,usbinvert,dsp,vox -; ctcssfrom=dsp ;no,usb,dsp - -; rxdemod=flat ; input type from radio: no,speaker,flat -; txprelim=yes ; output is pre-emphasised and limited -; txtoctype=no ; no,phase,notone - -; txmixa=composite ;no,voice,tone,composite,auxvoice -; txmixb=no ;no,voice,tone,composite,auxvoice - -; invertptt=0 - -;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- -; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of an - ; USBRADIO channel. Defaults to "no". An enabled jitterbuffer will - ; be used only if the sending side can create and the receiving - ; side can not accept jitter. The USBRADIO channel can't accept jitter, - ; thus an enabled jitterbuffer on the receive USBRADIO side will always - ; be used if the sending side can create jitter. - -; jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds. - -; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is - ; resynchronized. Useful to improve the quality of the voice, with - ; big jumps in/broken timestamps, usualy sent from exotic devices - ; and programs. Defaults to 1000. - -; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of an USBRADIO - ; channel. Two implementations are currenlty available - "fixed" - ; (with size always equals to jbmax-size) and "adaptive" (with - ; variable size, actually the new jb of IAX2). Defaults to fixed. - -; jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set. - ; The option represents the number of milliseconds by which the new - ; jitter buffer will pad its size. the default is 40, so without - ; modification, the new jitter buffer will set its size to the jitter - ; value plus 40 milliseconds. increasing this value may help if your - ; network normally has low jitter, but occasionally has spikes. - -; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". -;----------------------------------------------------------------------------------- - - diff --git a/configure b/configure index 84661eff40..14df6bf5d3 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 360489 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for asterisk trunk. +# Generated by GNU Autoconf 2.68 for asterisk trunk. # # Report bugs to . # @@ -94,6 +94,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -219,11 +220,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -322,7 +330,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -362,19 +370,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -536,7 +544,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -648,7 +656,7 @@ PBX_DLADDR PBX_IP_MTU_DISCOVER PBX_GLOB_BRACE PBX_GLOB_NOMAGIC -AST_MARCH_NATIVE +AST_NATIVE_ARCH AST_SHADOW_WARNINGS AST_NO_STRICT_OVERFLOW AST_FORTIFY_SOURCE @@ -1311,8 +1319,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1357,7 +1366,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1383,7 +1392,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1587,7 +1596,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1603,7 +1612,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1633,8 +1642,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1642,7 +1651,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1652,7 +1661,7 @@ Try \`$0 --help' for more information." $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1660,13 +1669,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1689,7 +1698,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1703,8 +1712,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1719,9 +1728,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1760,11 +1769,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1804,7 +1813,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -2027,9 +2036,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF asterisk configure trunk -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -2075,7 +2084,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2101,7 +2110,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2112,7 +2121,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2125,10 +2134,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2164,7 +2173,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2187,17 +2196,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ------------------------------------------ ## +( $as_echo "## ------------------------------------------ ## ## Report this to https://issues.asterisk.org ## -## ------------------------------------------ ## -_ASBOX +## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2206,7 +2213,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2247,7 +2254,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2261,7 +2268,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2279,7 +2286,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2316,7 +2323,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -2342,7 +2349,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -2353,7 +2360,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -2399,7 +2406,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2412,7 +2419,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2467,7 +2474,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2480,7 +2487,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2521,7 +2528,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2534,7 +2541,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2578,7 +2585,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2755,7 +2762,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2768,10 +2775,10 @@ rm -f conftest.val ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2807,7 +2814,7 @@ if ac_fn_cxx_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2830,17 +2837,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ------------------------------------------ ## +( $as_echo "## ------------------------------------------ ## ## Report this to https://issues.asterisk.org ## -## ------------------------------------------ ## -_ASBOX +## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2849,7 +2854,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel @@ -2894,7 +2899,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -2908,7 +2913,7 @@ ac_fn_cxx_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2926,7 +2931,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile cat >config.log <<_ACEOF @@ -2934,7 +2939,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by asterisk $as_me trunk, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3044,11 +3049,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -3082,11 +3085,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -3099,11 +3100,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -3117,11 +3116,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -3176,7 +3173,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3191,7 +3193,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3271,7 +3277,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3288,16 +3294,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # cross-compile macros ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3311,27 +3323,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3349,14 +3361,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3364,7 +3376,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3386,16 +3398,22 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_aux_dir= for ac_dir in `pwd` "$srcdir"/`pwd`; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3441,7 +3459,7 @@ if test -n "$ac_tool_prefix"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3485,7 +3503,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3537,8 +3555,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3652,9 +3670,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3696,8 +3713,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3754,9 +3771,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3767,7 +3784,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3807,8 +3824,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3818,7 +3835,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3855,7 +3872,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3933,7 +3950,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -4042,7 +4059,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4072,7 +4089,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4088,11 +4105,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4131,7 +4148,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4147,18 +4164,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4170,7 +4187,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4219,7 +4236,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4233,7 +4250,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4285,7 +4302,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4300,7 +4317,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4417,8 +4434,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4430,7 +4446,7 @@ done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -4452,7 +4468,7 @@ $as_echo "#define _MINIX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4646,7 +4662,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}uname; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_UNAME+set}" = set; then : +if ${ac_cv_path_UNAME+:} false; then : $as_echo_n "(cached) " >&6 else case $UNAME in @@ -4689,7 +4705,7 @@ if test -z "$ac_cv_path_UNAME"; then set dummy uname; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_UNAME+set}" = set; then : +if ${ac_cv_path_ac_pt_UNAME+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_UNAME in @@ -4756,7 +4772,7 @@ then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4796,7 +4812,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4848,7 +4864,7 @@ fi set dummy ${ac_tool_prefix}g++; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -4888,7 +4904,7 @@ if test -z "$ac_cv_prog_CXX"; then set dummy g++; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -4940,7 +4956,7 @@ fi set dummy ${ac_tool_prefix}ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LD+set}" = set; then : +if ${ac_cv_prog_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LD"; then @@ -4980,7 +4996,7 @@ if test -z "$ac_cv_prog_LD"; then set dummy ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LD+set}" = set; then : +if ${ac_cv_prog_ac_ct_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LD"; then @@ -5032,7 +5048,7 @@ fi set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5072,7 +5088,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5138,7 +5154,7 @@ if test -z "$CXX"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -5182,7 +5198,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -5260,7 +5276,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5297,7 +5313,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -5391,7 +5407,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5421,7 +5437,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5437,11 +5453,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5480,7 +5496,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5496,18 +5512,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5524,7 +5540,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -5554,7 +5570,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5570,11 +5586,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5613,7 +5629,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5629,18 +5645,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5653,7 +5669,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # the developers regenerating the configure script don't have to install libtool. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5708,7 +5724,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -5722,7 +5738,7 @@ $as_echo "$ac_cv_path_SED" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_prog_egrep+set}" = set; then : +if ${ac_cv_prog_egrep+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 @@ -5782,7 +5798,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5819,10 +5835,10 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5846,7 +5862,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -5899,7 +5915,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5991,7 +6007,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6031,7 +6047,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6080,7 +6096,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 $as_echo_n "checking for GNU make... " >&6; } -if test "${ac_cv_GNU_MAKE+set}" = set; then : +if ${ac_cv_GNU_MAKE+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_GNU_MAKE='Not Found' ; @@ -6100,7 +6116,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_GNU_MAKE" >&5 $as_echo "$ac_cv_GNU_MAKE" >&6; } ; if test "x$ac_cv_GNU_MAKE" = "xNot Found" ; then - as_fn_error "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5 + as_fn_error $? "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5 exit 1 fi GNU_MAKE=$ac_cv_GNU_MAKE @@ -6108,7 +6124,7 @@ GNU_MAKE=$ac_cv_GNU_MAKE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -6160,7 +6176,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -6181,7 +6197,7 @@ if test -n "$ac_tool_prefix"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6225,7 +6241,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6281,7 +6297,7 @@ if test -n "$ac_tool_prefix"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6325,7 +6341,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6381,7 +6397,7 @@ if test -n "$ac_tool_prefix"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_SHA1SUM+set}" = set; then : +if ${ac_cv_prog_SHA1SUM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$SHA1SUM"; then @@ -6425,7 +6441,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_SHA1SUM+set}" = set; then : +if ${ac_cv_prog_ac_ct_SHA1SUM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_SHA1SUM"; then @@ -6481,7 +6497,7 @@ if test -n "$ac_tool_prefix"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OPENSSL+set}" = set; then : +if ${ac_cv_prog_OPENSSL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OPENSSL"; then @@ -6525,7 +6541,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OPENSSL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OPENSSL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OPENSSL"; then @@ -6585,7 +6601,7 @@ fi set dummy bison; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BISON+set}" = set; then : +if ${ac_cv_path_BISON+:} false; then : $as_echo_n "(cached) " >&6 else case $BISON in @@ -6626,7 +6642,7 @@ fi set dummy cmp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CMP+set}" = set; then : +if ${ac_cv_path_CMP+:} false; then : $as_echo_n "(cached) " >&6 else case $CMP in @@ -6667,7 +6683,7 @@ fi set dummy flex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FLEX+set}" = set; then : +if ${ac_cv_path_FLEX+:} false; then : $as_echo_n "(cached) " >&6 else case $FLEX in @@ -6708,7 +6724,7 @@ fi set dummy grep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else case $GREP in @@ -6749,7 +6765,7 @@ fi set dummy find; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FIND+set}" = set; then : +if ${ac_cv_path_FIND+:} false; then : $as_echo_n "(cached) " >&6 else case $FIND in @@ -6790,7 +6806,7 @@ fi set dummy compress; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_COMPRESS+set}" = set; then : +if ${ac_cv_path_COMPRESS+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPRESS in @@ -6831,7 +6847,7 @@ fi set dummy basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BASENAME+set}" = set; then : +if ${ac_cv_path_BASENAME+:} false; then : $as_echo_n "(cached) " >&6 else case $BASENAME in @@ -6872,7 +6888,7 @@ fi set dummy dirname; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DIRNAME+set}" = set; then : +if ${ac_cv_path_DIRNAME+:} false; then : $as_echo_n "(cached) " >&6 else case $DIRNAME in @@ -6913,7 +6929,7 @@ fi set dummy sh; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SHELL+set}" = set; then : +if ${ac_cv_path_SHELL+:} false; then : $as_echo_n "(cached) " >&6 else case $SHELL in @@ -6954,7 +6970,7 @@ fi set dummy ln; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LN+set}" = set; then : +if ${ac_cv_path_LN+:} false; then : $as_echo_n "(cached) " >&6 else case $LN in @@ -6995,7 +7011,7 @@ fi set dummy dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DOT+set}" = set; then : +if ${ac_cv_path_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $DOT in @@ -7036,7 +7052,7 @@ fi set dummy wget; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_WGET+set}" = set; then : +if ${ac_cv_path_WGET+:} false; then : $as_echo_n "(cached) " >&6 else case $WGET in @@ -7077,7 +7093,7 @@ fi set dummy curl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CURL+set}" = set; then : +if ${ac_cv_path_CURL+:} false; then : $as_echo_n "(cached) " >&6 else case $CURL in @@ -7118,7 +7134,7 @@ fi set dummy rubber; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RUBBER+set}" = set; then : +if ${ac_cv_path_RUBBER+:} false; then : $as_echo_n "(cached) " >&6 else case $RUBBER in @@ -7159,7 +7175,7 @@ fi set dummy catdvi; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CATDVI+set}" = set; then : +if ${ac_cv_path_CATDVI+:} false; then : $as_echo_n "(cached) " >&6 else case $CATDVI in @@ -7200,7 +7216,7 @@ fi set dummy kpsewhich; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_KPATHSEA+set}" = set; then : +if ${ac_cv_path_KPATHSEA+:} false; then : $as_echo_n "(cached) " >&6 else case $KPATHSEA in @@ -7241,7 +7257,7 @@ fi set dummy xmllint; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XMLLINT+set}" = set; then : +if ${ac_cv_path_XMLLINT+:} false; then : $as_echo_n "(cached) " >&6 else case $XMLLINT in @@ -7282,7 +7298,7 @@ fi set dummy xmlstarlet; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XMLSTARLET+set}" = set; then : +if ${ac_cv_path_XMLSTARLET+:} false; then : $as_echo_n "(cached) " >&6 else case $XMLSTARLET in @@ -7328,7 +7344,7 @@ else set dummy fetch; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FETCH+set}" = set; then : +if ${ac_cv_path_FETCH+:} false; then : $as_echo_n "(cached) " >&6 else case $FETCH in @@ -7372,7 +7388,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison that supports parse-param" >&5 $as_echo_n "checking for bison that supports parse-param... " >&6; } -if test "${ac_cv_path_BISON2+set}" = set; then : +if ${ac_cv_path_BISON2+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7426,7 +7442,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}soxmix; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_SOXMIX+set}" = set; then : +if ${ac_cv_prog_SOXMIX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$SOXMIX"; then @@ -7466,7 +7482,7 @@ if test -z "$ac_cv_prog_SOXMIX"; then set dummy soxmix; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_SOXMIX+set}" = set; then : +if ${ac_cv_prog_ac_ct_SOXMIX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_SOXMIX"; then @@ -7525,7 +7541,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MD5+set}" = set; then : +if ${ac_cv_prog_MD5+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MD5"; then @@ -7691,7 +7707,7 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; } set dummy pthread-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_acx_pthread_config+set}" = set; then : +if ${ac_cv_prog_acx_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$acx_pthread_config"; then @@ -7847,7 +7863,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then : +if ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then @@ -7929,7 +7945,7 @@ if test "${enable_dev_mode+set}" = set; then : AST_DEVMODE=yes NOISY_BUILD=yes ;; - *) as_fn_error "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;; + *) as_fn_error $? "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;; esac fi @@ -7942,7 +7958,7 @@ if test "${enable_coverage+set}" = set; then : enableval=$enable_coverage; case "${enableval}" in y|ye|yes) AST_CODE_COVERAGE=yes ;; n|no) AST_CODE_COVERAGE=no ;; - *) as_fn_error "bad value ${enableval} for --enable-coverage" "$LINENO" 5 ;; + *) as_fn_error $? "bad value ${enableval} for --enable-coverage" "$LINENO" 5 ;; esac fi @@ -8767,7 +8783,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -8815,7 +8831,7 @@ done set dummy curl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__libcurl_config+set}" = set; then : +if ${ac_cv_path__libcurl_config+:} false; then : $as_echo_n "(cached) " >&6 else case $_libcurl_config in @@ -8857,7 +8873,7 @@ fi set dummy curl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__libcurl_config+set}" = set; then : +if ${ac_cv_path__libcurl_config+:} false; then : $as_echo_n "(cached) " >&6 else case $_libcurl_config in @@ -8898,7 +8914,7 @@ fi if test x$_libcurl_config != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of libcurl" >&5 $as_echo_n "checking for the version of libcurl... " >&6; } -if test "${libcurl_cv_lib_curl_version+set}" = set; then : +if ${libcurl_cv_lib_curl_version+:} false; then : $as_echo_n "(cached) " >&6 else libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $2}'` @@ -8912,7 +8928,7 @@ $as_echo "$libcurl_cv_lib_curl_version" >&6; } if test $_libcurl_wanted -gt 0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= version 7.10.1" >&5 $as_echo_n "checking for libcurl >= version 7.10.1... " >&6; } -if test "${libcurl_cv_lib_version_ok+set}" = set; then : +if ${libcurl_cv_lib_version_ok+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8966,7 +8982,7 @@ $as_echo "$libcurl_cv_lib_version_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libcurl is usable" >&5 $as_echo_n "checking whether libcurl is usable... " >&6; } -if test "${libcurl_cv_lib_curl_usable+set}" = set; then : +if ${libcurl_cv_lib_curl_usable+:} false; then : $as_echo_n "(cached) " >&6 else @@ -9025,7 +9041,7 @@ $as_echo "$libcurl_cv_lib_curl_usable" >&6; } LIBS="$LIBS $CURL_LIB" ac_fn_c_check_func "$LINENO" "curl_free" "ac_cv_func_curl_free" -if test "x$ac_cv_func_curl_free" = x""yes; then : +if test "x$ac_cv_func_curl_free" = xyes; then : else @@ -10817,11 +10833,22 @@ fi # check for basic system features and functionality before # checking for package libraries +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10854,7 +10881,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10873,7 +10900,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -10917,7 +10944,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10944,8 +10971,7 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -10959,7 +10985,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11012,7 +11038,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11039,8 +11065,7 @@ fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF @@ -11053,7 +11078,7 @@ done if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -11087,11 +11112,11 @@ for ac_lib in '' dir; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -11110,7 +11135,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -11144,11 +11169,11 @@ for ac_lib in '' x; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -11168,7 +11193,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11280,7 +11305,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11323,8 +11348,7 @@ for ac_header in arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h mall do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -11355,7 +11379,7 @@ if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_termcap_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltermcap" >&5 $as_echo_n "checking for ${pbxfuncname} in -ltermcap... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11390,8 +11414,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_TERMCAP_FOUND=yes else AST_TERMCAP_FOUND=no @@ -11414,7 +11437,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${TERMCAP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default" -if test "x$ac_cv_header_" = x""yes; then : +if test "x$ac_cv_header_" = xyes; then : TERMCAP_HEADER_FOUND=1 else TERMCAP_HEADER_FOUND=0 @@ -11460,7 +11483,7 @@ if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_tinfo_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltinfo" >&5 $as_echo_n "checking for ${pbxfuncname} in -ltinfo... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11495,8 +11518,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_TINFO_FOUND=yes else AST_TINFO_FOUND=no @@ -11519,7 +11541,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${TINFO_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default" -if test "x$ac_cv_header_" = x""yes; then : +if test "x$ac_cv_header_" = xyes; then : TINFO_HEADER_FOUND=1 else TINFO_HEADER_FOUND=0 @@ -11565,7 +11587,7 @@ if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_curses_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcurses" >&5 $as_echo_n "checking for ${pbxfuncname} in -lcurses... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11600,8 +11622,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_CURSES_FOUND=yes else AST_CURSES_FOUND=no @@ -11624,7 +11645,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = x""yes; then : +if test "x$ac_cv_header_curses_h" = xyes; then : CURSES_HEADER_FOUND=1 else CURSES_HEADER_FOUND=0 @@ -11670,7 +11691,7 @@ if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ncurses_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lncurses" >&5 $as_echo_n "checking for ${pbxfuncname} in -lncurses... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11705,8 +11726,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_NCURSES_FOUND=yes else AST_NCURSES_FOUND=no @@ -11729,7 +11749,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${NCURSES_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = x""yes; then : +if test "x$ac_cv_header_curses_h" = xyes; then : NCURSES_HEADER_FOUND=1 else NCURSES_HEADER_FOUND=0 @@ -11766,7 +11786,7 @@ elif test "x$CURSES_LIB" != "x" ; then elif test "x$NCURSES_LIB" != "x" ; then EDITLINE_LIB="$NCURSES_LIB" else - as_fn_error "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5 + as_fn_error $? "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5 fi @@ -11776,7 +11796,7 @@ if test "${enable_xmldoc+set}" = set; then : enableval=$enable_xmldoc; case "${enableval}" in y|ye|yes) disable_xmldoc=no ;; n|no) disable_xmldoc=yes ;; - *) as_fn_error "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5 ;; + *) as_fn_error $? "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5 ;; esac else disable_xmldoc=no @@ -11792,7 +11812,7 @@ if test "${disable_xmldoc}" != "yes"; then set dummy ${ac_tool_prefix}xml2-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_LIBXML2+set}" = set; then : +if ${ac_cv_path_CONFIG_LIBXML2+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_LIBXML2 in @@ -11836,7 +11856,7 @@ if test -z "$ac_cv_path_CONFIG_LIBXML2"; then set dummy xml2-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_LIBXML2+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_LIBXML2+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_LIBXML2 in @@ -11951,7 +11971,7 @@ fi for ac_header in xlocale.h do : ac_fn_c_check_header_mongrel "$LINENO" "xlocale.h" "ac_cv_header_xlocale_h" "$ac_includes_default" -if test "x$ac_cv_header_xlocale_h" = x""yes; then : +if test "x$ac_cv_header_xlocale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XLOCALE_H 1 _ACEOF @@ -11965,8 +11985,7 @@ for ac_header in winsock.h winsock2.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -11977,7 +11996,7 @@ done ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_poll_h" = x""yes; then : +if test "x$ac_cv_header_sys_poll_h" = xyes; then : else @@ -11996,7 +12015,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -12047,7 +12066,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -12116,7 +12135,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -12189,7 +12208,7 @@ fi # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then : +if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12221,7 +12240,7 @@ else char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; + /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; @@ -12232,25 +12251,6 @@ else _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -# if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a runtime - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); -# endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html @@ -12262,6 +12262,7 @@ int main () { + bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ @@ -12282,7 +12283,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = x""yes; then : +if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 @@ -12299,7 +12300,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12379,7 +12380,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : +if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12409,7 +12410,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -12452,7 +12453,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5 $as_echo_n "checking for long double with more range or precision than double... " >&6; } -if test "${ac_cv_type_long_double_wider+set}" = set; then : +if ${ac_cv_type_long_double_wider+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12501,7 +12502,7 @@ $as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : +if test "x$ac_cv_type_mode_t" = xyes; then : else @@ -12512,7 +12513,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -12523,7 +12524,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -12534,7 +12535,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -12545,7 +12546,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -12557,7 +12558,7 @@ fi ac_fn_c_check_member "$LINENO" "struct ucred" "uid" "ac_cv_member_struct_ucred_uid" "#include #include " -if test "x$ac_cv_member_struct_ucred_uid" = x""yes; then : +if test "x$ac_cv_member_struct_ucred_uid" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_UCRED_UID 1 @@ -12568,7 +12569,7 @@ fi ac_fn_c_check_member "$LINENO" "struct ucred" "cr_uid" "ac_cv_member_struct_ucred_cr_uid" "#include #include " -if test "x$ac_cv_member_struct_ucred_cr_uid" = x""yes; then : +if test "x$ac_cv_member_struct_ucred_cr_uid" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_UCRED_CR_UID 1 @@ -12579,7 +12580,7 @@ fi ac_fn_c_check_member "$LINENO" "struct sockpeercred" "uid" "ac_cv_member_struct_sockpeercred_uid" "#include #include " -if test "x$ac_cv_member_struct_sockpeercred_uid" = x""yes; then : +if test "x$ac_cv_member_struct_sockpeercred_uid" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKPEERCRED_UID 1 @@ -12590,7 +12591,7 @@ fi ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_ifru.ifru_hwaddr" "ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" "#include " -if test "x$ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_ifru_ifru_hwaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR 1 @@ -12601,7 +12602,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12636,7 +12637,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12671,7 +12672,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then : +if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12704,7 +12705,7 @@ $as_echo "#define volatile /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTRDIFF_T 1 @@ -12718,7 +12719,7 @@ fi for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = x""yes; then : +if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF @@ -12729,7 +12730,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 $as_echo_n "checking for working chown... " >&6; } -if test "${ac_cv_func_chown_works+set}" = set; then : +if ${ac_cv_func_chown_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12782,7 +12783,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then : +if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12824,7 +12825,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } -if test "${ac_cv_lib_error_at_line+set}" = set; then : +if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12860,7 +12861,7 @@ fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : +if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF @@ -12873,8 +12874,7 @@ for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -12885,7 +12885,7 @@ done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then : +if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12938,7 +12938,7 @@ ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then : +if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13075,7 +13075,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -13144,7 +13144,7 @@ fi if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -13189,7 +13189,7 @@ fi # AC_FUNC_REALLOC { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then : +if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13257,8 +13257,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -13277,7 +13276,7 @@ done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -13287,7 +13286,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13455,8 +13454,7 @@ for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -13467,7 +13465,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } -if test "${ac_cv_func_select_args+set}" = set; then : +if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do @@ -13501,7 +13499,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done # Provide a safe default value. -: ${ac_cv_func_select_args='int,int *,struct timeval *'} +: "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 @@ -13527,7 +13525,7 @@ _ACEOF rm -f conftest* -if test "${ac_cv_func_setvbuf_reversed+set}" = set; then : +if ${ac_cv_func_setvbuf_reversed+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_setvbuf_reversed=no @@ -13536,7 +13534,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13569,7 +13567,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : +if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file @@ -13631,7 +13629,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } -if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then : +if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13677,7 +13675,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 $as_echo_n "checking for working strcoll... " >&6; } -if test "${ac_cv_func_strcoll_works+set}" = set; then : +if ${ac_cv_func_strcoll_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13717,7 +13715,7 @@ fi for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = x""yes; then : +if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF @@ -13726,7 +13724,7 @@ else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then : +if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13760,7 +13758,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = x""yes; then : +if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -13769,13 +13767,17 @@ fi fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 $as_echo_n "checking for working strnlen... " >&6; } -if test "${ac_cv_func_strnlen_working+set}" = set; then : +if ${ac_cv_func_strnlen_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - ac_cv_func_strnlen_working=no + # Guess no on AIX systems, yes otherwise. + case "$host_os" in + aix*) ac_cv_func_strnlen_working=no;; + *) ac_cv_func_strnlen_working=yes;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13824,7 +13826,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } -if test "${ac_cv_func_strtod+set}" = set; then : +if ${ac_cv_func_strtod+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13883,14 +13885,14 @@ if test $ac_cv_func_strtod = no; then esac ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" -if test "x$ac_cv_func_pow" = x""yes; then : +if test "x$ac_cv_func_pow" = xyes; then : fi if test $ac_cv_func_pow = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 $as_echo_n "checking for pow in -lm... " >&6; } -if test "${ac_cv_lib_m_pow+set}" = set; then : +if ${ac_cv_lib_m_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13924,7 +13926,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 $as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = x""yes; then : +if test "x$ac_cv_lib_m_pow" = xyes; then : POW_LIB=-lm else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 @@ -13940,7 +13942,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utime accepts a null argument" >&5 $as_echo_n "checking whether utime accepts a null argument... " >&6; } -if test "${ac_cv_func_utime_null+set}" = set; then : +if ${ac_cv_func_utime_null+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.data; >conftest.data @@ -13990,13 +13992,13 @@ rm -f conftest.data for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : +if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h @@ -14010,8 +14012,7 @@ for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -14024,7 +14025,7 @@ done # so that AC_CHECK_FUNCS can detect functions in that library. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : +if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -14058,7 +14059,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : +if test "x$ac_cv_lib_m_sqrt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -14072,8 +14073,7 @@ for ac_func in exp2 log2 exp10 log10 sin cos tan asin acos atan atan2 pow rint e do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -14089,8 +14089,7 @@ if test "x${ac_cv_type_long_double_wider}" = "xyes" ; then do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -14191,7 +14190,7 @@ LDFLAGS=${old_LDFLAGS} rm -f conftest.dynamics ac_fn_c_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_poll_h" = x""yes; then : +if test "x$ac_cv_header_sys_poll_h" = xyes; then : HAS_POLL=1 $as_echo "#define HAVE_SYS_POLL_H 1" >>confdefs.h @@ -14205,7 +14204,7 @@ if test "${enable_internal_poll+set}" = set; then : enableval=$enable_internal_poll; case "${enableval}" in y|ye|yes) HAS_POLL="";; n|no) HAS_POLL="${HAS_POLL}" ;; - *) as_fn_error "bad value ${enableval} for --enable-internal-poll" "$LINENO" 5 ;; + *) as_fn_error $? "bad value ${enableval} for --enable-internal-poll" "$LINENO" 5 ;; esac fi @@ -14219,8 +14218,7 @@ for ac_func in funopen fopencookie do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -14232,7 +14230,7 @@ done for ac_func in inet_aton do : ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" -if test "x$ac_cv_func_inet_aton" = x""yes; then : +if test "x$ac_cv_func_inet_aton" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_ATON 1 _ACEOF @@ -14272,7 +14270,7 @@ rm -f core conftest.err conftest.$ac_objext \ # some systems already have gethostbyname_r so we don't need to build ours in main/utils.c { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5 $as_echo_n "checking for library containing gethostbyname_r... " >&6; } -if test "${ac_cv_search_gethostbyname_r+set}" = set; then : +if ${ac_cv_search_gethostbyname_r+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -14306,11 +14304,11 @@ for ac_lib in '' socket nsl; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_gethostbyname_r+set}" = set; then : + if ${ac_cv_search_gethostbyname_r+:} false; then : break fi done -if test "${ac_cv_search_gethostbyname_r+set}" = set; then : +if ${ac_cv_search_gethostbyname_r+:} false; then : else ac_cv_search_gethostbyname_r=no @@ -14384,7 +14382,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" -if test "x$ac_cv_header_byteswap_h" = x""yes; then : +if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 @@ -14452,11 +14450,11 @@ if test "${cross_compiling}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5 $as_echo_n "checking for /dev/urandom... " >&6; } -if test "${ac_cv_file__dev_urandom+set}" = set; then : +if ${ac_cv_file__dev_urandom+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/urandom"; then ac_cv_file__dev_urandom=yes else @@ -14465,7 +14463,7 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5 $as_echo "$ac_cv_file__dev_urandom" >&6; } -if test "x$ac_cv_file__dev_urandom" = x""yes; then : +if test "x$ac_cv_file__dev_urandom" = xyes; then : $as_echo "#define HAVE_DEV_URANDOM 1" >>confdefs.h @@ -14862,7 +14860,7 @@ rm -f core conftest.err conftest.$ac_objext \ for ac_header in sys/thr.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/thr.h" "ac_cv_header_sys_thr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_thr_h" = x""yes; then : +if test "x$ac_cv_header_sys_thr_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_THR_H 1 _ACEOF @@ -14994,8 +14992,8 @@ if test "${ac_cv_have_variable_fdset}x" = "0x"; then if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15975,16 +15973,22 @@ $as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -march=native" >&5 -$as_echo_n "checking for -march=native... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -march=native support" >&5 +$as_echo_n "checking for -march=native support... " >&6; } if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test "${CONFIG_CFLAGS}" = ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - AST_MARCH_NATIVE="-march=native" + AST_NATIVE_ARCH=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: user CFLAGS present" >&5 +$as_echo "user CFLAGS present" >&6; } + AST_NATIVE_ARCH= + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - AST_MARCH_NATIVE= + AST_NATIVE_ARCH= fi @@ -16017,7 +16021,7 @@ rm -f core conftest.err conftest.$ac_objext \ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_ninit" >&5 $as_echo_n "checking for library containing res_9_ninit... " >&6; } -if test "${ac_cv_search_res_9_ninit+set}" = set; then : +if ${ac_cv_search_res_9_ninit+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -16051,11 +16055,11 @@ for ac_lib in '' resolv; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_res_9_ninit+set}" = set; then : + if ${ac_cv_search_res_9_ninit+:} false; then : break fi done -if test "${ac_cv_search_res_9_ninit+set}" = set; then : +if ${ac_cv_search_res_9_ninit+:} false; then : else ac_cv_search_res_9_ninit=no @@ -16102,7 +16106,7 @@ $as_echo "#define HAVE_RES_NINIT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_ndestroy" >&5 $as_echo_n "checking for library containing res_9_ndestroy... " >&6; } -if test "${ac_cv_search_res_9_ndestroy+set}" = set; then : +if ${ac_cv_search_res_9_ndestroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -16136,11 +16140,11 @@ for ac_lib in '' resolv; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_res_9_ndestroy+set}" = set; then : + if ${ac_cv_search_res_9_ndestroy+:} false; then : break fi done -if test "${ac_cv_search_res_9_ndestroy+set}" = set; then : +if ${ac_cv_search_res_9_ndestroy+:} false; then : else ac_cv_search_res_9_ndestroy=no @@ -16194,7 +16198,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_close" >&5 $as_echo_n "checking for library containing res_9_close... " >&6; } -if test "${ac_cv_search_res_9_close+set}" = set; then : +if ${ac_cv_search_res_9_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -16228,11 +16232,11 @@ for ac_lib in '' resolv; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_res_9_close+set}" = set; then : + if ${ac_cv_search_res_9_close+:} false; then : break fi done -if test "${ac_cv_search_res_9_close+set}" = set; then : +if ${ac_cv_search_res_9_close+:} false; then : else ac_cv_search_res_9_close=no @@ -16434,7 +16438,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_fn_c_check_header_mongrel "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default" -if test "x$ac_cv_header_libkern_OSAtomic_h" = x""yes; then : +if test "x$ac_cv_header_libkern_OSAtomic_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OSX_ATOMICS 1 @@ -16450,7 +16454,7 @@ fi # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -16459,9 +16463,8 @@ else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi @@ -16484,7 +16487,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : +if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : @@ -16493,9 +16496,8 @@ else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi @@ -16518,7 +16520,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then : +if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : @@ -16527,9 +16529,8 @@ else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi @@ -16552,7 +16553,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 $as_echo_n "checking size of char *... " >&6; } -if test "${ac_cv_sizeof_char_p+set}" = set; then : +if ${ac_cv_sizeof_char_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then : @@ -16561,9 +16562,8 @@ else if test "$ac_cv_type_char_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (char *) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (char *) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char_p=0 fi @@ -16586,7 +16586,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : +if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : @@ -16595,9 +16595,8 @@ else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi @@ -16620,7 +16619,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then : +if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : @@ -16629,9 +16628,8 @@ else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi @@ -16661,7 +16659,7 @@ fi # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fd_set.fds_bits" >&5 $as_echo_n "checking size of fd_set.fds_bits... " >&6; } -if test "${ac_cv_sizeof_fd_set_fds_bits+set}" = set; then : +if ${ac_cv_sizeof_fd_set_fds_bits+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fd_set.fds_bits))" "ac_cv_sizeof_fd_set_fds_bits" "$ac_includes_default"; then : @@ -16670,9 +16668,8 @@ else if test "$ac_cv_type_fd_set_fds_bits" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (fd_set.fds_bits) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (fd_set.fds_bits) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_fd_set_fds_bits=0 fi @@ -16748,7 +16745,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PKGCONFIG+set}" = set; then : +if ${ac_cv_prog_PKGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PKGCONFIG"; then @@ -16788,7 +16785,7 @@ if test -z "$ac_cv_prog_PKGCONFIG"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_PKGCONFIG+set}" = set; then : +if ${ac_cv_prog_ac_ct_PKGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_PKGCONFIG"; then @@ -16859,7 +16856,7 @@ if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_asound_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lasound" >&5 $as_echo_n "checking for ${pbxfuncname} in -lasound... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -16894,8 +16891,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ALSA_FOUND=yes else AST_ALSA_FOUND=no @@ -16918,7 +16914,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ALSA_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" -if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then : +if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then : ALSA_HEADER_FOUND=1 else ALSA_HEADER_FOUND=0 @@ -16965,7 +16961,7 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5 $as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17000,8 +16996,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_BFD_FOUND=yes else AST_BFD_FOUND=no @@ -17024,7 +17019,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" -if test "x$ac_cv_header_bfd_h" = x""yes; then : +if test "x$ac_cv_header_bfd_h" = xyes; then : BFD_HEADER_FOUND=1 else BFD_HEADER_FOUND=0 @@ -17073,7 +17068,7 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5 $as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17108,8 +17103,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_BFD_FOUND=yes else AST_BFD_FOUND=no @@ -17132,7 +17126,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${BFD_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" -if test "x$ac_cv_header_bfd_h" = x""yes; then : +if test "x$ac_cv_header_bfd_h" = xyes; then : BFD_HEADER_FOUND=1 else BFD_HEADER_FOUND=0 @@ -17181,7 +17175,7 @@ if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_cap_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcap" >&5 $as_echo_n "checking for ${pbxfuncname} in -lcap... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17216,8 +17210,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_CAP_FOUND=yes else AST_CAP_FOUND=no @@ -17240,7 +17233,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${CAP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_capability_h" = x""yes; then : +if test "x$ac_cv_header_sys_capability_h" = xyes; then : CAP_HEADER_FOUND=1 else CAP_HEADER_FOUND=0 @@ -17663,7 +17656,7 @@ if test "${USE_GSM}" != "no"; then fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsm_create in -lgsm" >&5 $as_echo_n "checking for gsm_create in -lgsm... " >&6; } -if test "${ac_cv_lib_gsm_gsm_create+set}" = set; then : +if ${ac_cv_lib_gsm_gsm_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17697,7 +17690,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsm_gsm_create" >&5 $as_echo "$ac_cv_lib_gsm_gsm_create" >&6; } -if test "x$ac_cv_lib_gsm_gsm_create" = x""yes; then : +if test "x$ac_cv_lib_gsm_gsm_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSM 1 @@ -17709,8 +17702,7 @@ fi if test "x${GSM_DIR}" != "x" ; then as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm.h" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : GSM_HEADER_FOUND=1 else GSM_HEADER_FOUND=0 @@ -17719,8 +17711,7 @@ fi as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm/gsm.h" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm/gsm.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : GSM_GSM_HEADER_FOUND=1 else GSM_GSM_HEADER_FOUND=0 @@ -17729,7 +17720,7 @@ fi else ac_fn_c_check_header_mongrel "$LINENO" "gsm.h" "ac_cv_header_gsm_h" "$ac_includes_default" -if test "x$ac_cv_header_gsm_h" = x""yes; then : +if test "x$ac_cv_header_gsm_h" = xyes; then : GSM_HEADER_FOUND=1 else GSM_HEADER_FOUND=0 @@ -17737,7 +17728,7 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "gsm/gsm.h" "ac_cv_header_gsm_gsm_h" "$ac_includes_default" -if test "x$ac_cv_header_gsm_gsm_h" = x""yes; then : +if test "x$ac_cv_header_gsm_gsm_h" = xyes; then : GSM_GSM_HEADER_FOUND=1 else GSM_GSM_HEADER_FOUND=0 @@ -17819,7 +17810,7 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5 $as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17854,8 +17845,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ICONV_FOUND=yes else AST_ICONV_FOUND=no @@ -17878,7 +17868,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" -if test "x$ac_cv_header_iconv_h" = x""yes; then : +if test "x$ac_cv_header_iconv_h" = xyes; then : ICONV_HEADER_FOUND=1 else ICONV_HEADER_FOUND=0 @@ -17925,7 +17915,7 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5 $as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17960,8 +17950,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ICONV_FOUND=yes else AST_ICONV_FOUND=no @@ -17984,7 +17973,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" -if test "x$ac_cv_header_iconv_h" = x""yes; then : +if test "x$ac_cv_header_iconv_h" = xyes; then : ICONV_HEADER_FOUND=1 else ICONV_HEADER_FOUND=0 @@ -18031,7 +18020,7 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5 $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18066,8 +18055,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ICONV_FOUND=yes else AST_ICONV_FOUND=no @@ -18090,7 +18078,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ICONV_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" -if test "x$ac_cv_header_iconv_h" = x""yes; then : +if test "x$ac_cv_header_iconv_h" = xyes; then : ICONV_HEADER_FOUND=1 else ICONV_HEADER_FOUND=0 @@ -18138,7 +18126,7 @@ if test "x${PBX_ICAL}" != "x1" -a "${USE_ICAL}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ical_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lical" >&5 $as_echo_n "checking for ${pbxfuncname} in -lical... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18173,8 +18161,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ICAL_FOUND=yes else AST_ICAL_FOUND=no @@ -18197,7 +18184,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ICAL_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libical/ical.h" "ac_cv_header_libical_ical_h" "$ac_includes_default" -if test "x$ac_cv_header_libical_ical_h" = x""yes; then : +if test "x$ac_cv_header_libical_ical_h" = xyes; then : ICAL_HEADER_FOUND=1 else ICAL_HEADER_FOUND=0 @@ -18244,7 +18231,7 @@ if test "x${PBX_IKSEMEL}" != "x1" -a "${USE_IKSEMEL}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_iksemel_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liksemel" >&5 $as_echo_n "checking for ${pbxfuncname} in -liksemel... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18279,8 +18266,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_IKSEMEL_FOUND=yes else AST_IKSEMEL_FOUND=no @@ -18303,7 +18289,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${IKSEMEL_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "iksemel.h" "ac_cv_header_iksemel_h" "$ac_includes_default" -if test "x$ac_cv_header_iksemel_h" = x""yes; then : +if test "x$ac_cv_header_iksemel_h" = xyes; then : IKSEMEL_HEADER_FOUND=1 else IKSEMEL_HEADER_FOUND=0 @@ -18978,7 +18964,7 @@ if test "x${PBX_IODBC}" != "x1" -a "${USE_IODBC}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_iodbc_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liodbc" >&5 $as_echo_n "checking for ${pbxfuncname} in -liodbc... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19013,8 +18999,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_IODBC_FOUND=yes else AST_IODBC_FOUND=no @@ -19037,7 +19022,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${IODBC_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default" -if test "x$ac_cv_header_sql_h" = x""yes; then : +if test "x$ac_cv_header_sql_h" = xyes; then : IODBC_HEADER_FOUND=1 else IODBC_HEADER_FOUND=0 @@ -19084,7 +19069,7 @@ if test "x${PBX_INOTIFY}" != "x1" -a "${USE_INOTIFY}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5 $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19119,8 +19104,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_INOTIFY_FOUND=yes else AST_INOTIFY_FOUND=no @@ -19143,7 +19127,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${INOTIFY_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_inotify_h" = x""yes; then : +if test "x$ac_cv_header_sys_inotify_h" = xyes; then : INOTIFY_HEADER_FOUND=1 else INOTIFY_HEADER_FOUND=0 @@ -19190,7 +19174,7 @@ if test "x${PBX_JACK}" != "x1" -a "${USE_JACK}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_jack_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ljack" >&5 $as_echo_n "checking for ${pbxfuncname} in -ljack... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19225,8 +19209,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_JACK_FOUND=yes else AST_JACK_FOUND=no @@ -19249,7 +19232,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${JACK_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "jack/jack.h" "ac_cv_header_jack_jack_h" "$ac_includes_default" -if test "x$ac_cv_header_jack_jack_h" = x""yes; then : +if test "x$ac_cv_header_jack_jack_h" = xyes; then : JACK_HEADER_FOUND=1 else JACK_HEADER_FOUND=0 @@ -19297,7 +19280,7 @@ if test "x${PBX_KQUEUE}" != "x1" -a "${USE_KQUEUE}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5 $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19332,8 +19315,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_KQUEUE_FOUND=yes else AST_KQUEUE_FOUND=no @@ -19356,7 +19338,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${KQUEUE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_event_h" = x""yes; then : +if test "x$ac_cv_header_sys_event_h" = xyes; then : KQUEUE_HEADER_FOUND=1 else KQUEUE_HEADER_FOUND=0 @@ -19387,7 +19369,7 @@ fi for ac_func in kevent64 do : ac_fn_c_check_func "$LINENO" "kevent64" "ac_cv_func_kevent64" -if test "x$ac_cv_func_kevent64" = x""yes; then : +if test "x$ac_cv_func_kevent64" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KEVENT64 1 _ACEOF @@ -19417,7 +19399,7 @@ if test "x${PBX_LTDL}" != "x1" -a "${USE_LTDL}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ltdl_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lltdl" >&5 $as_echo_n "checking for ${pbxfuncname} in -lltdl... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19452,8 +19434,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_LTDL_FOUND=yes else AST_LTDL_FOUND=no @@ -19476,7 +19457,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${LTDL_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default" -if test "x$ac_cv_header_ltdl_h" = x""yes; then : +if test "x$ac_cv_header_ltdl_h" = xyes; then : LTDL_HEADER_FOUND=1 else LTDL_HEADER_FOUND=0 @@ -19523,7 +19504,7 @@ if test "x${PBX_LDAP}" != "x1" -a "${USE_LDAP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ldap_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lldap" >&5 $as_echo_n "checking for ${pbxfuncname} in -lldap... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19558,8 +19539,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_LDAP_FOUND=yes else AST_LDAP_FOUND=no @@ -19582,7 +19562,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${LDAP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default" -if test "x$ac_cv_header_ldap_h" = x""yes; then : +if test "x$ac_cv_header_ldap_h" = xyes; then : LDAP_HEADER_FOUND=1 else LDAP_HEADER_FOUND=0 @@ -19629,7 +19609,7 @@ if test "x${PBX_MISDN}" != "x1" -a "${USE_MISDN}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_mISDN_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lmISDN" >&5 $as_echo_n "checking for ${pbxfuncname} in -lmISDN... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19664,8 +19644,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_MISDN_FOUND=yes else AST_MISDN_FOUND=no @@ -19688,7 +19667,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${MISDN_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/mISDNlib.h" "ac_cv_header_mISDNuser_mISDNlib_h" "$ac_includes_default" -if test "x$ac_cv_header_mISDNuser_mISDNlib_h" = x""yes; then : +if test "x$ac_cv_header_mISDNuser_mISDNlib_h" = xyes; then : MISDN_HEADER_FOUND=1 else MISDN_HEADER_FOUND=0 @@ -19736,7 +19715,7 @@ if test "x${PBX_ISDNNET}" != "x1" -a "${USE_ISDNNET}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_isdnnet_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lisdnnet" >&5 $as_echo_n "checking for ${pbxfuncname} in -lisdnnet... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19771,8 +19750,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ISDNNET_FOUND=yes else AST_ISDNNET_FOUND=no @@ -19795,7 +19773,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ISDNNET_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/isdn_net.h" "ac_cv_header_mISDNuser_isdn_net_h" "$ac_includes_default" -if test "x$ac_cv_header_mISDNuser_isdn_net_h" = x""yes; then : +if test "x$ac_cv_header_mISDNuser_isdn_net_h" = xyes; then : ISDNNET_HEADER_FOUND=1 else ISDNNET_HEADER_FOUND=0 @@ -19841,7 +19819,7 @@ if test "x${PBX_SUPPSERV}" != "x1" -a "${USE_SUPPSERV}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_suppserv_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsuppserv" >&5 $as_echo_n "checking for ${pbxfuncname} in -lsuppserv... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19876,8 +19854,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SUPPSERV_FOUND=yes else AST_SUPPSERV_FOUND=no @@ -19900,7 +19877,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SUPPSERV_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "mISDNuser/suppserv.h" "ac_cv_header_mISDNuser_suppserv_h" "$ac_includes_default" -if test "x$ac_cv_header_mISDNuser_suppserv_h" = x""yes; then : +if test "x$ac_cv_header_mISDNuser_suppserv_h" = xyes; then : SUPPSERV_HEADER_FOUND=1 else SUPPSERV_HEADER_FOUND=0 @@ -20019,7 +19996,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_fn_c_check_header_mongrel "$LINENO" "linux/mISDNdsp.h" "ac_cv_header_linux_mISDNdsp_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_mISDNdsp_h" = x""yes; then : +if test "x$ac_cv_header_linux_mISDNdsp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define MISDN_1_2 1 @@ -20030,7 +20007,7 @@ fi ac_fn_c_check_member "$LINENO" "Q931_info_t" "redirect_dn" "ac_cv_member_Q931_info_t_redirect_dn" "#include " -if test "x$ac_cv_member_Q931_info_t_redirect_dn" = x""yes; then : +if test "x$ac_cv_member_Q931_info_t_redirect_dn" = xyes; then : else PBX_MISDN=0 @@ -20046,7 +20023,7 @@ fi set dummy ${ac_tool_prefix}mysql_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_MYSQLCLIENT+set}" = set; then : +if ${ac_cv_path_CONFIG_MYSQLCLIENT+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_MYSQLCLIENT in @@ -20090,7 +20067,7 @@ if test -z "$ac_cv_path_CONFIG_MYSQLCLIENT"; then set dummy mysql_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_MYSQLCLIENT+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_MYSQLCLIENT in @@ -20209,7 +20186,7 @@ if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_nbs_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnbs" >&5 $as_echo_n "checking for ${pbxfuncname} in -lnbs... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -20244,8 +20221,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_NBS_FOUND=yes else AST_NBS_FOUND=no @@ -20268,7 +20244,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${NBS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "nbs.h" "ac_cv_header_nbs_h" "$ac_includes_default" -if test "x$ac_cv_header_nbs_h" = x""yes; then : +if test "x$ac_cv_header_nbs_h" = xyes; then : NBS_HEADER_FOUND=1 else NBS_HEADER_FOUND=0 @@ -20303,7 +20279,7 @@ fi set dummy ${ac_tool_prefix}neon-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_NEON+set}" = set; then : +if ${ac_cv_path_CONFIG_NEON+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_NEON in @@ -20347,7 +20323,7 @@ if test -z "$ac_cv_path_CONFIG_NEON"; then set dummy neon-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_NEON+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_NEON+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_NEON in @@ -20454,7 +20430,7 @@ $as_echo "#define HAVE_NEON 1" >>confdefs.h set dummy ${ac_tool_prefix}neon-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_NEON29+set}" = set; then : +if ${ac_cv_path_CONFIG_NEON29+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_NEON29 in @@ -20498,7 +20474,7 @@ if test -z "$ac_cv_path_CONFIG_NEON29"; then set dummy neon-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_NEON29+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_NEON29+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_NEON29 in @@ -20607,7 +20583,7 @@ $as_echo "#define HAVE_NEON29 1" >>confdefs.h set dummy ${ac_tool_prefix}net-snmp-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_NETSNMP+set}" = set; then : +if ${ac_cv_path_CONFIG_NETSNMP+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_NETSNMP in @@ -20651,7 +20627,7 @@ if test -z "$ac_cv_path_CONFIG_NETSNMP"; then set dummy net-snmp-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_NETSNMP+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_NETSNMP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_NETSNMP in @@ -20774,7 +20750,7 @@ if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnewt" >&5 $as_echo_n "checking for ${pbxfuncname} in -lnewt... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -20809,8 +20785,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_NEWT_FOUND=yes else AST_NEWT_FOUND=no @@ -20833,7 +20808,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${NEWT_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "newt.h" "ac_cv_header_newt_h" "$ac_includes_default" -if test "x$ac_cv_header_newt_h" = x""yes; then : +if test "x$ac_cv_header_newt_h" = xyes; then : NEWT_HEADER_FOUND=1 else NEWT_HEADER_FOUND=0 @@ -20880,7 +20855,7 @@ if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_odbc_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lodbc" >&5 $as_echo_n "checking for ${pbxfuncname} in -lodbc... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -20915,8 +20890,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_UNIXODBC_FOUND=yes else AST_UNIXODBC_FOUND=no @@ -20939,7 +20913,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${UNIXODBC_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sql.h" "ac_cv_header_sql_h" "$ac_includes_default" -if test "x$ac_cv_header_sql_h" = x""yes; then : +if test "x$ac_cv_header_sql_h" = xyes; then : UNIXODBC_HEADER_FOUND=1 else UNIXODBC_HEADER_FOUND=0 @@ -20986,7 +20960,7 @@ if test "x${PBX_OGG}" != "x1" -a "${USE_OGG}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ogg_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -logg" >&5 $as_echo_n "checking for ${pbxfuncname} in -logg... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21021,8 +20995,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OGG_FOUND=yes else AST_OGG_FOUND=no @@ -21045,7 +21018,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OGG_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default" -if test "x$ac_cv_header_" = x""yes; then : +if test "x$ac_cv_header_" = xyes; then : OGG_HEADER_FOUND=1 else OGG_HEADER_FOUND=0 @@ -21093,7 +21066,7 @@ if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_execinfo_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lexecinfo" >&5 $as_echo_n "checking for ${pbxfuncname} in -lexecinfo... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21128,8 +21101,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_BKTR_FOUND=yes else AST_BKTR_FOUND=no @@ -21152,7 +21124,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${BKTR_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = x""yes; then : +if test "x$ac_cv_header_execinfo_h" = xyes; then : BKTR_HEADER_FOUND=1 else BKTR_HEADER_FOUND=0 @@ -21199,7 +21171,7 @@ if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5 $as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21234,8 +21206,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_BKTR_FOUND=yes else AST_BKTR_FOUND=no @@ -21258,7 +21229,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${BKTR_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = x""yes; then : +if test "x$ac_cv_header_execinfo_h" = xyes; then : BKTR_HEADER_FOUND=1 else BKTR_HEADER_FOUND=0 @@ -21305,7 +21276,7 @@ if test "x${PBX_BLUETOOTH}" != "x1" -a "${USE_BLUETOOTH}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_bluetooth_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbluetooth" >&5 $as_echo_n "checking for ${pbxfuncname} in -lbluetooth... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21340,8 +21311,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_BLUETOOTH_FOUND=yes else AST_BLUETOOTH_FOUND=no @@ -21364,7 +21334,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${BLUETOOTH_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" -if test "x$ac_cv_header_bluetooth_bluetooth_h" = x""yes; then : +if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : BLUETOOTH_HEADER_FOUND=1 else BLUETOOTH_HEADER_FOUND=0 @@ -21412,7 +21382,7 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5 $as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21447,8 +21417,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OSS_FOUND=yes else AST_OSS_FOUND=no @@ -21471,7 +21440,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "linux/soundcard.h" "ac_cv_header_linux_soundcard_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_soundcard_h" = x""yes; then : +if test "x$ac_cv_header_linux_soundcard_h" = xyes; then : OSS_HEADER_FOUND=1 else OSS_HEADER_FOUND=0 @@ -21517,7 +21486,7 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5 $as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21552,8 +21521,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OSS_FOUND=yes else AST_OSS_FOUND=no @@ -21576,7 +21544,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_soundcard_h" = x""yes; then : +if test "x$ac_cv_header_sys_soundcard_h" = xyes; then : OSS_HEADER_FOUND=1 else OSS_HEADER_FOUND=0 @@ -21622,7 +21590,7 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5 $as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21657,8 +21625,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OSS_FOUND=yes else AST_OSS_FOUND=no @@ -21681,7 +21648,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OSS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "soundcard.h" "ac_cv_header_soundcard_h" "$ac_includes_default" -if test "x$ac_cv_header_soundcard_h" = x""yes; then : +if test "x$ac_cv_header_soundcard_h" = xyes; then : OSS_HEADER_FOUND=1 else OSS_HEADER_FOUND=0 @@ -21716,7 +21683,7 @@ if test "${USE_PGSQL}" != "no"; then set dummy ${ac_tool_prefix}pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PG_CONFIG+set}" = set; then : +if ${ac_cv_path_PG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PG_CONFIG in @@ -21759,7 +21726,7 @@ if test -z "$ac_cv_path_PG_CONFIG"; then set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PG_CONFIG+set}" = set; then : +if ${ac_cv_path_ac_pt_PG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PG_CONFIG in @@ -21828,7 +21795,7 @@ $as_echo "$as_me: *** including --without-postgres" >&6;} set dummy ${ac_tool_prefix}pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PG_CONFIG+set}" = set; then : +if ${ac_cv_path_PG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PG_CONFIG in @@ -21871,7 +21838,7 @@ if test -z "$ac_cv_path_PG_CONFIG"; then set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PG_CONFIG+set}" = set; then : +if ${ac_cv_path_ac_pt_PG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PG_CONFIG in @@ -21941,7 +21908,7 @@ $as_echo "$as_me: *** including --without-postgres" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQescapeStringConn in -lpq" >&5 $as_echo_n "checking for PQescapeStringConn in -lpq... " >&6; } -if test "${ac_cv_lib_pq_PQescapeStringConn+set}" = set; then : +if ${ac_cv_lib_pq_PQescapeStringConn+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21975,7 +21942,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQescapeStringConn" >&5 $as_echo "$ac_cv_lib_pq_PQescapeStringConn" >&6; } -if test "x$ac_cv_lib_pq_PQescapeStringConn" = x""yes; then : +if test "x$ac_cv_lib_pq_PQescapeStringConn" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PGSQL 1 @@ -22057,7 +22024,7 @@ if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_popt_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpopt" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpopt... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22092,8 +22059,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_POPT_FOUND=yes else AST_POPT_FOUND=no @@ -22116,7 +22082,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${POPT_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "popt.h" "ac_cv_header_popt_h" "$ac_includes_default" -if test "x$ac_cv_header_popt_h" = x""yes; then : +if test "x$ac_cv_header_popt_h" = xyes; then : POPT_HEADER_FOUND=1 else POPT_HEADER_FOUND=0 @@ -22163,7 +22129,7 @@ if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_portaudio_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lportaudio" >&5 $as_echo_n "checking for ${pbxfuncname} in -lportaudio... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22198,8 +22164,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PORTAUDIO_FOUND=yes else AST_PORTAUDIO_FOUND=no @@ -22222,7 +22187,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PORTAUDIO_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "portaudio.h" "ac_cv_header_portaudio_h" "$ac_includes_default" -if test "x$ac_cv_header_portaudio_h" = x""yes; then : +if test "x$ac_cv_header_portaudio_h" = xyes; then : PORTAUDIO_HEADER_FOUND=1 else PORTAUDIO_HEADER_FOUND=0 @@ -22269,7 +22234,7 @@ if test "x${PBX_PRI}" != "x1" -a "${USE_PRI}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22304,8 +22269,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_FOUND=yes else AST_PRI_FOUND=no @@ -22328,7 +22292,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_HEADER_FOUND=1 else PRI_HEADER_FOUND=0 @@ -22374,7 +22338,7 @@ if test "x${PBX_PRI_L2_PERSISTENCE}" != "x1" -a "${USE_PRI_L2_PERSISTENCE}" != " as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22409,8 +22373,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_L2_PERSISTENCE_FOUND=yes else AST_PRI_L2_PERSISTENCE_FOUND=no @@ -22433,7 +22396,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_L2_PERSISTENCE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_L2_PERSISTENCE_HEADER_FOUND=1 else PRI_L2_PERSISTENCE_HEADER_FOUND=0 @@ -22479,7 +22442,7 @@ if test "x${PBX_PRI_DATETIME_SEND}" != "x1" -a "${USE_PRI_DATETIME_SEND}" != "no as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22514,8 +22477,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_DATETIME_SEND_FOUND=yes else AST_PRI_DATETIME_SEND_FOUND=no @@ -22538,7 +22500,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_DATETIME_SEND_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_DATETIME_SEND_HEADER_FOUND=1 else PRI_DATETIME_SEND_HEADER_FOUND=0 @@ -22584,7 +22546,7 @@ if test "x${PBX_PRI_MWI_V2}" != "x1" -a "${USE_PRI_MWI_V2}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22619,8 +22581,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_MWI_V2_FOUND=yes else AST_PRI_MWI_V2_FOUND=no @@ -22643,7 +22604,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_MWI_V2_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_MWI_V2_HEADER_FOUND=1 else PRI_MWI_V2_HEADER_FOUND=0 @@ -22689,7 +22650,7 @@ if test "x${PBX_PRI_DISPLAY_TEXT}" != "x1" -a "${USE_PRI_DISPLAY_TEXT}" != "no"; as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22724,8 +22685,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_DISPLAY_TEXT_FOUND=yes else AST_PRI_DISPLAY_TEXT_FOUND=no @@ -22748,7 +22708,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_DISPLAY_TEXT_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_DISPLAY_TEXT_HEADER_FOUND=1 else PRI_DISPLAY_TEXT_HEADER_FOUND=0 @@ -22794,7 +22754,7 @@ if test "x${PBX_PRI_MWI}" != "x1" -a "${USE_PRI_MWI}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22829,8 +22789,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_MWI_FOUND=yes else AST_PRI_MWI_FOUND=no @@ -22853,7 +22812,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_MWI_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_MWI_HEADER_FOUND=1 else PRI_MWI_HEADER_FOUND=0 @@ -22899,7 +22858,7 @@ if test "x${PBX_PRI_MCID}" != "x1" -a "${USE_PRI_MCID}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22934,8 +22893,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_MCID_FOUND=yes else AST_PRI_MCID_FOUND=no @@ -22958,7 +22916,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_MCID_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_MCID_HEADER_FOUND=1 else PRI_MCID_HEADER_FOUND=0 @@ -23004,7 +22962,7 @@ if test "x${PBX_PRI_CALL_WAITING}" != "x1" -a "${USE_PRI_CALL_WAITING}" != "no"; as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23039,8 +22997,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_CALL_WAITING_FOUND=yes else AST_PRI_CALL_WAITING_FOUND=no @@ -23063,7 +23020,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_CALL_WAITING_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_CALL_WAITING_HEADER_FOUND=1 else PRI_CALL_WAITING_HEADER_FOUND=0 @@ -23109,7 +23066,7 @@ if test "x${PBX_PRI_AOC_EVENTS}" != "x1" -a "${USE_PRI_AOC_EVENTS}" != "no"; the as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23144,8 +23101,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_AOC_EVENTS_FOUND=yes else AST_PRI_AOC_EVENTS_FOUND=no @@ -23168,7 +23124,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_AOC_EVENTS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_AOC_EVENTS_HEADER_FOUND=1 else PRI_AOC_EVENTS_HEADER_FOUND=0 @@ -23214,7 +23170,7 @@ if test "x${PBX_PRI_TRANSFER}" != "x1" -a "${USE_PRI_TRANSFER}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23249,8 +23205,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_TRANSFER_FOUND=yes else AST_PRI_TRANSFER_FOUND=no @@ -23273,7 +23228,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_TRANSFER_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_TRANSFER_HEADER_FOUND=1 else PRI_TRANSFER_HEADER_FOUND=0 @@ -23319,7 +23274,7 @@ if test "x${PBX_PRI_CCSS}" != "x1" -a "${USE_PRI_CCSS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23354,8 +23309,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_CCSS_FOUND=yes else AST_PRI_CCSS_FOUND=no @@ -23378,7 +23332,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_CCSS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_CCSS_HEADER_FOUND=1 else PRI_CCSS_HEADER_FOUND=0 @@ -23424,7 +23378,7 @@ if test "x${PBX_PRI_HANGUP_FIX}" != "x1" -a "${USE_PRI_HANGUP_FIX}" != "no"; the as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23459,8 +23413,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_HANGUP_FIX_FOUND=yes else AST_PRI_HANGUP_FIX_FOUND=no @@ -23483,7 +23436,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_HANGUP_FIX_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_HANGUP_FIX_HEADER_FOUND=1 else PRI_HANGUP_FIX_HEADER_FOUND=0 @@ -23529,7 +23482,7 @@ if test "x${PBX_PRI_SUBADDR}" != "x1" -a "${USE_PRI_SUBADDR}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23564,8 +23517,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_SUBADDR_FOUND=yes else AST_PRI_SUBADDR_FOUND=no @@ -23588,7 +23540,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_SUBADDR_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_SUBADDR_HEADER_FOUND=1 else PRI_SUBADDR_HEADER_FOUND=0 @@ -23634,7 +23586,7 @@ if test "x${PBX_PRI_CALL_HOLD}" != "x1" -a "${USE_PRI_CALL_HOLD}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23669,8 +23621,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_CALL_HOLD_FOUND=yes else AST_PRI_CALL_HOLD_FOUND=no @@ -23693,7 +23644,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_CALL_HOLD_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_CALL_HOLD_HEADER_FOUND=1 else PRI_CALL_HOLD_HEADER_FOUND=0 @@ -23739,7 +23690,7 @@ if test "x${PBX_PRI_CALL_REROUTING}" != "x1" -a "${USE_PRI_CALL_REROUTING}" != " as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23774,8 +23725,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_CALL_REROUTING_FOUND=yes else AST_PRI_CALL_REROUTING_FOUND=no @@ -23798,7 +23748,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_CALL_REROUTING_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_CALL_REROUTING_HEADER_FOUND=1 else PRI_CALL_REROUTING_HEADER_FOUND=0 @@ -23844,7 +23794,7 @@ if test "x${PBX_PRI_SETUP_KEYPAD}" != "x1" -a "${USE_PRI_SETUP_KEYPAD}" != "no"; as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23879,8 +23829,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_SETUP_KEYPAD_FOUND=yes else AST_PRI_SETUP_KEYPAD_FOUND=no @@ -23903,7 +23852,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_SETUP_KEYPAD_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_SETUP_KEYPAD_HEADER_FOUND=1 else PRI_SETUP_KEYPAD_HEADER_FOUND=0 @@ -23953,7 +23902,7 @@ if test "x${PBX_PRI_PROG_W_CAUSE}" != "x1" -a "${USE_PRI_PROG_W_CAUSE}" != "no"; as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -23988,8 +23937,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_PROG_W_CAUSE_FOUND=yes else AST_PRI_PROG_W_CAUSE_FOUND=no @@ -24012,7 +23960,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_PROG_W_CAUSE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_PROG_W_CAUSE_HEADER_FOUND=1 else PRI_PROG_W_CAUSE_HEADER_FOUND=0 @@ -24058,7 +24006,7 @@ if test "x${PBX_PRI_INBANDDISCONNECT}" != "x1" -a "${USE_PRI_INBANDDISCONNECT}" as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24093,8 +24041,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_INBANDDISCONNECT_FOUND=yes else AST_PRI_INBANDDISCONNECT_FOUND=no @@ -24117,7 +24064,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_INBANDDISCONNECT_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_INBANDDISCONNECT_HEADER_FOUND=1 else PRI_INBANDDISCONNECT_HEADER_FOUND=0 @@ -24163,7 +24110,7 @@ if test "x${PBX_PRI_SERVICE_MESSAGES}" != "x1" -a "${USE_PRI_SERVICE_MESSAGES}" as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24198,8 +24145,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_SERVICE_MESSAGES_FOUND=yes else AST_PRI_SERVICE_MESSAGES_FOUND=no @@ -24222,7 +24168,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_SERVICE_MESSAGES_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_SERVICE_MESSAGES_HEADER_FOUND=1 else PRI_SERVICE_MESSAGES_HEADER_FOUND=0 @@ -24268,7 +24214,7 @@ if test "x${PBX_PRI_REVERSE_CHARGE}" != "x1" -a "${USE_PRI_REVERSE_CHARGE}" != " as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5 $as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24303,8 +24249,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_PRI_REVERSE_CHARGE_FOUND=yes else AST_PRI_REVERSE_CHARGE_FOUND=no @@ -24327,7 +24272,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PRI_REVERSE_CHARGE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libpri.h" "ac_cv_header_libpri_h" "$ac_includes_default" -if test "x$ac_cv_header_libpri_h" = x""yes; then : +if test "x$ac_cv_header_libpri_h" = xyes; then : PRI_REVERSE_CHARGE_HEADER_FOUND=1 else PRI_REVERSE_CHARGE_HEADER_FOUND=0 @@ -24375,7 +24320,7 @@ if test "x${PBX_RESAMPLE}" != "x1" -a "${USE_RESAMPLE}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_resample_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lresample" >&5 $as_echo_n "checking for ${pbxfuncname} in -lresample... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24410,8 +24355,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_RESAMPLE_FOUND=yes else AST_RESAMPLE_FOUND=no @@ -24434,7 +24378,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${RESAMPLE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libresample.h" "ac_cv_header_libresample_h" "$ac_includes_default" -if test "x$ac_cv_header_libresample_h" = x""yes; then : +if test "x$ac_cv_header_libresample_h" = xyes; then : RESAMPLE_HEADER_FOUND=1 else RESAMPLE_HEADER_FOUND=0 @@ -24543,7 +24487,7 @@ if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5 $as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24578,8 +24522,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SPANDSP_FOUND=yes else AST_SPANDSP_FOUND=no @@ -24602,7 +24545,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "spandsp.h" "ac_cv_header_spandsp_h" "$ac_includes_default" -if test "x$ac_cv_header_spandsp_h" = x""yes; then : +if test "x$ac_cv_header_spandsp_h" = xyes; then : SPANDSP_HEADER_FOUND=1 else SPANDSP_HEADER_FOUND=0 @@ -24653,7 +24596,7 @@ if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5 $as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24688,8 +24631,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SPANDSP_FOUND=yes else AST_SPANDSP_FOUND=no @@ -24712,7 +24654,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "spandsp.h" "ac_cv_header_spandsp_h" "$ac_includes_default" -if test "x$ac_cv_header_spandsp_h" = x""yes; then : +if test "x$ac_cv_header_spandsp_h" = xyes; then : SPANDSP_HEADER_FOUND=1 else SPANDSP_HEADER_FOUND=0 @@ -24760,7 +24702,7 @@ if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ss7_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lss7" >&5 $as_echo_n "checking for ${pbxfuncname} in -lss7... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24795,8 +24737,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SS7_FOUND=yes else AST_SS7_FOUND=no @@ -24819,7 +24760,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SS7_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "libss7.h" "ac_cv_header_libss7_h" "$ac_includes_default" -if test "x$ac_cv_header_libss7_h" = x""yes; then : +if test "x$ac_cv_header_libss7_h" = xyes; then : SS7_HEADER_FOUND=1 else SS7_HEADER_FOUND=0 @@ -24866,7 +24807,7 @@ if test "x${PBX_OPENR2}" != "x1" -a "${USE_OPENR2}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_openr2_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopenr2" >&5 $as_echo_n "checking for ${pbxfuncname} in -lopenr2... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24901,8 +24842,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OPENR2_FOUND=yes else AST_OPENR2_FOUND=no @@ -24925,7 +24865,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OPENR2_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "openr2.h" "ac_cv_header_openr2_h" "$ac_includes_default" -if test "x$ac_cv_header_openr2_h" = x""yes; then : +if test "x$ac_cv_header_openr2_h" = xyes; then : OPENR2_HEADER_FOUND=1 else OPENR2_HEADER_FOUND=0 @@ -24970,8 +24910,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${PWLIBDIR:-unset}" != "unset" ; then as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/version.h" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/version.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : HAS_PWLIB=1 fi @@ -24981,8 +24920,7 @@ if test "${HAS_PWLIB:-unset}" = "unset" ; then if test "${OPENH323DIR:-unset}" != "unset"; then as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/../pwlib/version.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : HAS_PWLIB=1 fi @@ -24993,8 +24931,7 @@ fi else as_ac_Header=`$as_echo "ac_cv_header_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "${HOME}/pwlib/include/ptlib.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : HAS_PWLIB=1 fi @@ -25003,7 +24940,7 @@ fi PWLIBDIR="${HOME}/pwlib" else ac_fn_cxx_check_header_mongrel "$LINENO" "/usr/local/include/ptlib.h" "ac_cv_header__usr_local_include_ptlib_h" "$ac_includes_default" -if test "x$ac_cv_header__usr_local_include_ptlib_h" = x""yes; then : +if test "x$ac_cv_header__usr_local_include_ptlib_h" = xyes; then : HAS_PWLIB=1 fi @@ -25013,7 +24950,7 @@ fi set dummy ptlib-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then : +if ${ac_cv_path_PTLIB_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PTLIB_CONFIG in @@ -25065,7 +25002,7 @@ fi PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`" else ac_fn_cxx_check_header_mongrel "$LINENO" "/usr/include/ptlib.h" "ac_cv_header__usr_include_ptlib_h" "$ac_includes_default" -if test "x$ac_cv_header__usr_include_ptlib_h" = x""yes; then : +if test "x$ac_cv_header__usr_include_ptlib_h" = xyes; then : HAS_PWLIB=1 fi @@ -25075,7 +25012,7 @@ fi set dummy ptlib-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then : +if ${ac_cv_path_PTLIB_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PTLIB_CONFIG in @@ -25406,8 +25343,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "${OPENH323DIR:-unset}" != "unset" ; then as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/version.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : HAS_OPENH323=1 fi @@ -25416,8 +25352,7 @@ fi if test "${HAS_OPENH323:-unset}" = "unset" ; then as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/../openh323/version.h" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1 fi @@ -25429,8 +25364,7 @@ fi as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/include/h323.h" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "${OPENH323DIR}/include/h323.h" "$as_ac_Header" "#include " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : else OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}" @@ -25444,8 +25378,7 @@ fi as_ac_Header=`$as_echo "ac_cv_header_${HOME}/openh323/include/h323.h" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "${HOME}/openh323/include/h323.h" "$as_ac_Header" "#include " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : HAS_OPENH323=1 fi @@ -25458,7 +25391,7 @@ fi CPPFLAGS="${CPPFLAGS} -I/usr/local/include/openh323 -I${PWLIB_INCDIR}" ac_fn_cxx_check_header_compile "$LINENO" "/usr/local/include/openh323/h323.h" "ac_cv_header__usr_local_include_openh323_h323_h" "#include " -if test "x$ac_cv_header__usr_local_include_openh323_h323_h" = x""yes; then : +if test "x$ac_cv_header__usr_local_include_openh323_h323_h" = xyes; then : HAS_OPENH323=1 fi @@ -25477,7 +25410,7 @@ fi CPPFLAGS="${CPPFLAGS} -I/usr/include/openh323 -I${PWLIB_INCDIR}" ac_fn_cxx_check_header_compile "$LINENO" "/usr/include/openh323/h323.h" "ac_cv_header__usr_include_openh323_h323_h" "#include " -if test "x$ac_cv_header__usr_include_openh323_h323_h" = x""yes; then : +if test "x$ac_cv_header__usr_include_openh323_h323_h" = xyes; then : HAS_OPENH323=1 fi @@ -25719,7 +25652,7 @@ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_lua5.1_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.1" >&5 $as_echo_n "checking for ${pbxfuncname} in -llua5.1... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25754,8 +25687,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_LUA_FOUND=yes else AST_LUA_FOUND=no @@ -25778,7 +25710,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "lua5.1/lua.h" "ac_cv_header_lua5_1_lua_h" "$ac_includes_default" -if test "x$ac_cv_header_lua5_1_lua_h" = x""yes; then : +if test "x$ac_cv_header_lua5_1_lua_h" = xyes; then : LUA_HEADER_FOUND=1 else LUA_HEADER_FOUND=0 @@ -25833,7 +25765,7 @@ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_lua_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua" >&5 $as_echo_n "checking for ${pbxfuncname} in -llua... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25868,8 +25800,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_LUA_FOUND=yes else AST_LUA_FOUND=no @@ -25892,7 +25823,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "lua.h" "ac_cv_header_lua_h" "$ac_includes_default" -if test "x$ac_cv_header_lua_h" = x""yes; then : +if test "x$ac_cv_header_lua_h" = xyes; then : LUA_HEADER_FOUND=1 else LUA_HEADER_FOUND=0 @@ -25939,7 +25870,7 @@ if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_radiusclient-ng_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lradiusclient-ng" >&5 $as_echo_n "checking for ${pbxfuncname} in -lradiusclient-ng... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25974,8 +25905,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_RADIUS_FOUND=yes else AST_RADIUS_FOUND=no @@ -25998,7 +25928,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${RADIUS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "radiusclient-ng.h" "ac_cv_header_radiusclient_ng_h" "$ac_includes_default" -if test "x$ac_cv_header_radiusclient_ng_h" = x""yes; then : +if test "x$ac_cv_header_radiusclient_ng_h" = xyes; then : RADIUS_HEADER_FOUND=1 else RADIUS_HEADER_FOUND=0 @@ -26054,7 +25984,7 @@ if test "x${PBX_OPENAIS}" != "x1" -a "${USE_OPENAIS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_SaClm_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lSaClm" >&5 $as_echo_n "checking for ${pbxfuncname} in -lSaClm... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26089,8 +26019,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OPENAIS_FOUND=yes else AST_OPENAIS_FOUND=no @@ -26113,7 +26042,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OPENAIS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "openais/saClm.h" "ac_cv_header_openais_saClm_h" "$ac_includes_default" -if test "x$ac_cv_header_openais_saClm_h" = x""yes; then : +if test "x$ac_cv_header_openais_saClm_h" = xyes; then : OPENAIS_HEADER_FOUND=1 else OPENAIS_HEADER_FOUND=0 @@ -26175,7 +26104,7 @@ if test "x${PBX_SPEEX}" != "x1" -a "${USE_SPEEX}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeex" >&5 $as_echo_n "checking for ${pbxfuncname} in -lspeex... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26210,8 +26139,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SPEEX_FOUND=yes else AST_SPEEX_FOUND=no @@ -26234,7 +26162,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SPEEX_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default" -if test "x$ac_cv_header_speex_speex_h" = x""yes; then : +if test "x$ac_cv_header_speex_speex_h" = xyes; then : SPEEX_HEADER_FOUND=1 else SPEEX_HEADER_FOUND=0 @@ -26282,7 +26210,7 @@ if test "x${PBX_SPEEX_PREPROCESS}" != "x1" -a "${USE_SPEEX_PREPROCESS}" != "no"; as_ac_Lib=`$as_echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeex" >&5 $as_echo_n "checking for ${pbxfuncname} in -lspeex... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26317,8 +26245,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SPEEX_PREPROCESS_FOUND=yes else AST_SPEEX_PREPROCESS_FOUND=no @@ -26341,7 +26268,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SPEEX_PREPROCESS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default" -if test "x$ac_cv_header_speex_speex_h" = x""yes; then : +if test "x$ac_cv_header_speex_speex_h" = xyes; then : SPEEX_PREPROCESS_HEADER_FOUND=1 else SPEEX_PREPROCESS_HEADER_FOUND=0 @@ -26391,7 +26318,7 @@ if test "x${PBX_SPEEXDSP}" != "x1" -a "${USE_SPEEXDSP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_speexdsp_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeexdsp" >&5 $as_echo_n "checking for ${pbxfuncname} in -lspeexdsp... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26426,8 +26353,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SPEEXDSP_FOUND=yes else AST_SPEEXDSP_FOUND=no @@ -26450,7 +26376,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SPEEXDSP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "speex/speex.h" "ac_cv_header_speex_speex_h" "$ac_includes_default" -if test "x$ac_cv_header_speex_speex_h" = x""yes; then : +if test "x$ac_cv_header_speex_speex_h" = xyes; then : SPEEXDSP_HEADER_FOUND=1 else SPEEXDSP_HEADER_FOUND=0 @@ -26502,7 +26428,7 @@ if test "x${PBX_SQLITE}" != "x1" -a "${USE_SQLITE}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_sqlite_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsqlite" >&5 $as_echo_n "checking for ${pbxfuncname} in -lsqlite... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26537,8 +26463,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SQLITE_FOUND=yes else AST_SQLITE_FOUND=no @@ -26561,7 +26486,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SQLITE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sqlite.h" "ac_cv_header_sqlite_h" "$ac_includes_default" -if test "x$ac_cv_header_sqlite_h" = x""yes; then : +if test "x$ac_cv_header_sqlite_h" = xyes; then : SQLITE_HEADER_FOUND=1 else SQLITE_HEADER_FOUND=0 @@ -26608,7 +26533,7 @@ if test "x${PBX_SQLITE3}" != "x1" -a "${USE_SQLITE3}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_sqlite3_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsqlite3" >&5 $as_echo_n "checking for ${pbxfuncname} in -lsqlite3... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26643,8 +26568,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SQLITE3_FOUND=yes else AST_SQLITE3_FOUND=no @@ -26667,7 +26591,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SQLITE3_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" -if test "x$ac_cv_header_sqlite3_h" = x""yes; then : +if test "x$ac_cv_header_sqlite3_h" = xyes; then : SQLITE3_HEADER_FOUND=1 else SQLITE3_HEADER_FOUND=0 @@ -26722,7 +26646,7 @@ if test "x${PBX_CRYPTO}" != "x1" -a "${USE_CRYPTO}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_crypto_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcrypto" >&5 $as_echo_n "checking for ${pbxfuncname} in -lcrypto... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26757,8 +26681,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_CRYPTO_FOUND=yes else AST_CRYPTO_FOUND=no @@ -26781,7 +26704,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${CRYPTO_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "openssl/aes.h" "ac_cv_header_openssl_aes_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_aes_h" = x""yes; then : +if test "x$ac_cv_header_openssl_aes_h" = xyes; then : CRYPTO_HEADER_FOUND=1 else CRYPTO_HEADER_FOUND=0 @@ -26830,7 +26753,7 @@ if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lssl" >&5 $as_echo_n "checking for ${pbxfuncname} in -lssl... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26865,8 +26788,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_OPENSSL_FOUND=yes else AST_OPENSSL_FOUND=no @@ -26889,7 +26811,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${OPENSSL_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then : +if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : OPENSSL_HEADER_FOUND=1 else OPENSSL_HEADER_FOUND=0 @@ -26935,7 +26857,7 @@ then osptk_saved_cppflags="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${osptk_cflags}" ac_fn_c_check_header_mongrel "$LINENO" "osp/osp.h" "ac_cv_header_osp_osp_h" "$ac_includes_default" -if test "x$ac_cv_header_osp_osp_h" = x""yes; then : +if test "x$ac_cv_header_osp_osp_h" = xyes; then : osptk_header_found=yes else osptk_header_found=no @@ -26950,7 +26872,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSPPInit in -losptk" >&5 $as_echo_n "checking for OSPPInit in -losptk... " >&6; } -if test "${ac_cv_lib_osptk_OSPPInit+set}" = set; then : +if ${ac_cv_lib_osptk_OSPPInit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -26984,7 +26906,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_osptk_OSPPInit" >&5 $as_echo "$ac_cv_lib_osptk_OSPPInit" >&6; } -if test "x$ac_cv_lib_osptk_OSPPInit" = x""yes; then : +if test "x$ac_cv_lib_osptk_OSPPInit" = xyes; then : osptk_library_found=yes else osptk_library_found=no @@ -27001,8 +26923,8 @@ $as_echo_n "checking if OSP Toolkit version is compatible with app_osplookup... if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run test program while cross compiling -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27068,7 +26990,7 @@ if test "x${PBX_SRTP}" != "x1" -a "${USE_SRTP}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_srtp_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsrtp" >&5 $as_echo_n "checking for ${pbxfuncname} in -lsrtp... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27103,8 +27025,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SRTP_FOUND=yes else AST_SRTP_FOUND=no @@ -27127,7 +27048,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SRTP_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default" -if test "x$ac_cv_header_srtp_srtp_h" = x""yes; then : +if test "x$ac_cv_header_srtp_srtp_h" = xyes; then : SRTP_HEADER_FOUND=1 else SRTP_HEADER_FOUND=0 @@ -27224,7 +27145,7 @@ fi set dummy ${ac_tool_prefix}gmime-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_GMIME+set}" = set; then : +if ${ac_cv_path_CONFIG_GMIME+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_GMIME in @@ -27268,7 +27189,7 @@ if test -z "$ac_cv_path_CONFIG_GMIME"; then set dummy gmime-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_GMIME+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_GMIME+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_GMIME in @@ -27403,7 +27324,7 @@ if test "x${PBX_HOARD}" != "x1" -a "${USE_HOARD}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_hoard_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lhoard" >&5 $as_echo_n "checking for ${pbxfuncname} in -lhoard... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27438,8 +27359,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_HOARD_FOUND=yes else AST_HOARD_FOUND=no @@ -27462,7 +27382,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${HOARD_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "" "ac_cv_header_" "$ac_includes_default" -if test "x$ac_cv_header_" = x""yes; then : +if test "x$ac_cv_header_" = xyes; then : HOARD_HEADER_FOUND=1 else HOARD_HEADER_FOUND=0 @@ -27509,7 +27429,7 @@ if test "x${PBX_FREETDS}" != "x1" -a "${USE_FREETDS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_sybdb_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsybdb" >&5 $as_echo_n "checking for ${pbxfuncname} in -lsybdb... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27544,8 +27464,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_FREETDS_FOUND=yes else AST_FREETDS_FOUND=no @@ -27568,7 +27487,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${FREETDS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "sybdb.h" "ac_cv_header_sybdb_h" "$ac_includes_default" -if test "x$ac_cv_header_sybdb_h" = x""yes; then : +if test "x$ac_cv_header_sybdb_h" = xyes; then : FREETDS_HEADER_FOUND=1 else FREETDS_HEADER_FOUND=0 @@ -27597,7 +27516,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tone_zone_find_by_num in -ltonezone" >&5 $as_echo_n "checking for tone_zone_find_by_num in -ltonezone... " >&6; } -if test "${ac_cv_lib_tonezone_tone_zone_find_by_num+set}" = set; then : +if ${ac_cv_lib_tonezone_tone_zone_find_by_num+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27631,7 +27550,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tonezone_tone_zone_find_by_num" >&5 $as_echo "$ac_cv_lib_tonezone_tone_zone_find_by_num" >&6; } -if test "x$ac_cv_lib_tonezone_tone_zone_find_by_num" = x""yes; then : +if test "x$ac_cv_lib_tonezone_tone_zone_find_by_num" = xyes; then : tonezone_does_not_need_lm=yes else tonezone_does_not_need_lm=no @@ -27662,7 +27581,7 @@ if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_tonezone_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltonezone" >&5 $as_echo_n "checking for ${pbxfuncname} in -ltonezone... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27697,8 +27616,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_TONEZONE_FOUND=yes else AST_TONEZONE_FOUND=no @@ -27721,7 +27639,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${TONEZONE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "dahdi/tonezone.h" "ac_cv_header_dahdi_tonezone_h" "$ac_includes_default" -if test "x$ac_cv_header_dahdi_tonezone_h" = x""yes; then : +if test "x$ac_cv_header_dahdi_tonezone_h" = xyes; then : TONEZONE_HEADER_FOUND=1 else TONEZONE_HEADER_FOUND=0 @@ -27770,7 +27688,7 @@ if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lvorbis" >&5 $as_echo_n "checking for ${pbxfuncname} in -lvorbis... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27805,8 +27723,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_VORBIS_FOUND=yes else AST_VORBIS_FOUND=no @@ -27829,7 +27746,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${VORBIS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "vorbis/codec.h" "ac_cv_header_vorbis_codec_h" "$ac_includes_default" -if test "x$ac_cv_header_vorbis_codec_h" = x""yes; then : +if test "x$ac_cv_header_vorbis_codec_h" = xyes; then : VORBIS_HEADER_FOUND=1 else VORBIS_HEADER_FOUND=0 @@ -27876,7 +27793,7 @@ if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lvorbis" >&5 $as_echo_n "checking for ${pbxfuncname} in -lvorbis... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27911,8 +27828,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_VORBIS_FOUND=yes else AST_VORBIS_FOUND=no @@ -27935,7 +27851,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${VORBIS_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "vorbis/codec.h" "ac_cv_header_vorbis_codec_h" "$ac_includes_default" -if test "x$ac_cv_header_vorbis_codec_h" = x""yes; then : +if test "x$ac_cv_header_vorbis_codec_h" = xyes; then : VORBIS_HEADER_FOUND=1 else VORBIS_HEADER_FOUND=0 @@ -28098,7 +28014,7 @@ if test "x${PBX_ZLIB}" != "x1" -a "${USE_ZLIB}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_z_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lz" >&5 $as_echo_n "checking for ${pbxfuncname} in -lz... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28133,8 +28049,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_ZLIB_FOUND=yes else AST_ZLIB_FOUND=no @@ -28157,7 +28072,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${ZLIB_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : +if test "x$ac_cv_header_zlib_h" = xyes; then : ZLIB_HEADER_FOUND=1 else ZLIB_HEADER_FOUND=0 @@ -28216,7 +28131,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi ac_fn_c_check_header_mongrel "$LINENO" "h323.h" "ac_cv_header_h323_h" "$ac_includes_default" -if test "x$ac_cv_header_h323_h" = x""yes; then : +if test "x$ac_cv_header_h323_h" = xyes; then : PBX_H323=1 else PBX_H323=0 @@ -28226,7 +28141,7 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_compiler_h" = x""yes; then : +if test "x$ac_cv_header_linux_compiler_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_COMPILER_H 1 @@ -28243,7 +28158,7 @@ ac_fn_c_check_header_compile "$LINENO" "linux/ixjuser.h" "ac_cv_header_linux_ixj #endif " -if test "x$ac_cv_header_linux_ixjuser_h" = x""yes; then : +if test "x$ac_cv_header_linux_ixjuser_h" = xyes; then : PBX_IXJUSER=1 else PBX_IXJUSER=0 @@ -28354,7 +28269,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext set dummy ${ac_tool_prefix}sdl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CONFIG_SDL+set}" = set; then : +if ${ac_cv_path_CONFIG_SDL+:} false; then : $as_echo_n "(cached) " >&6 else case $CONFIG_SDL in @@ -28398,7 +28313,7 @@ if test -z "$ac_cv_path_CONFIG_SDL"; then set dummy sdl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_CONFIG_SDL+set}" = set; then : +if ${ac_cv_path_ac_pt_CONFIG_SDL+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_CONFIG_SDL in @@ -28516,7 +28431,7 @@ if test "x${PBX_SDL_IMAGE}" != "x1" -a "${USE_SDL_IMAGE}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_SDL_image_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lSDL_image" >&5 $as_echo_n "checking for ${pbxfuncname} in -lSDL_image... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28551,8 +28466,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_SDL_IMAGE_FOUND=yes else AST_SDL_IMAGE_FOUND=no @@ -28575,7 +28489,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${SDL_IMAGE_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "SDL_image.h" "ac_cv_header_SDL_image_h" "$ac_includes_default" -if test "x$ac_cv_header_SDL_image_h" = x""yes; then : +if test "x$ac_cv_header_SDL_image_h" = xyes; then : SDL_IMAGE_HEADER_FOUND=1 else SDL_IMAGE_HEADER_FOUND=0 @@ -28621,7 +28535,7 @@ if test "x${PBX_FFMPEG}" != "x1" -a "${USE_FFMPEG}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_avcodec_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lavcodec" >&5 $as_echo_n "checking for ${pbxfuncname} in -lavcodec... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28656,8 +28570,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_FFMPEG_FOUND=yes else AST_FFMPEG_FOUND=no @@ -28680,7 +28593,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${FFMPEG_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "ffmpeg/avcodec.h" "ac_cv_header_ffmpeg_avcodec_h" "$ac_includes_default" -if test "x$ac_cv_header_ffmpeg_avcodec_h" = x""yes; then : +if test "x$ac_cv_header_ffmpeg_avcodec_h" = xyes; then : FFMPEG_HEADER_FOUND=1 else FFMPEG_HEADER_FOUND=0 @@ -28709,7 +28622,7 @@ fi # possible places for video4linux version 1 ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev.h" "ac_cv_header_linux_videodev_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_videodev_h" = x""yes; then : +if test "x$ac_cv_header_linux_videodev_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VIDEODEV_H 1 @@ -28740,7 +28653,7 @@ if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lX11" >&5 $as_echo_n "checking for ${pbxfuncname} in -lX11... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28775,8 +28688,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_X11_FOUND=yes else AST_X11_FOUND=no @@ -28799,7 +28711,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xlib_h" = x""yes; then : +if test "x$ac_cv_header_X11_Xlib_h" = xyes; then : X11_HEADER_FOUND=1 else X11_HEADER_FOUND=0 @@ -28849,7 +28761,7 @@ if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then as_ac_Lib=`$as_echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lX11" >&5 $as_echo_n "checking for ${pbxfuncname} in -lX11... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28884,8 +28796,7 @@ fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : AST_X11_FOUND=yes else AST_X11_FOUND=no @@ -28908,7 +28819,7 @@ fi ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE}" ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xlib_h" = x""yes; then : +if test "x$ac_cv_header_X11_Xlib_h" = xyes; then : X11_HEADER_FOUND=1 else X11_HEADER_FOUND=0 @@ -28944,11 +28855,11 @@ if test "${cross_compiling}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /sbin/launchd" >&5 $as_echo_n "checking for /sbin/launchd... " >&6; } -if test "${ac_cv_file__sbin_launchd+set}" = set; then : +if ${ac_cv_file__sbin_launchd+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/sbin/launchd"; then ac_cv_file__sbin_launchd=yes else @@ -28957,7 +28868,7 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__sbin_launchd" >&5 $as_echo "$ac_cv_file__sbin_launchd" >&6; } -if test "x$ac_cv_file__sbin_launchd" = x""yes; then : +if test "x$ac_cv_file__sbin_launchd" = xyes; then : $as_echo "#define HAVE_SBIN_LAUNCHD 1" >>confdefs.h @@ -29623,10 +29534,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -29642,6 +29564,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -29657,7 +29580,7 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -29758,6 +29681,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -29803,19 +29727,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -30011,7 +29935,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -30065,7 +29989,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by asterisk $as_me trunk, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -30127,10 +30051,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ asterisk config.status trunk -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -30147,11 +30071,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -30173,6 +30102,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -30185,7 +30115,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -30194,7 +30124,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -30248,7 +30178,7 @@ do "makeopts") CONFIG_FILES="$CONFIG_FILES makeopts" ;; "channels/h323/Makefile") CONFIG_FILES="$CONFIG_FILES channels/h323/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -30270,9 +30200,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -30280,12 +30211,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -30302,12 +30234,12 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -30316,18 +30248,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -30335,7 +30267,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -30383,7 +30315,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -30415,21 +30347,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -30441,7 +30381,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -30453,11 +30393,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -30542,7 +30482,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -30555,7 +30495,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -30574,7 +30514,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -30583,7 +30523,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -30609,8 +30549,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -30740,23 +30680,24 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -30765,21 +30706,21 @@ which seems to be undefined. Please make sure it is defined." >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -30794,7 +30735,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -30815,7 +30756,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/configure.ac b/configure.ac index aa9d592e48..63b434e7f5 100644 --- a/configure.ac +++ b/configure.ac @@ -993,15 +993,20 @@ else fi AC_SUBST(AST_SHADOW_WARNINGS) -AC_MSG_CHECKING(for -march=native) +AC_MSG_CHECKING(for -march=native support) if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then - AC_MSG_RESULT(yes) - AST_MARCH_NATIVE="-march=native" + if test "${CONFIG_CFLAGS}" = ""; then + AC_MSG_RESULT(yes) + AST_NATIVE_ARCH=1 + else + AC_MSG_RESULT(user CFLAGS present) + AST_NATIVE_ARCH= + fi else AC_MSG_RESULT(no) - AST_MARCH_NATIVE= + AST_NATIVE_ARCH= fi -AC_SUBST(AST_MARCH_NATIVE) +AC_SUBST(AST_NATIVE_ARCH) AC_MSG_CHECKING(for sysinfo) AC_LINK_IFELSE( diff --git a/formats/format_g719.c b/formats/format_g719.c index aace0edc73..ee9221230d 100644 --- a/formats/format_g719.c +++ b/formats/format_g719.c @@ -82,11 +82,20 @@ static int g719seek(struct ast_filestream *fs, off_t sample_offset, int whence) sample_offset = SAMPLES_TO_BYTES(sample_offset); - cur = ftello(fs->f); + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } - fseeko(fs->f, 0, SEEK_END); + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } - max = ftello(fs->f); + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } if (whence == SEEK_SET) offset = sample_offset; @@ -106,7 +115,18 @@ static int g719seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int g719trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + return ftruncate(fd, cur); } static off_t g719tell(struct ast_filestream *fs) diff --git a/formats/format_g723.c b/formats/format_g723.c index 7eba741475..c3c194d152 100644 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -118,10 +118,19 @@ static int g723_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int g723_trunc(struct ast_filestream *fs) { - /* Truncate file to current length */ - if (ftruncate(fileno(fs->f), ftello(fs->f)) < 0) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for g723 filestream %p: %s\n", fs, strerror(errno)); return -1; - return 0; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in g723 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t g723_tell(struct ast_filestream *fs) diff --git a/formats/format_g729.c b/formats/format_g729.c index 042977728c..f11fa97d96 100644 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -113,10 +113,19 @@ static int g729_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int g729_trunc(struct ast_filestream *fs) { - /* Truncate file to current length */ - if (ftruncate(fileno(fs->f), ftello(fs->f)) < 0) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for g729 filestream %p: %s\n", fs, strerror(errno)); return -1; - return 0; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in g729 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t g729_tell(struct ast_filestream *fs) diff --git a/formats/format_gsm.c b/formats/format_gsm.c index 03419c2f61..47ed41c3ad 100644 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -108,20 +108,33 @@ static int gsm_write(struct ast_filestream *fs, struct ast_frame *f) static int gsm_seek(struct ast_filestream *fs, off_t sample_offset, int whence) { - off_t offset=0,min,cur,max,distance; - - min = 0; - cur = ftello(fs->f); - fseeko(fs->f, 0, SEEK_END); - max = ftello(fs->f); + off_t offset = 0, min = 0, cur, max, distance; + + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* have to fudge to frame here, so not fully to sample */ - distance = (sample_offset/GSM_SAMPLES) * GSM_FRAME_SIZE; - if(whence == SEEK_SET) + distance = (sample_offset / GSM_SAMPLES) * GSM_FRAME_SIZE; + if (whence == SEEK_SET) { offset = distance; - else if(whence == SEEK_CUR || whence == SEEK_FORCECUR) + } else if (whence == SEEK_CUR || whence == SEEK_FORCECUR) { offset = distance + cur; - else if(whence == SEEK_END) + } else if (whence == SEEK_END) { offset = max - distance; + } + /* Always protect against seeking past the begining. */ offset = (offset < min)?min:offset; if (whence != SEEK_FORCECUR) { @@ -140,13 +153,31 @@ static int gsm_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int gsm_trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for gsm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in gsm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t gsm_tell(struct ast_filestream *fs) { off_t offset = ftello(fs->f); - return (offset/GSM_FRAME_SIZE)*GSM_SAMPLES; + + if (offset < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine offset for gsm filestream %p: %s\n", fs, strerror(errno)); + return 0; + } + + return (offset / GSM_FRAME_SIZE) * GSM_SAMPLES; } static struct ast_format_def gsm_f = { diff --git a/formats/format_h263.c b/formats/format_h263.c index 77c1229c38..bf7d167fd1 100644 --- a/formats/format_h263.c +++ b/formats/format_h263.c @@ -147,10 +147,19 @@ static int h263_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int h263_trunc(struct ast_filestream *fs) { - /* Truncate file to current length */ - if (ftruncate(fileno(fs->f), ftello(fs->f)) < 0) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for h263 filestream %p: %s\n", fs, strerror(errno)); return -1; - return 0; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in h263 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t h263_tell(struct ast_filestream *fs) diff --git a/formats/format_h264.c b/formats/format_h264.c index 155f469759..3f8c42ed1b 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -140,10 +140,19 @@ static int h264_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int h264_trunc(struct ast_filestream *fs) { - /* Truncate file to current length */ - if (ftruncate(fileno(fs->f), ftell(fs->f)) < 0) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for h264 filestream %p: %s\n", fs, strerror(errno)); return -1; - return 0; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in h264 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t h264_tell(struct ast_filestream *fs) diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c index 7a08ca515c..07155b717d 100644 --- a/formats/format_ilbc.c +++ b/formats/format_ilbc.c @@ -111,10 +111,19 @@ static int ilbc_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int ilbc_trunc(struct ast_filestream *fs) { - /* Truncate file to current length */ - if (ftruncate(fileno(fs->f), ftello(fs->f)) < 0) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for iLBC filestream %p: %s\n", fs, strerror(errno)); return -1; - return 0; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in iLBC filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t ilbc_tell(struct ast_filestream *fs) diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c index bbd053e985..b83ff251b0 100644 --- a/formats/format_ogg_vorbis.c +++ b/formats/format_ogg_vorbis.c @@ -305,7 +305,7 @@ static struct ast_frame *ogg_vorbis_read(struct ast_filestream *fs, long bytes_read; if (desc->writing) { - ast_log(LOG_WARNING, "Reading is not suport on OGG/Vorbis on write files."); + ast_log(LOG_WARNING, "Reading is not suport on OGG/Vorbis on write files.\n"); return NULL; } diff --git a/formats/format_pcm.c b/formats/format_pcm.c index 3bf27388c6..b763b55925 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -105,9 +105,20 @@ static int pcm_seek(struct ast_filestream *fs, off_t sample_offset, int whence) off_t cur, max, offset = 0; int ret = -1; /* assume error */ - cur = ftello(fs->f); - fseeko(fs->f, 0, SEEK_END); - max = ftello(fs->f); + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in pcm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of pcm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in pcm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } switch (whence) { case SEEK_SET: @@ -151,7 +162,18 @@ static int pcm_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int pcm_trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); + int cur, fd; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for pcm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in pcm filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t pcm_tell(struct ast_filestream *fs) @@ -374,7 +396,7 @@ static int au_rewrite(struct ast_filestream *s, const char *comment) /* XXX check this, probably incorrect */ static int au_seek(struct ast_filestream *fs, off_t sample_offset, int whence) { - off_t min, max, cur; + off_t min = AU_HEADER_SIZE, max, cur; long offset = 0, bytes; if (fs->fmt->format.id == AST_FORMAT_G722) @@ -382,10 +404,20 @@ static int au_seek(struct ast_filestream *fs, off_t sample_offset, int whence) else bytes = sample_offset; - min = AU_HEADER_SIZE; - cur = ftello(fs->f); - fseek(fs->f, 0, SEEK_END); - max = ftello(fs->f); + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in au filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of au filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in au filestream %p: %s\n", fs, strerror(errno)); + return -1; + } if (whence == SEEK_SET) offset = bytes + min; @@ -406,8 +438,21 @@ static int au_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int au_trunc(struct ast_filestream *fs) { - if (ftruncate(fileno(fs->f), ftell(fs->f))) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for au filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in au filestream %p: %s\n", fs, strerror(errno)); return -1; + } + /* Truncate file to current length */ + if (ftruncate(fd, cur)) { + return -1; + } return update_header(fs->f); } diff --git a/formats/format_siren14.c b/formats/format_siren14.c index 1ce50fad4b..77a9fe3efb 100644 --- a/formats/format_siren14.c +++ b/formats/format_siren14.c @@ -82,11 +82,20 @@ static int siren14seek(struct ast_filestream *fs, off_t sample_offset, int whenc sample_offset = SAMPLES_TO_BYTES(sample_offset); - cur = ftello(fs->f); + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in siren14 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } - fseeko(fs->f, 0, SEEK_END); + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of siren14 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } - max = ftello(fs->f); + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in siren14 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } if (whence == SEEK_SET) offset = sample_offset; @@ -106,7 +115,19 @@ static int siren14seek(struct ast_filestream *fs, off_t sample_offset, int whenc static int siren14trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for siren14 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in siren14 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t siren14tell(struct ast_filestream *fs) diff --git a/formats/format_siren7.c b/formats/format_siren7.c index 2e5182d3c6..35e2a34600 100644 --- a/formats/format_siren7.c +++ b/formats/format_siren7.c @@ -82,11 +82,20 @@ static int siren7seek(struct ast_filestream *fs, off_t sample_offset, int whence sample_offset = SAMPLES_TO_BYTES(sample_offset); - cur = ftello(fs->f); + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in siren7 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } - fseeko(fs->f, 0, SEEK_END); + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of siren7 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } - max = ftello(fs->f); + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in siren7 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } if (whence == SEEK_SET) offset = sample_offset; @@ -106,7 +115,19 @@ static int siren7seek(struct ast_filestream *fs, off_t sample_offset, int whence static int siren7trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for siren7 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in siren7 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t siren7tell(struct ast_filestream *fs) diff --git a/formats/format_sln.c b/formats/format_sln.c index 1a73cdfbbf..30a1ebe316 100644 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -72,13 +72,25 @@ static int generic_write(struct ast_filestream *fs, struct ast_frame *f, enum as static int slinear_seek(struct ast_filestream *fs, off_t sample_offset, int whence) { - off_t offset=0,min,cur,max; + off_t offset=0, min = 0, cur, max; - min = 0; sample_offset <<= 1; - cur = ftello(fs->f); - fseeko(fs->f, 0, SEEK_END); - max = ftello(fs->f); + + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in sln filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of sln filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in sln filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if (whence == SEEK_SET) offset = sample_offset; else if (whence == SEEK_CUR || whence == SEEK_FORCECUR) @@ -95,7 +107,19 @@ static int slinear_seek(struct ast_filestream *fs, off_t sample_offset, int when static int slinear_trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for sln filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in sln filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur); } static off_t slinear_tell(struct ast_filestream *fs) diff --git a/formats/format_vox.c b/formats/format_vox.c index 7d34df99cb..f640021d8b 100644 --- a/formats/format_vox.c +++ b/formats/format_vox.c @@ -78,32 +78,54 @@ static int vox_write(struct ast_filestream *s, struct ast_frame *f) static int vox_seek(struct ast_filestream *fs, off_t sample_offset, int whence) { - off_t offset=0,min,cur,max,distance; - - min = 0; - cur = ftello(fs->f); - fseeko(fs->f, 0, SEEK_END); - max = ftello(fs->f); - - /* have to fudge to frame here, so not fully to sample */ - distance = sample_offset/2; - if(whence == SEEK_SET) - offset = distance; - else if(whence == SEEK_CUR || whence == SEEK_FORCECUR) - offset = distance + cur; - else if(whence == SEEK_END) - offset = max - distance; - if (whence != SEEK_FORCECUR) { - offset = (offset > max)?max:offset; - offset = (offset < min)?min:offset; - } - return fseeko(fs->f, offset, SEEK_SET); + off_t offset = 0, min = 0, cur, max, distance; + + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in g719 filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + /* have to fudge to frame here, so not fully to sample */ + distance = sample_offset/2; + if (whence == SEEK_SET) { + offset = distance; + } else if (whence == SEEK_CUR || whence == SEEK_FORCECUR) { + offset = distance + cur; + } else if (whence == SEEK_END) { + offset = max - distance; + } + if (whence != SEEK_FORCECUR) { + offset = (offset > max)?max:offset; + offset = (offset < min)?min:offset; + } + return fseeko(fs->f, offset, SEEK_SET); } static int vox_trunc(struct ast_filestream *fs) { - return ftruncate(fileno(fs->f), ftello(fs->f)); -} + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for vox filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in vox filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + return ftruncate(fd, cur);} static off_t vox_tell(struct ast_filestream *fs) { diff --git a/formats/format_wav.c b/formats/format_wav.c index 78b3a7fa11..4e2418646e 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -42,6 +42,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #define WAV_BUF_SIZE 320 +#define WAV_HEADER_SIZE 44 + struct wav_desc { /* format-specific parameters */ int hz; int bytes; @@ -452,13 +454,25 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f) static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence) { - off_t min, max, cur, offset = 0, samples; + off_t min = WAV_HEADER_SIZE, max, cur, offset = 0, samples; samples = sample_offset * 2; /* SLINEAR is 16 bits mono, so sample_offset * 2 = bytes */ - min = 44; /* wav header is 44 bytes */ - cur = ftello(fs->f); - fseeko(fs->f, 0, SEEK_END); - max = ftello(fs->f); + + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in wav filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of wav filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in wav filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if (whence == SEEK_SET) offset = samples + min; else if (whence == SEEK_CUR || whence == SEEK_FORCECUR) @@ -475,8 +489,21 @@ static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int wav_trunc(struct ast_filestream *fs) { - if (ftruncate(fileno(fs->f), ftello(fs->f))) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for wav filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in wav filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Truncate file to current length */ + if (ftruncate(fd, cur)) { return -1; + } return update_header(fs->f); } diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index 35d4339f96..f08e9ce21e 100644 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -475,13 +475,25 @@ static int wav_write(struct ast_filestream *s, struct ast_frame *f) static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence) { - off_t offset=0, distance, max; + off_t offset = 0, min = MSGSM_DATA_OFFSET, distance, max, cur; struct wavg_desc *s = (struct wavg_desc *)fs->_private; - off_t min = MSGSM_DATA_OFFSET; - off_t cur = ftello(fs->f); - fseek(fs->f, 0, SEEK_END); - max = ftello(fs->f); /* XXX ideally, should round correctly */ + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in WAV filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + if (fseeko(fs->f, 0, SEEK_END) < 0) { + ast_log(AST_LOG_WARNING, "Unable to seek to end of WAV filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + + /* XXX ideally, should round correctly */ + if ((max = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine max position in WAV filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + /* Compute the distance in bytes, rounded to the block size */ distance = (sample_offset/MSGSM_SAMPLES) * MSGSM_FRAME_SIZE; if (whence == SEEK_SET) @@ -511,8 +523,21 @@ static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence) static int wav_trunc(struct ast_filestream *fs) { - if (ftruncate(fileno(fs->f), ftello(fs->f))) + int fd; + off_t cur; + + if ((fd = fileno(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for WAV filestream %p: %s\n", fs, strerror(errno)); + return -1; + } + if ((cur = ftello(fs->f)) < 0) { + ast_log(AST_LOG_WARNING, "Unable to determine current position in WAV filestream %p: %s\n", fs, strerror(errno)); return -1; + } + /* Truncate file to current length */ + if (ftruncate(fd, cur)) { + return -1; + } return update_header(fs->f); } diff --git a/funcs/func_channel.c b/funcs/func_channel.c index 0f27a3be8c..da015d5d7c 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -464,7 +464,7 @@ static int func_channel_write_real(struct ast_channel *chan, const char *functio ret = ast_channel_trace_disable(chan); else { ret = -1; - ast_log(LOG_WARNING, "Invalid value for CHANNEL(trace)."); + ast_log(LOG_WARNING, "Invalid value for CHANNEL(trace).\n"); } ast_channel_unlock(chan); } diff --git a/funcs/func_curl.c b/funcs/func_curl.c index e011461fe0..a4328b9239 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -302,6 +302,7 @@ static int acf_curlopt_write(struct ast_channel *chan, const char *cmd, char *na if (!(list = ast_calloc(1, sizeof(*list)))) { ast_log(LOG_ERROR, "Unable to allocate list head. Cannot set any CURL options\n"); ast_datastore_free(store); + return -1; } store->data = list; diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c index 274f1ac039..1b1318a5d2 100644 --- a/funcs/func_devstate.c +++ b/funcs/func_devstate.c @@ -250,7 +250,7 @@ static char *handle_cli_devstate_change(struct ast_cli_entry *e, int cmd, struct " Change a custom device to a new state.\n" " The possible values for the state are:\n" "UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING\n" - "RINGINUSE | ONHOLD\n", + "RINGINUSE | ONHOLD\n" "\n" "Examples:\n" " devstate change Custom:mystate1 INUSE\n" diff --git a/funcs/func_env.c b/funcs/func_env.c index c7b431dca8..cbc80e8d80 100644 --- a/funcs/func_env.c +++ b/funcs/func_env.c @@ -510,7 +510,11 @@ static int file_read(struct ast_channel *chan, const char *cmd, char *data, stru if (offset < 0) { fseeko(ff, offset, SEEK_END); - offset = ftello(ff); + if ((offset = ftello(ff)) < 0) { + ast_log(AST_LOG_ERROR, "Cannot determine offset position of '%s': %s\n", args.filename, strerror(errno)); + fclose(ff); + return -1; + } } if (length < 0) { fseeko(ff, length, SEEK_END); @@ -779,11 +783,15 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con if (offset < 0) { if (fseeko(ff, offset, SEEK_END)) { - ast_log(LOG_ERROR, "Cannot seek to offset: %s\n", strerror(errno)); + ast_log(LOG_ERROR, "Cannot seek to offset of '%s': %s\n", args.filename, strerror(errno)); + fclose(ff); + return -1; + } + if ((offset = ftello(ff)) < 0) { + ast_log(AST_LOG_ERROR, "Cannot determine offset position of '%s': %s\n", args.filename, strerror(errno)); fclose(ff); return -1; } - offset = ftello(ff); } if (length < 0) { @@ -945,10 +953,13 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con } else if (!strchr(args.options, 'd') && fwrite(format2term(newline_format), 1, strlen(format2term(newline_format)), ff) < strlen(format2term(newline_format))) { ast_log(LOG_ERROR, "Short write?!!\n"); } - truncsize = ftello(ff); + if ((truncsize = ftello(ff)) < 0) { + ast_log(AST_LOG_ERROR, "Unable to determine truncate position of '%s': %s\n", args.filename, strerror(errno)); + } fclose(ff); - if (truncate(args.filename, truncsize)) { - ast_log(LOG_ERROR, "Unable to truncate file: %s\n", strerror(errno)); + if (truncsize >= 0 && truncate(args.filename, truncsize)) { + ast_log(LOG_ERROR, "Unable to truncate file '%s': %s\n", args.filename, strerror(errno)); + return -1; } } else { int64_t offset_offset = (offset == 0 ? 0 : -1), length_offset = -1, flength, i, current_length = 0; @@ -970,7 +981,11 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con fclose(ff); return -1; } - flength = ftello(ff); + if ((flength = ftello(ff)) < 0) { + ast_log(AST_LOG_ERROR, "Cannot determine end position of file '%s': %s\n", args.filename, strerror(errno)); + fclose(ff); + return -1; + } /* For negative offset and/or negative length */ if (offset < 0 || length < 0) { @@ -1115,6 +1130,11 @@ static int file_write(struct ast_channel *chan, const char *cmd, char *data, con return -1; } while ((cur = ftello(ff)) < flength) { + if (cur < 0) { + ast_log(AST_LOG_ERROR, "Unable to determine last write position for '%s': %s\n", args.filename, strerror(errno)); + fclose(ff); + return -1; + } fseeko(ff, length_length - vlen, SEEK_CUR); if (fread(fbuf, 1, sizeof(fbuf), ff) < sizeof(fbuf) && !feof(ff)) { ast_log(LOG_ERROR, "Short read?!!\n"); diff --git a/funcs/func_global.c b/funcs/func_global.c index 6b158aafbb..201f075d47 100644 --- a/funcs/func_global.c +++ b/funcs/func_global.c @@ -243,14 +243,15 @@ static int shared_write(struct ast_channel *chan, const char *cmd, char *data, c varshead = varstore->data; /* Protected by the channel lock */ - AST_LIST_TRAVERSE(varshead, var, entries) { + AST_LIST_TRAVERSE_SAFE_BEGIN(varshead, var, entries) { /* If there's a previous value, remove it */ if (!strcmp(args.var, ast_var_name(var))) { - AST_LIST_REMOVE(varshead, var, entries); + AST_LIST_REMOVE_CURRENT(entries); ast_var_delete(var); break; } } + AST_LIST_TRAVERSE_SAFE_END; var = ast_var_assign(args.var, S_OR(value, "")); AST_LIST_INSERT_HEAD(varshead, var, entries); diff --git a/funcs/func_strings.c b/funcs/func_strings.c index 5d7569bfef..e91a65bb3c 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -1229,7 +1229,7 @@ static int quote(struct ast_channel *chan, const char *cmd, char *data, char *bu char *bufptr = buf, *dataptr = data; if (len < 3){ /* at least two for quotes and one for binary zero */ - ast_log(LOG_ERROR, "Not enough buffer"); + ast_log(LOG_ERROR, "Not enough buffer\n"); return -1; } @@ -1268,7 +1268,7 @@ static int csv_quote(struct ast_channel *chan, const char *cmd, char *data, char char *bufptr = buf, *dataptr = data; if (len < 3) { /* at least two for quotes and one for binary zero */ - ast_log(LOG_ERROR, "Not enough buffer"); + ast_log(LOG_ERROR, "Not enough buffer\n"); return -1; } diff --git a/funcs/func_sysinfo.c b/funcs/func_sysinfo.c index a7e358bb83..dce392f29f 100644 --- a/funcs/func_sysinfo.c +++ b/funcs/func_sysinfo.c @@ -31,7 +31,7 @@ #include "asterisk.h" -ASTERISK_FILE_VERSION(__FILE__, "$Revision: 87233 $") +ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #if defined(HAVE_SYSINFO) #include diff --git a/funcs/func_version.c b/funcs/func_version.c index d8ba757a40..da733d1e36 100644 --- a/funcs/func_version.c +++ b/funcs/func_version.c @@ -48,7 +48,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") The possible values are: - A string of digits is returned (right now fixed at 999999). + A string of digits is returned, e.g. 10602 for 1.6.2 or 100300 for 10.3.0, + or 999999 when using an SVN build. The string representing the user's name whose account diff --git a/funcs/func_volume.c b/funcs/func_volume.c index 806564beee..39b5a8a08e 100644 --- a/funcs/func_volume.c +++ b/funcs/func_volume.c @@ -206,7 +206,7 @@ static int volume_write(struct ast_channel *chan, const char *cmd, char *data, c if (!ast_strlen_zero(args.options)) { struct ast_flags flags = { 0 }; - ast_app_parse_options(volume_opts, &flags, &data, args.options); + ast_app_parse_options(volume_opts, &flags, NULL, args.options); vi->flags = flags.flags; } else { vi->flags = 0; diff --git a/include/asterisk/time.h b/include/asterisk/time.h index c78ff2db0c..4fa08723b9 100644 --- a/include/asterisk/time.h +++ b/include/asterisk/time.h @@ -83,8 +83,9 @@ int64_t ast_tvdiff_ms(struct timeval end, struct timeval start), is handled for positive and negative numbers, by ensuring that the divisor is always positive */ - return ((end.tv_sec - start.tv_sec) * 1000) + - (((1000000 + end.tv_usec - start.tv_usec) / 1000) - 1000); + int64_t sec_dif = (int64_t)(end.tv_sec - start.tv_sec) * 1000; + int64_t usec_dif = (1000000 + end.tv_usec - start.tv_usec) / 1000 - 1000; + return sec_dif + usec_dif; } ) diff --git a/main/app.c b/main/app.c index 53a2f8a7cd..3ea7f769a1 100644 --- a/main/app.c +++ b/main/app.c @@ -369,7 +369,7 @@ int ast_app_inboxcount2(const char *mailbox, int *urgentmsgs, int *newmsgs, int if (urgentmsgs) { *urgentmsgs = 0; } - if (ast_inboxcount_func) { + if (ast_inboxcount2_func) { return ast_inboxcount2_func(mailbox, urgentmsgs, newmsgs, oldmsgs); } diff --git a/main/asterisk.c b/main/asterisk.c index 655368f3bf..ec33cb187e 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1105,6 +1105,11 @@ int ast_safe_system(const char *s) void ast_console_toggle_loglevel(int fd, int level, int state) { int x; + + if (level >= NUMLOGLEVELS) { + level = NUMLOGLEVELS - 1; + } + for (x = 0;x < AST_MAX_CONNECTS; x++) { if (fd == consoles[x].fd) { /* @@ -1260,14 +1265,17 @@ static void *netconsole(void *vconsole) { struct console *con = vconsole; char hostname[MAXHOSTNAMELEN] = ""; - char tmp[512]; + char inbuf[512]; + char outbuf[512]; + const char * const end_buf = inbuf + sizeof(inbuf); + char *start_read = inbuf; int res; struct pollfd fds[2]; - + if (gethostname(hostname, sizeof(hostname)-1)) ast_copy_string(hostname, "", sizeof(hostname)); - snprintf(tmp, sizeof(tmp), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ast_get_version()); - fdprint(con->fd, tmp); + snprintf(outbuf, sizeof(outbuf), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ast_get_version()); + fdprint(con->fd, outbuf); for (;;) { fds[0].fd = con->fd; fds[0].events = POLLIN; @@ -1283,24 +1291,49 @@ static void *netconsole(void *vconsole) continue; } if (fds[0].revents) { - res = read_credentials(con->fd, tmp, sizeof(tmp) - 1, con); - if (res < 1) { + int cmds_read, bytes_read; + if ((bytes_read = read_credentials(con->fd, start_read, end_buf - start_read, con)) < 1) { break; } - tmp[res] = 0; - if (strncmp(tmp, "cli quit after ", 15) == 0) { - ast_cli_command_multiple_full(con->uid, con->gid, con->fd, res - 15, tmp + 15); + /* XXX This will only work if it is the first command, and I'm not sure fixing it is worth the effort. */ + if (strncmp(inbuf, "cli quit after ", 15) == 0) { + ast_cli_command_multiple_full(con->uid, con->gid, con->fd, bytes_read - 15, inbuf + 15); break; } - ast_cli_command_multiple_full(con->uid, con->gid, con->fd, res, tmp); + /* ast_cli_command_multiple_full will only process individual commands terminated by a + * NULL and not trailing partial commands. */ + if (!(cmds_read = ast_cli_command_multiple_full(con->uid, con->gid, con->fd, bytes_read + start_read - inbuf, inbuf))) { + /* No commands were read. We either have a short read on the first command + * with space left, or a command that is too long */ + if (start_read + bytes_read < end_buf) { + start_read += bytes_read; + } else { + ast_log(LOG_ERROR, "Command too long! Skipping\n"); + start_read = inbuf; + } + continue; + } + if (start_read[bytes_read - 1] == '\0') { + /* The read ended on a command boundary, start reading again at the head of inbuf */ + start_read = inbuf; + continue; + } + /* If we get this far, we have left over characters that have not been processed. + * Advance to the character after the last command read by ast_cli_command_multiple_full. + * We are guaranteed to have at least cmds_read NULLs */ + while (cmds_read-- && (start_read = strchr(start_read, '\0'))) { + start_read++; + } + memmove(inbuf, start_read, end_buf - start_read); + start_read = end_buf - start_read + inbuf; } if (fds[1].revents) { - res = read_credentials(con->p[0], tmp, sizeof(tmp), con); + res = read_credentials(con->p[0], outbuf, sizeof(outbuf), con); if (res < 1) { ast_log(LOG_ERROR, "read returned %d\n", res); break; } - res = write(con->fd, tmp, res); + res = write(con->fd, outbuf, res); if (res < 1) break; } @@ -2264,6 +2297,7 @@ static int ast_el_read_char(EditLine *editline, char *cp) quit_handler(0, SHUTDOWN_FAST, 0); } } + continue; } buf[res] = '\0'; @@ -2556,7 +2590,9 @@ static char *cli_complete(EditLine *editline, int ch) if (ast_opt_remote) { snprintf(buf, sizeof(buf), "_COMMAND NUMMATCHES \"%s\" \"%s\"", lf->buffer, ptr); fdsend(ast_consock, buf); - res = read(ast_consock, buf, sizeof(buf) - 1); + if ((res = read(ast_consock, buf, sizeof(buf) - 1)) < 0) { + return (char*)(CC_ERROR); + } buf[res] = '\0'; nummatches = atoi(buf); diff --git a/main/astfd.c b/main/astfd.c index 90ded390f7..8aead62fd2 100644 --- a/main/astfd.c +++ b/main/astfd.c @@ -95,7 +95,11 @@ int __ast_fdleak_open(const char *file, int line, const char *func, const char * flags & O_NONBLOCK ? "|O_NONBLOCK" : "", flags & O_TRUNC ? "|O_TRUNC" : "", flags & O_RDWR ? "|O_RDWR" : "", +#if O_RDONLY == 0 + !(flags & (O_WRONLY | O_RDWR)) ? "|O_RDONLY" : "", +#else flags & O_RDONLY ? "|O_RDONLY" : "", +#endif flags & O_WRONLY ? "|O_WRONLY" : "", ""); flags &= ~(O_CREAT | O_APPEND | O_EXCL | O_NONBLOCK | O_TRUNC | O_RDWR | O_RDONLY | O_WRONLY); diff --git a/main/astobj2.c b/main/astobj2.c index 8066c9e59e..0c0037b7b1 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -229,11 +229,6 @@ int __ao2_ref_debug(void *user_data, const int delta, char *tag, char *file, int int __ao2_ref(void *user_data, const int delta) { - struct astobj2 *obj = INTERNAL_OBJ(user_data); - - if (obj == NULL) - return -1; - return internal_ao2_ref(user_data, delta); } diff --git a/main/audiohook.c b/main/audiohook.c index 83fec318fb..2ed9b27d1d 100644 --- a/main/audiohook.c +++ b/main/audiohook.c @@ -288,8 +288,9 @@ static struct ast_frame *audiohook_read_frame_both(struct ast_audiohook *audioho } } } + } else { + ast_debug(1, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory); } - ast_debug(1, "Failed to get %d samples from read factory %p\n", (int)samples, &audiohook->read_factory); /* Move on to the write factory... if there are enough samples, read them in */ if (usable_write) { @@ -307,8 +308,9 @@ static struct ast_frame *audiohook_read_frame_both(struct ast_audiohook *audioho } } } + } else { + ast_debug(1, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory); } - ast_debug(1, "Failed to get %d samples from write factory %p\n", (int)samples, &audiohook->write_factory); /* Basically we figure out which buffer to use... and if mixing can be done here */ if (read_buf && read_reference) { diff --git a/main/cdr.c b/main/cdr.c index 85c513e16d..2a64ce4f0a 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -554,7 +554,7 @@ void ast_cdr_merge(struct ast_cdr *to, struct ast_cdr *from) } if (ast_test_flag(to, AST_CDR_FLAG_LOCKED)) { - ast_log(LOG_WARNING, "Merging into locked CDR... no choice."); + ast_log(LOG_WARNING, "Merging into locked CDR... no choice.\n"); to = zcdr; /* safety-- if all there are is locked CDR's, then.... ?? */ lto = NULL; } diff --git a/main/cel.c b/main/cel.c index 35e851b03c..023fd571a9 100644 --- a/main/cel.c +++ b/main/cel.c @@ -80,6 +80,7 @@ static int64_t eventset; * for when they start and end on a channel. */ static struct ao2_container *appset; +static struct ao2_container *linkedids; /*! * \brief Configured date format for event timestamps @@ -360,42 +361,29 @@ const char *ast_cel_get_ama_flag_name(enum ast_cel_ama_flag flag) /* called whenever a channel is destroyed or a linkedid is changed to * potentially emit a CEL_LINKEDID_END event */ - -struct channel_find_data { - const struct ast_channel *chan; - const char *linkedid; -}; - -static int linkedid_match(void *obj, void *arg, void *data, int flags) -{ - struct ast_channel *c = obj; - struct channel_find_data *find_dat = data; - int res; - - ast_channel_lock(c); - res = (c != find_dat->chan && c->linkedid && !strcmp(find_dat->linkedid, c->linkedid)); - ast_channel_unlock(c); - - return res ? CMP_MATCH | CMP_STOP : 0; -} - void ast_cel_check_retire_linkedid(struct ast_channel *chan) { const char *linkedid = chan->linkedid; - struct channel_find_data find_dat; + char *lid; /* make sure we need to do all this work */ - if (!ast_strlen_zero(linkedid) && ast_cel_track_event(AST_CEL_LINKEDID_END)) { - struct ast_channel *tmp = NULL; - find_dat.chan = chan; - find_dat.linkedid = linkedid; - if ((tmp = ast_channel_callback(linkedid_match, NULL, &find_dat, 0))) { - tmp = ast_channel_unref(tmp); - } else { - ast_cel_report_event(chan, AST_CEL_LINKEDID_END, NULL, NULL, NULL); - } + if (ast_strlen_zero(linkedid) || !ast_cel_track_event(AST_CEL_LINKEDID_END)) { + return; + } + + if (!(lid = ao2_find(linkedids, (void *) linkedid, OBJ_POINTER))) { + ast_log(LOG_ERROR, "Something weird happened, couldn't find linkedid %s\n", linkedid); + return; + } + + /* We have a ref for each channel with this linkedid, the link and the above find, so if + * before unreffing the channel we have a refcount of 3, we're done. Unlink and report. */ + if (ao2_ref(lid, -1) == 3) { + ao2_unlink(linkedids, lid); + ast_cel_report_event(chan, AST_CEL_LINKEDID_END, NULL, NULL, NULL); } + ao2_ref(lid, -1); } struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event *event) @@ -484,23 +472,34 @@ int ast_cel_report_event(struct ast_channel *chan, enum ast_cel_event_type event const char *peername = ""; struct ast_channel *peer; - ast_channel_lock(chan); - peer = ast_bridged_channel(chan); - if (peer) { - ast_channel_ref(peer); - } - ast_channel_unlock(chan); - /* Make sure a reload is not occurring while we're checking to see if this * is an event that we care about. We could lose an important event in this * process otherwise. */ ast_mutex_lock(&reload_lock); + /* Record the linkedid of new channels if we are tracking LINKEDID_END even if we aren't + * reporting on CHANNEL_START so we can track when to send LINKEDID_END */ + if (cel_enabled && ast_cel_track_event(AST_CEL_LINKEDID_END) && event_type == AST_CEL_CHANNEL_START && chan->linkedid) { + char *lid; + if (!(lid = ao2_find(linkedids, (void *) chan->linkedid, OBJ_POINTER))) { + if (!(lid = ao2_alloc(strlen(chan->linkedid) + 1, NULL))) { + ast_mutex_unlock(&reload_lock); + return -1; + } + strcpy(lid, chan->linkedid); + if (!ao2_link(linkedids, lid)) { + ao2_ref(lid, -1); + ast_mutex_unlock(&reload_lock); + return -1; + } + /* Leave both the link and the alloc refs to show a count of 1 + the link */ + } + /* If we've found, go ahead and keep the ref to increment count of how many channels + * have this linkedid. We'll clean it up in check_retire */ + } + if (!cel_enabled || !ast_cel_track_event(event_type)) { ast_mutex_unlock(&reload_lock); - if (peer) { - ast_channel_unref(peer); - } return 0; } @@ -508,9 +507,6 @@ int ast_cel_report_event(struct ast_channel *chan, enum ast_cel_event_type event char *app; if (!(app = ao2_find(appset, (char *) chan->appl, OBJ_POINTER))) { ast_mutex_unlock(&reload_lock); - if (peer) { - ast_channel_unref(peer); - } return 0; } ao2_ref(app, -1); @@ -518,6 +514,13 @@ int ast_cel_report_event(struct ast_channel *chan, enum ast_cel_event_type event ast_mutex_unlock(&reload_lock); + ast_channel_lock(chan); + peer = ast_bridged_channel(chan); + if (peer) { + ast_channel_ref(peer); + } + ast_channel_unlock(chan); + if (peer) { ast_channel_lock(peer); peername = ast_strdupa(peer->name); @@ -641,6 +644,9 @@ static int app_cmp(void *obj, void *arg, int flags) return !strcasecmp(app1, app2) ? CMP_MATCH | CMP_STOP : 0; } +#define lid_hash app_hash +#define lid_cmp app_cmp + static void ast_cel_engine_term(void) { if (appset) { @@ -654,16 +660,16 @@ int ast_cel_engine_init(void) if (!(appset = ao2_container_alloc(NUM_APP_BUCKETS, app_hash, app_cmp))) { return -1; } - - if (do_reload()) { + if (!(linkedids = ao2_container_alloc(NUM_APP_BUCKETS, lid_hash, lid_cmp))) { ao2_ref(appset, -1); - appset = NULL; return -1; } - if (ast_cli_register(&cli_status)) { + if (do_reload() || ast_cli_register(&cli_status)) { ao2_ref(appset, -1); appset = NULL; + ao2_ref(linkedids, -1); + linkedids = NULL; return -1; } diff --git a/main/config.c b/main/config.c index 3977b67de9..68e7f86601 100644 --- a/main/config.c +++ b/main/config.c @@ -2657,84 +2657,126 @@ int ast_parse_arg(const char *arg, enum ast_parse_flags flags, va_start(ap, p_result); switch (flags & PARSE_TYPE) { case PARSE_INT32: - { + { + long int x = 0; int32_t *result = p_result; - int32_t x, def = result ? *result : 0, - high = (int32_t)0x7fffffff, - low = (int32_t)0x80000000; - /* optional argument: first default value, then range */ - if (flags & PARSE_DEFAULT) + int32_t def = result ? *result : 0, high = INT32_MAX, low = INT32_MIN; + char *endptr = NULL; + + /* optional arguments: default value and/or (low, high) */ + if (flags & PARSE_DEFAULT) { def = va_arg(ap, int32_t); - if (flags & (PARSE_IN_RANGE|PARSE_OUT_RANGE)) { - /* range requested, update bounds */ + } + if (flags & (PARSE_IN_RANGE | PARSE_OUT_RANGE)) { low = va_arg(ap, int32_t); high = va_arg(ap, int32_t); } - x = strtol(arg, NULL, 0); + if (ast_strlen_zero(arg)) { + error = 1; + goto int32_done; + } + x = strtol(arg, &endptr, 0); + if (*endptr || x < INT32_MIN || x > INT32_MAX) { + /* Parse error, or type out of int32_t bounds */ + error = 1; + goto int32_done; + } error = (x < low) || (x > high); - if (flags & PARSE_OUT_RANGE) + if (flags & PARSE_OUT_RANGE) { error = !error; - if (result) + } +int32_done: + if (result) { *result = error ? def : x; - ast_debug(3, - "extract int from [%s] in [%d, %d] gives [%d](%d)\n", - arg, low, high, - result ? *result : x, error); + } + + ast_debug(3, "extract int from [%s] in [%d, %d] gives [%ld](%d)\n", + arg, low, high, result ? *result : x, error); break; - } + } case PARSE_UINT32: - { + { + unsigned long int x = 0; uint32_t *result = p_result; - uint32_t x, def = result ? *result : 0, - low = 0, high = (uint32_t)~0; + uint32_t def = result ? *result : 0, low = 0, high = UINT32_MAX; + char *endptr = NULL; + /* optional argument: first default value, then range */ - if (flags & PARSE_DEFAULT) + if (flags & PARSE_DEFAULT) { def = va_arg(ap, uint32_t); + } if (flags & (PARSE_IN_RANGE|PARSE_OUT_RANGE)) { /* range requested, update bounds */ low = va_arg(ap, uint32_t); high = va_arg(ap, uint32_t); } - x = strtoul(arg, NULL, 0); + + if (ast_strlen_zero(arg)) { + error = 1; + goto uint32_done; + } + /* strtoul will happilly and silently negate negative numbers */ + arg = ast_skip_blanks(arg); + if (*arg == '-') { + error = 1; + goto uint32_done; + } + x = strtoul(arg, &endptr, 0); + if (*endptr || x > UINT32_MAX) { + error = 1; + goto uint32_done; + } error = (x < low) || (x > high); - if (flags & PARSE_OUT_RANGE) + if (flags & PARSE_OUT_RANGE) { error = !error; - if (result) + } +uint32_done: + if (result) { *result = error ? def : x; - ast_debug(3, - "extract uint from [%s] in [%u, %u] gives [%u](%d)\n", - arg, low, high, - result ? *result : x, error); + } + ast_debug(3, "extract uint from [%s] in [%u, %u] gives [%lu](%d)\n", + arg, low, high, result ? *result : x, error); break; - } + } case PARSE_DOUBLE: - { + { double *result = p_result; - double x, def = result ? *result : 0, - low = -HUGE_VAL, high = HUGE_VAL; + double x = 0, def = result ? *result : 0, low = -HUGE_VAL, high = HUGE_VAL; + char *endptr = NULL; /* optional argument: first default value, then range */ - if (flags & PARSE_DEFAULT) + if (flags & PARSE_DEFAULT) { def = va_arg(ap, double); - if (flags & (PARSE_IN_RANGE|PARSE_OUT_RANGE)) { + } + if (flags & (PARSE_IN_RANGE | PARSE_OUT_RANGE)) { /* range requested, update bounds */ low = va_arg(ap, double); high = va_arg(ap, double); } - x = strtod(arg, NULL); + if (ast_strlen_zero(arg)) { + error = 1; + goto double_done; + } + errno = 0; + x = strtod(arg, &endptr); + if (*endptr || errno == ERANGE) { + error = 1; + goto double_done; + } error = (x < low) || (x > high); - if (flags & PARSE_OUT_RANGE) + if (flags & PARSE_OUT_RANGE) { error = !error; - if (result) - *result = error ? def : x; - ast_debug(3, - "extract double from [%s] in [%f, %f] gives [%f](%d)\n", - arg, low, high, - result ? *result : x, error); + } +double_done: + if (result) { + *result = error ? def : x; + } + ast_debug(3, "extract double from [%s] in [%f, %f] gives [%f](%d)\n", + arg, low, high, result ? *result : x, error); break; - } + } case PARSE_ADDR: { struct ast_sockaddr *addr = (struct ast_sockaddr *)p_result; diff --git a/main/event.c b/main/event.c index 1d71c76092..ccb093038d 100644 --- a/main/event.c +++ b/main/event.c @@ -273,6 +273,7 @@ static const struct ie_map { [AST_EVENT_IE_RECEIVED_CHALLENGE] = { AST_EVENT_IE_PLTYPE_STR, "ReceivedChallenge" }, [AST_EVENT_IE_RECEIVED_HASH] = { AST_EVENT_IE_PLTYPE_STR, "ReceivedHash" }, [AST_EVENT_IE_USING_PASSWORD] = { AST_EVENT_IE_PLTYPE_UINT, "UsingPassword" }, + [AST_EVENT_IE_ATTEMPTED_TRANSPORT] = { AST_EVENT_IE_PLTYPE_STR, "AttemptedTransport" }, }; diff --git a/main/features.c b/main/features.c index 2570679eda..d66d6e365e 100644 --- a/main/features.c +++ b/main/features.c @@ -655,9 +655,10 @@ static int stopmixmonitor_ok = 1; static pthread_t parking_thread; struct ast_dial_features { - struct ast_flags features_caller; - struct ast_flags features_callee; - int is_caller; + /*! Channel's feature flags. */ + struct ast_flags my_features; + /*! Bridge peer's feature flags. */ + struct ast_flags peer_features; }; #if defined(ATXFER_NULL_TECH) @@ -761,7 +762,52 @@ static const struct ast_datastore_info dial_features_info = { .destroy = dial_features_destroy, .duplicate = dial_features_duplicate, }; - + +/*! + * \internal + * \brief Set the features datastore if it doesn't exist. + * + * \param chan Channel to add features datastore + * \param my_features The channel's feature flags + * \param peer_features The channel's bridge peer feature flags + * + * \retval TRUE if features datastore already existed. + */ +static int add_features_datastore(struct ast_channel *chan, const struct ast_flags *my_features, const struct ast_flags *peer_features) +{ + struct ast_datastore *datastore; + struct ast_dial_features *dialfeatures; + + ast_channel_lock(chan); + datastore = ast_channel_datastore_find(chan, &dial_features_info, NULL); + ast_channel_unlock(chan); + if (datastore) { + /* Already exists. */ + return 1; + } + + /* Create a new datastore with specified feature flags. */ + datastore = ast_datastore_alloc(&dial_features_info, NULL); + if (!datastore) { + ast_log(LOG_WARNING, "Unable to create channel features datastore.\n"); + return 0; + } + dialfeatures = ast_calloc(1, sizeof(*dialfeatures)); + if (!dialfeatures) { + ast_log(LOG_WARNING, "Unable to allocate memory for feature flags.\n"); + ast_datastore_free(datastore); + return 0; + } + ast_copy_flags(&dialfeatures->my_features, my_features, AST_FLAGS_ALL); + ast_copy_flags(&dialfeatures->peer_features, peer_features, AST_FLAGS_ALL); + datastore->inheritance = DATASTORE_INHERIT_FOREVER; + datastore->data = dialfeatures; + ast_channel_lock(chan); + ast_channel_datastore_add(chan, datastore); + ast_channel_unlock(chan); + return 0; +} + /* Forward declarations */ static struct ast_parkinglot *parkinglot_addref(struct ast_parkinglot *parkinglot); static void parkinglot_unref(struct ast_parkinglot *parkinglot); @@ -934,17 +980,23 @@ static void *bridge_call_thread(void *data) if (!ast_check_hangup(tobj->peer)) { ast_log(LOG_VERBOSE, "putting peer %s into PBX again\n", tobj->peer->name); res = ast_pbx_start(tobj->peer); - if (res != AST_PBX_SUCCESS) + if (res != AST_PBX_SUCCESS) { ast_log(LOG_WARNING, "FAILED continuing PBX on peer %s\n", tobj->peer->name); - } else + ast_hangup(tobj->peer); + } + } else { ast_hangup(tobj->peer); + } if (!ast_check_hangup(tobj->chan)) { ast_log(LOG_VERBOSE, "putting chan %s into PBX again\n", tobj->chan->name); res = ast_pbx_start(tobj->chan); - if (res != AST_PBX_SUCCESS) + if (res != AST_PBX_SUCCESS) { ast_log(LOG_WARNING, "FAILED continuing PBX on chan %s\n", tobj->chan->name); - } else + ast_hangup(tobj->chan); + } + } else { ast_hangup(tobj->chan); + } } else { ast_hangup(tobj->chan); ast_hangup(tobj->peer); @@ -2448,7 +2500,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st int l; struct ast_party_connected_line connected_line; struct ast_datastore *features_datastore; - struct ast_dial_features *dialfeatures = NULL; + struct ast_dial_features *dialfeatures; char *transferer_tech; char *transferer_name; char *transferer_name_orig; @@ -2498,7 +2550,13 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st return xfer_park_call_helper(transferee, transferer, park_exten); } - /* Append context to dialed transfer number. */ + /* + * Append context to dialed transfer number. + * + * NOTE: The local channel needs the /n flag so party C will use + * the feature flags set by the dialplan when calling that + * party. + */ snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context); /* If we are performing an attended transfer and we have two channels involved then @@ -2585,16 +2643,30 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st ast_set_flag(&(bconfig.features_caller), AST_FEATURE_DISCONNECT); ast_set_flag(&(bconfig.features_callee), AST_FEATURE_DISCONNECT); - /* ast_bridge_call clears AST_FLAG_BRIDGE_HANGUP_DONT, but we don't - want that to happen here because we're also in another bridge already + /* + * ast_bridge_call clears AST_FLAG_BRIDGE_HANGUP_DONT, but we + * don't want that to happen here because the transferer is in + * another bridge already. */ - if (ast_test_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT)) { + if (ast_test_flag(transferer, AST_FLAG_BRIDGE_HANGUP_DONT)) { hangup_dont = 1; } - /* Let party B and party C talk as long as they want. */ + + /* + * Don't let the after-bridge code run the h-exten. It is the + * wrong bridge to run the h-exten after. + */ + ast_set_flag(transferer, AST_FLAG_BRIDGE_HANGUP_DONT); + + /* + * Let party B and C talk as long as they want while party A + * languishes in autoservice listening to MOH. + */ ast_bridge_call(transferer, newchan, &bconfig); + if (hangup_dont) { - ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT); + /* Restore the AST_FLAG_BRIDGE_HANGUP_DONT flag */ + ast_set_flag(transferer, AST_FLAG_BRIDGE_HANGUP_DONT); } if (ast_check_hangup(newchan) || !ast_check_hangup(transferer)) { @@ -2651,7 +2723,31 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st atxfernoanswertimeout, &outstate, transferer->language); ast_debug(2, "Dial party B result: newchan:%d, outstate:%d\n", !!newchan, outstate); - if (newchan || ast_check_hangup(transferee)) { + if (newchan) { + /* + * We have recalled party B (newchan). We need to give this + * call leg the same feature flags as the original party B call + * leg. + */ + ast_channel_lock(transferer); + features_datastore = ast_channel_datastore_find(transferer, + &dial_features_info, NULL); + if (features_datastore && (dialfeatures = features_datastore->data)) { + struct ast_flags my_features = { 0 }; + struct ast_flags peer_features = { 0 }; + + ast_copy_flags(&my_features, &dialfeatures->my_features, + AST_FLAGS_ALL); + ast_copy_flags(&peer_features, &dialfeatures->peer_features, + AST_FLAGS_ALL); + ast_channel_unlock(transferer); + add_features_datastore(newchan, &my_features, &peer_features); + } else { + ast_channel_unlock(transferer); + } + break; + } + if (ast_check_hangup(transferee)) { break; } @@ -2750,33 +2846,26 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st return -1; } + tobj->chan = newchan; + tobj->peer = xferchan; + tobj->bconfig = *config; + ast_channel_lock(newchan); - if ((features_datastore = ast_channel_datastore_find(newchan, &dial_features_info, NULL))) { - dialfeatures = features_datastore->data; + features_datastore = ast_channel_datastore_find(newchan, &dial_features_info, NULL); + if (features_datastore && (dialfeatures = features_datastore->data)) { + ast_copy_flags(&tobj->bconfig.features_callee, &dialfeatures->my_features, + AST_FLAGS_ALL); } ast_channel_unlock(newchan); - if (dialfeatures) { - /* newchan should always be the callee and shows up as callee in dialfeatures, but for some reason - I don't currently understand, the abilities of newchan seem to be stored on the caller side */ - ast_copy_flags(&(config->features_callee), &(dialfeatures->features_caller), AST_FLAGS_ALL); - dialfeatures = NULL; - } - ast_channel_lock(xferchan); - if ((features_datastore = ast_channel_datastore_find(xferchan, &dial_features_info, NULL))) { - dialfeatures = features_datastore->data; + features_datastore = ast_channel_datastore_find(xferchan, &dial_features_info, NULL); + if (features_datastore && (dialfeatures = features_datastore->data)) { + ast_copy_flags(&tobj->bconfig.features_caller, &dialfeatures->my_features, + AST_FLAGS_ALL); } ast_channel_unlock(xferchan); - if (dialfeatures) { - ast_copy_flags(&(config->features_caller), &(dialfeatures->features_caller), AST_FLAGS_ALL); - } - - tobj->chan = newchan; - tobj->peer = xferchan; - tobj->bconfig = *config; - if (tobj->bconfig.end_bridge_callback_data_fixup) { tobj->bconfig.end_bridge_callback_data_fixup(&tobj->bconfig, tobj->peer, tobj->chan); } @@ -3769,60 +3858,16 @@ static void set_bridge_features_on_config(struct ast_bridge_config *config, cons static void add_features_datastores(struct ast_channel *caller, struct ast_channel *callee, struct ast_bridge_config *config) { - struct ast_datastore *ds_callee_features = NULL, *ds_caller_features = NULL; - struct ast_dial_features *callee_features = NULL, *caller_features = NULL; - - ast_channel_lock(caller); - ds_caller_features = ast_channel_datastore_find(caller, &dial_features_info, NULL); - ast_channel_unlock(caller); - if (!ds_caller_features) { - if (!(ds_caller_features = ast_datastore_alloc(&dial_features_info, NULL))) { - ast_log(LOG_WARNING, "Unable to create channel datastore for caller features. Aborting!\n"); - return; - } - if (!(caller_features = ast_calloc(1, sizeof(*caller_features)))) { - ast_log(LOG_WARNING, "Unable to allocate memory for callee feature flags. Aborting!\n"); - ast_datastore_free(ds_caller_features); - return; - } - ds_caller_features->inheritance = DATASTORE_INHERIT_FOREVER; - caller_features->is_caller = 1; - ast_copy_flags(&(caller_features->features_callee), &(config->features_callee), AST_FLAGS_ALL); - ast_copy_flags(&(caller_features->features_caller), &(config->features_caller), AST_FLAGS_ALL); - ds_caller_features->data = caller_features; - ast_channel_lock(caller); - ast_channel_datastore_add(caller, ds_caller_features); - ast_channel_unlock(caller); - } else { - /* If we don't return here, then when we do a builtin_atxfer we will copy the disconnect - * flags over from the atxfer to the caller */ + if (add_features_datastore(caller, &config->features_caller, &config->features_callee)) { + /* + * If we don't return here, then when we do a builtin_atxfer we + * will copy the disconnect flags over from the atxfer to the + * callee (Party C). + */ return; } - ast_channel_lock(callee); - ds_callee_features = ast_channel_datastore_find(callee, &dial_features_info, NULL); - ast_channel_unlock(callee); - if (!ds_callee_features) { - if (!(ds_callee_features = ast_datastore_alloc(&dial_features_info, NULL))) { - ast_log(LOG_WARNING, "Unable to create channel datastore for callee features. Aborting!\n"); - return; - } - if (!(callee_features = ast_calloc(1, sizeof(*callee_features)))) { - ast_log(LOG_WARNING, "Unable to allocate memory for callee feature flags. Aborting!\n"); - ast_datastore_free(ds_callee_features); - return; - } - ds_callee_features->inheritance = DATASTORE_INHERIT_FOREVER; - callee_features->is_caller = 0; - ast_copy_flags(&(callee_features->features_callee), &(config->features_caller), AST_FLAGS_ALL); - ast_copy_flags(&(callee_features->features_caller), &(config->features_callee), AST_FLAGS_ALL); - ds_callee_features->data = callee_features; - ast_channel_lock(callee); - ast_channel_datastore_add(callee, ds_callee_features); - ast_channel_unlock(callee); - } - - return; + add_features_datastore(callee, &config->features_callee, &config->features_caller); } static void clear_dialed_interfaces(struct ast_channel *chan) @@ -4651,8 +4696,8 @@ static int manage_parked_call(struct parkeduser *pu, const struct pollfd *pfds, char buf[MAX_DIAL_FEATURE_OPTIONS] = {0,}; snprintf(returnexten, sizeof(returnexten), "%s,30,%s", peername, - callback_dialoptions(&(dialfeatures->features_callee), - &(dialfeatures->features_caller), buf, sizeof(buf))); + callback_dialoptions(&dialfeatures->peer_features, + &dialfeatures->my_features, buf, sizeof(buf))); } else { /* Existing default */ ast_log(LOG_NOTICE, "Dial features not found on %s, using default!\n", chan->name); @@ -5191,7 +5236,7 @@ static int parked_call_exec(struct ast_channel *chan, const char *data) if (peer) { struct ast_datastore *features_datastore; - struct ast_dial_features *dialfeatures = NULL; + struct ast_dial_features *dialfeatures; /* Play a courtesy to the source(s) configured to prefix the bridge connecting */ if (!ast_strlen_zero(courtesytone)) { @@ -5235,20 +5280,10 @@ static int parked_call_exec(struct ast_channel *chan, const char *data) /* Get datastore for peer and apply it's features to the callee side of the bridge config */ ast_channel_lock(peer); - if ((features_datastore = ast_channel_datastore_find(peer, &dial_features_info, NULL))) { - dialfeatures = features_datastore->data; - } - - /* - * When the datastores for both caller and callee are created, - * both the callee and caller channels use the features_caller - * flag variable to represent themselves. With that said, the - * config.features_callee flags should be copied from the - * datastore's caller feature flags regardless if peer was a - * callee or caller. - */ - if (dialfeatures) { - ast_copy_flags(&(config.features_callee), &(dialfeatures->features_caller), AST_FLAGS_ALL); + features_datastore = ast_channel_datastore_find(peer, &dial_features_info, NULL); + if (features_datastore && (dialfeatures = features_datastore->data)) { + ast_copy_flags(&config.features_callee, &dialfeatures->my_features, + AST_FLAGS_ALL); } ast_channel_unlock(peer); diff --git a/main/format_pref.c b/main/format_pref.c index 852b650350..11308e1e01 100644 --- a/main/format_pref.c +++ b/main/format_pref.c @@ -195,6 +195,11 @@ void ast_codec_pref_prepend(struct ast_codec_pref *pref, struct ast_format *form break; } + /* If we failed to find any occurrence, set to the end */ + if (x == AST_CODEC_PREF_SIZE) { + --x; + } + if (only_if_existing && !pref->order[x]) { ast_format_list_destroy(f_list); return; @@ -274,6 +279,11 @@ struct ast_format_list ast_codec_pref_getsize(struct ast_codec_pref *pref, struc } } + if (idx < 0) { + ast_log(AST_LOG_WARNING, "Format %s unknown; unable to get preferred codec packet size\n", ast_getformatname(format)); + return fmt; + } + for (x = 0; x < f_len; x++) { if (pref->order[x] == (idx + 1)) { framems = pref->framing[x]; diff --git a/main/http.c b/main/http.c index c7e3ceb15a..5bbeca33ee 100644 --- a/main/http.c +++ b/main/http.c @@ -581,12 +581,12 @@ void ast_http_uri_unlink_all_with_key(const char *key) AST_RWLIST_TRAVERSE_SAFE_BEGIN(&uris, urih, entry) { if (!strcmp(urih->key, key)) { AST_RWLIST_REMOVE_CURRENT(entry); - } - if (urih->dmallocd) { - ast_free(urih->data); - } - if (urih->mallocd) { - ast_free(urih); + if (urih->dmallocd) { + ast_free(urih->data); + } + if (urih->mallocd) { + ast_free(urih); + } } } AST_RWLIST_TRAVERSE_SAFE_END; diff --git a/main/jitterbuf.c b/main/jitterbuf.c index a49d04e64e..40bbb554c6 100644 --- a/main/jitterbuf.c +++ b/main/jitterbuf.c @@ -242,7 +242,9 @@ static void history_calc_maxbuf(jitterbuf *jb) /* found where it fits */ if (toins > jb->hist_maxbuf[j]) { /* move over */ - memmove(jb->hist_maxbuf + j + 1, jb->hist_maxbuf + j, (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_maxbuf[0])); + if (j != JB_HISTORY_MAXBUF_SZ - 1) { + memmove(jb->hist_maxbuf + j + 1, jb->hist_maxbuf + j, (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_maxbuf[0])); + } /* insert */ jb->hist_maxbuf[j] = toins; @@ -259,7 +261,9 @@ static void history_calc_maxbuf(jitterbuf *jb) /* found where it fits */ if (toins < jb->hist_minbuf[j]) { /* move over */ - memmove(jb->hist_minbuf + j + 1, jb->hist_minbuf + j, (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_minbuf[0])); + if (j != JB_HISTORY_MAXBUF_SZ - 1) { + memmove(jb->hist_minbuf + j + 1, jb->hist_minbuf + j, (JB_HISTORY_MAXBUF_SZ - (j + 1)) * sizeof(jb->hist_minbuf[0])); + } /* insert */ jb->hist_minbuf[j] = toins; diff --git a/main/logger.c b/main/logger.c index 91d716ce0c..fcb13a9917 100644 --- a/main/logger.c +++ b/main/logger.c @@ -1374,6 +1374,9 @@ char **ast_bt_get_symbols(void **addresses, size_t num_frames) continue; } + /* file can possibly be null even with a success result from bfd_find_nearest_line */ + file = file ? file : ""; + /* Stack trace output */ found++; if ((lastslash = strrchr(file, '/'))) { diff --git a/main/manager.c b/main/manager.c index f8a4dbbd6e..350bcb30dd 100644 --- a/main/manager.c +++ b/main/manager.c @@ -3664,7 +3664,7 @@ static int action_command(struct mansession *s, const struct message *m) { const char *cmd = astman_get_header(m, "Command"); const char *id = astman_get_header(m, "ActionID"); - char *buf, *final_buf; + char *buf = NULL, *final_buf = NULL; char template[] = "/tmp/ast-ami-XXXXXX"; /* template for temporary file */ int fd; off_t l; @@ -3679,7 +3679,11 @@ static int action_command(struct mansession *s, const struct message *m) return 0; } - fd = mkstemp(template); + if ((fd = mkstemp(template)) < 0) { + ast_log(AST_LOG_WARNING, "Failed to create temporary file for command: %s\n", strerror(errno)); + astman_send_error(s, m, "Command response construction error"); + return 0; + } astman_append(s, "Response: Follows\r\nPrivilege: Command\r\n"); if (!ast_strlen_zero(id)) { @@ -3687,30 +3691,45 @@ static int action_command(struct mansession *s, const struct message *m) } /* FIXME: Wedge a ActionID response in here, waiting for later changes */ ast_cli_command(fd, cmd); /* XXX need to change this to use a FILE * */ - l = lseek(fd, 0, SEEK_END); /* how many chars available */ + /* Determine number of characters available */ + if ((l = lseek(fd, 0, SEEK_END)) < 0) { + ast_log(LOG_WARNING, "Failed to determine number of characters for command: %s\n", strerror(errno)); + goto action_command_cleanup; + } /* This has a potential to overflow the stack. Hence, use the heap. */ - buf = ast_calloc(1, l + 1); - final_buf = ast_calloc(1, l + 1); - if (buf) { - lseek(fd, 0, SEEK_SET); - if (read(fd, buf, l) < 0) { - ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno)); - } - buf[l] = '\0'; - if (final_buf) { - term_strip(final_buf, buf, l); - final_buf[l] = '\0'; - } - astman_append(s, "%s", S_OR(final_buf, buf)); - ast_free(buf); + buf = ast_malloc(l + 1); + final_buf = ast_malloc(l + 1); + + if (!buf || !final_buf) { + ast_log(LOG_WARNING, "Failed to allocate memory for temporary buffer\n"); + goto action_command_cleanup; + } + + if (lseek(fd, 0, SEEK_SET) < 0) { + ast_log(LOG_WARNING, "Failed to set position on temporary file for command: %s\n", strerror(errno)); + goto action_command_cleanup; } + + if (read(fd, buf, l) < 0) { + ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno)); + goto action_command_cleanup; + } + + buf[l] = '\0'; + term_strip(final_buf, buf, l); + final_buf[l] = '\0'; + astman_append(s, "%s", final_buf); + +action_command_cleanup: + close(fd); unlink(template); astman_append(s, "--END COMMAND--\r\n\r\n"); - if (final_buf) { - ast_free(final_buf); - } + + ast_free(buf); + ast_free(final_buf); + return 0; } @@ -5893,7 +5912,7 @@ static void process_output(struct mansession *s, struct ast_str **out, struct as fprintf(s->f, "%c", 0); fflush(s->f); - if ((l = ftell(s->f))) { + if ((l = ftell(s->f)) > 0) { if (MAP_FAILED == (buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_PRIVATE, s->fd, 0))) { ast_log(LOG_WARNING, "mmap failed. Manager output was not processed\n"); } else { diff --git a/main/message.c b/main/message.c index a57dff6b50..8028bba081 100644 --- a/main/message.c +++ b/main/message.c @@ -546,6 +546,9 @@ static int msg_set_var_full(struct ast_msg *msg, const char *name, const char *v struct msg_data *data; if (!(data = msg_data_find(msg->vars, name))) { + if (ast_strlen_zero(value)) { + return 0; + } if (!(data = msg_data_alloc())) { return -1; }; diff --git a/main/pbx.c b/main/pbx.c index 2f76aaecf9..a0284246e0 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2924,7 +2924,7 @@ struct ast_exten *pbx_find_extension(struct ast_channel *chan, } if (eval && !(tmpdata = ast_str_thread_get(&switch_data, 512))) { - ast_log(LOG_WARNING, "Can't evaluate overrideswitch?!"); + ast_log(LOG_WARNING, "Can't evaluate overrideswitch?!\n"); break; } else if (eval) { /* Substitute variables now */ @@ -3081,7 +3081,7 @@ struct ast_exten *pbx_find_extension(struct ast_channel *chan, /* Substitute variables now */ if (sw->eval) { if (!(tmpdata = ast_str_thread_get(&switch_data, 512))) { - ast_log(LOG_WARNING, "Can't evaluate switch?!"); + ast_log(LOG_WARNING, "Can't evaluate switch?!\n"); continue; } pbx_substitute_variables_helper(chan, sw->data, ast_str_buffer(tmpdata), ast_str_size(tmpdata)); diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c index 4e0fd760c9..bbbb5dbfdc 100644 --- a/main/stdtime/localtime.c +++ b/main/stdtime/localtime.c @@ -2339,7 +2339,11 @@ char *ast_strptime_locale(const char *s, const char *format, struct ast_tm *tm, prevlocale = ast_setlocale(locale); res = strptime(s, format, &tm2); ast_setlocale(prevlocale); - memcpy(tm, &tm2, sizeof(*tm)); + /* ast_time and tm are not the same size - tm is a subset of + * ast_time. Hence, the size of tm needs to be used for the + * memcpy + */ + memcpy(tm, &tm2, sizeof(tm2)); tm->tm_usec = 0; /* strptime(3) doesn't set .tm_isdst correctly, so to force ast_mktime(3) * to deal with it correctly, we set it to -1. */ diff --git a/main/tcptls.c b/main/tcptls.c index 7063b0ced1..066aa068c1 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -175,7 +175,7 @@ static void *handle_tcptls_connection(void *data) tcptls_session->f = fopencookie(tcptls_session->ssl, "w+", cookie_funcs); #else /* could add other methods here */ - ast_debug(2, "no tcptls_session->f methods attempted!"); + ast_debug(2, "no tcptls_session->f methods attempted!\n"); #endif if ((tcptls_session->client && !ast_test_flag(&tcptls_session->parent->tls_cfg->flags, AST_SSL_DONT_VERIFY_SERVER)) || (!tcptls_session->client && ast_test_flag(&tcptls_session->parent->tls_cfg->flags, AST_SSL_VERIFY_CLIENT))) { diff --git a/main/tdd.c b/main/tdd.c index 2ae80a3bec..d0334d1db4 100644 --- a/main/tdd.c +++ b/main/tdd.c @@ -69,19 +69,21 @@ static int tdd_decode_baudot(struct tdd_state *tdd,unsigned char data) /* covert '5','\"',')','2','=','6','0','1', '9','?','+','^','.','/',';','^' }; int d = 0; /* return 0 if not decodeable */ - switch (data) { - case 0x1f: - tdd->modo = 0; - break; - case 0x1b: - tdd->modo = 1; - break; - default: - if (tdd->modo == 0) - d = ltrs[data]; - else - d = figs[data]; - break; + if (data < 32) { + switch (data) { + case 0x1f: + tdd->modo = 0; + break; + case 0x1b: + tdd->modo = 1; + break; + default: + if (tdd->modo == 0) + d = ltrs[data]; + else + d = figs[data]; + break; + } } return d; } diff --git a/main/xmldoc.c b/main/xmldoc.c index 6dfca71927..ab91548f98 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -2009,7 +2009,7 @@ int ast_xmldoc_load_documentation(void) /* Get doc root node and check if it starts with '' */ root_node = ast_xml_get_root(tmpdoc); if (!root_node) { - ast_log(LOG_ERROR, "Error getting documentation root node"); + ast_log(LOG_ERROR, "Error getting documentation root node\n"); ast_xml_close(tmpdoc); continue; } diff --git a/makeopts.in b/makeopts.in index 0a136140be..9c4ae0c02a 100644 --- a/makeopts.in +++ b/makeopts.in @@ -45,7 +45,6 @@ HOST_CPU=@HOST_CPU@ HOST_VENDOR=@HOST_VENDOR@ HOST_OS=@HOST_OS@ -PROC=@HOST_CPU@ OSARCH=@OSARCH@ OSREV=@PBX_OSREV@ diff --git a/res/res_agi.c b/res/res_agi.c index c05701d38e..36397dc1d3 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1297,9 +1297,9 @@ static enum agi_result launch_asyncagi(struct ast_channel *chan, char *argv[], i setup_env(chan, "async", fds[1], 0, 0, NULL); /* read the environment */ res = read(fds[0], agi_buffer, AGI_BUF_SIZE); - if (!res) { - ast_log(LOG_ERROR, "Failed to read from Async AGI pipe on channel %s\n", - chan->name); + if (res <= 0) { + ast_log(LOG_ERROR, "Failed to read from Async AGI pipe on channel %s: %s\n", + chan->name, res < 0 ? strerror(errno) : "EOF"); returnstatus = AGI_RESULT_FAILURE; goto async_agi_abort; } @@ -1327,9 +1327,9 @@ static enum agi_result launch_asyncagi(struct ast_channel *chan, char *argv[], i * fd (the pipe), let's read the response. */ res = read(fds[0], agi_buffer, AGI_BUF_SIZE); - if (!res) { - ast_log(LOG_ERROR, "Failed to read from Async AGI pipe on channel %s\n", - chan->name); + if (res <= 0) { + ast_log(LOG_ERROR, "Failed to read from Async AGI pipe on channel %s: %s\n", + chan->name, res < 0 ? strerror(errno) : "EOF"); free_agi_cmd(cmd); returnstatus = AGI_RESULT_FAILURE; goto async_agi_done; diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c index 14fce0ca7e..f569b9eab3 100644 --- a/res/res_calendar_caldav.c +++ b/res/res_calendar_caldav.c @@ -445,7 +445,7 @@ static void caldav_add_event(icalcomponent *comp, struct icaltime_span *span, vo /* XXX Technically you can check RELATED to see if the event fires from the END of the event * But, I'm not sure I've ever seen anyone implement it in calendaring software, so I'm ignoring for now */ tmp = icaltime_add(start, trigger.duration); - event->alarm = icaltime_as_timet_with_zone(tmp, utc); + event->alarm = icaltime_as_timet_with_zone(tmp, icaltime_get_timezone(start)); } ao2_link(pvt->events, event); diff --git a/res/res_calendar_ews.c b/res/res_calendar_ews.c index 51761127eb..d33f4be4fb 100644 --- a/res/res_calendar_ews.c +++ b/res/res_calendar_ews.c @@ -424,6 +424,8 @@ static int endelm(void *userdata, int state, const char *nspace, const char *nam if (ast_str_strlen(ctx->cdata)) { attendee->data = ast_strdup(ast_str_buffer(ctx->cdata)); AST_LIST_INSERT_TAIL(&ctx->event->attendees, attendee, next); + } else { + ast_free(attendee); } ast_debug(3, "EWS: XML: attendee address '%s'\n", ast_str_buffer(ctx->cdata)); ast_str_reset(ctx->cdata); diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c index 8ef269e4f3..61a4002353 100644 --- a/res/res_calendar_icalendar.c +++ b/res/res_calendar_icalendar.c @@ -299,7 +299,7 @@ static void icalendar_add_event(icalcomponent *comp, struct icaltime_span *span, /* XXX Technically you can check RELATED to see if the event fires from the END of the event * But, I'm not sure I've ever seen anyone implement it in calendaring software, so I'm ignoring for now */ tmp = icaltime_add(start, trigger.duration); - event->alarm = icaltime_as_timet_with_zone(tmp, utc); + event->alarm = icaltime_as_timet_with_zone(tmp, icaltime_get_timezone(start)); } ao2_link(pvt->events, event); diff --git a/res/res_clioriginate.c b/res/res_clioriginate.c index 8a30be0735..7ac5605b9b 100644 --- a/res/res_clioriginate.c +++ b/res/res_clioriginate.c @@ -181,7 +181,6 @@ static char *handle_orig(struct ast_cli_entry *e, int cmd, struct ast_cli_args * } else if (!strcasecmp("extension", a->argv[3])) { res = orig_exten(a->fd, a->argv[2], a->argv[4]); } else { - ast_log(LOG_WARNING, "else"); res = CLI_SHOWUSAGE; } diff --git a/res/res_config_curl.c b/res/res_config_curl.c index bb8d9b39ba..43fe888edf 100644 --- a/res/res_config_curl.c +++ b/res/res_config_curl.c @@ -88,7 +88,6 @@ static struct ast_variable *realtime_curl(const char *url, const char *unused, v ast_uri_encode(newval, buf2, sizeof(buf2), ast_uri_http); ast_str_append(&query, 0, "%s%s=%s", i > 0 ? "&" : "", buf1, buf2); } - va_end(ap); ast_str_append(&query, 0, ")}"); ast_str_substitute_variables(&buffer, 0, NULL, ast_str_buffer(query)); @@ -168,7 +167,6 @@ static struct ast_config *realtime_multi_curl(const char *url, const char *unuse ast_uri_encode(newval, buf2, sizeof(buf2), ast_uri_http); ast_str_append(&query, 0, "%s%s=%s", i > 0 ? "&" : "", buf1, buf2); } - va_end(ap); ast_str_append(&query, 0, ")}"); @@ -258,7 +256,6 @@ static int update_curl(const char *url, const char *unused, const char *keyfield ast_uri_encode(newval, buf2, sizeof(buf2), ast_uri_http); ast_str_append(&query, 0, "%s%s=%s", i > 0 ? "&" : "", buf1, buf2); } - va_end(ap); ast_str_append(&query, 0, ")}"); ast_str_substitute_variables(&buffer, 0, NULL, ast_str_buffer(query)); @@ -317,7 +314,6 @@ static int update2_curl(const char *url, const char *unused, va_list ap) ast_str_append(&query, 0, "%s%s=%s", first ? "" : "&", buf1, buf2); first = 0; } - va_end(ap); ast_str_append(&query, 0, ")}"); /* Proxies work, by setting CURLOPT options in the [globals] section of @@ -382,7 +378,6 @@ static int store_curl(const char *url, const char *unused, va_list ap) ast_uri_encode(newval, buf2, sizeof(buf2), ast_uri_http); ast_str_append(&query, 0, "%s%s=%s", i > 0 ? "&" : "", buf1, buf2); } - va_end(ap); ast_str_append(&query, 0, ")}"); ast_str_substitute_variables(&buffer, 0, NULL, ast_str_buffer(query)); @@ -446,7 +441,6 @@ static int destroy_curl(const char *url, const char *unused, const char *keyfiel ast_uri_encode(newval, buf2, sizeof(buf2), ast_uri_http); ast_str_append(&query, 0, "%s%s=%s", i > 0 ? "&" : "", buf1, buf2); } - va_end(ap); ast_str_append(&query, 0, ")}"); ast_str_substitute_variables(&buffer, 0, NULL, ast_str_buffer(query)); @@ -507,7 +501,6 @@ static int require_curl(const char *url, const char *unused, va_list ap) type == RQ_FLOAT ? "float" : "unknown", size); } - va_end(ap); ast_str_append(&query, 0, ")}"); ast_str_substitute_variables(&buffer, 0, NULL, ast_str_buffer(query)); diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 7bd0889c45..30dfc5cdff 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -78,8 +78,6 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data) SQLHSTMT stmt; va_list ap; - va_copy(ap, cps->ap); - res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n"); @@ -95,6 +93,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data) return NULL; } + va_copy(ap, cps->ap); while ((newparam = va_arg(ap, const char *))) { newval = va_arg(ap, const char *); if ((1LL << count++) & cps->skip) { @@ -172,8 +171,6 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl if (ast_string_field_init(&cps, 256)) { return NULL; } - va_copy(cps.ap, ap); - va_copy(aq, ap); if (!table) { ast_string_field_free_memory(&cps); @@ -188,8 +185,10 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl return NULL; } + va_copy(aq, ap); newparam = va_arg(aq, const char *); if (!newparam) { + va_end(aq); ast_odbc_release_obj(obj); ast_string_field_free_memory(&cps); return NULL; @@ -206,7 +205,9 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl } va_end(aq); + va_copy(cps.ap, ap); stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps); + va_end(cps.ap); if (!stmt) { ast_odbc_release_obj(obj); @@ -340,8 +341,6 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char * if (!table || ast_string_field_init(&cps, 256)) { return NULL; } - va_copy(cps.ap, ap); - va_copy(aq, ap); obj = ast_odbc_request_obj2(database, connected_flag); @@ -350,15 +349,20 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char * return NULL; } + va_copy(aq, ap); newparam = va_arg(aq, const char *); if (!newparam) { + va_end(aq); ast_odbc_release_obj(obj); ast_string_field_free_memory(&cps); return NULL; } + initfield = ast_strdupa(newparam); - if ((op = strchr(initfield, ' '))) + if ((op = strchr(initfield, ' '))) { *op = '\0'; + } + va_arg(aq, const char *); op = !strchr(newparam, ' ') ? " =" : ""; snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s ?%s", table, newparam, op, @@ -369,11 +373,15 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char * strcasestr(newparam, "LIKE") && !ast_odbc_backslash_is_escape(obj) ? " ESCAPE '\\'" : ""); va_arg(aq, const char *); } - if (initfield) - snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield); va_end(aq); + if (initfield) { + snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield); + } + + va_copy(cps.ap, ap); stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps); + va_end(cps.ap); if (!stmt) { ast_odbc_release_obj(obj); @@ -490,9 +498,6 @@ static int update_odbc(const char *database, const char *table, const char *keyf return -1; } - va_copy(cps.ap, ap); - va_copy(aq, ap); - if (ast_string_field_init(&cps, 256)) { return -1; } @@ -504,8 +509,10 @@ static int update_odbc(const char *database, const char *table, const char *keyf return -1; } + va_copy(aq, ap); newparam = va_arg(aq, const char *); if (!newparam) { + va_end(aq); ast_odbc_release_obj(obj); ast_odbc_release_table(tableptr); ast_string_field_free_memory(&cps); @@ -540,7 +547,9 @@ static int update_odbc(const char *database, const char *table, const char *keyf snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " WHERE %s=?", keyfield); ast_odbc_release_table(tableptr); + va_copy(cps.ap, ap); stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps); + va_end(cps.ap); if (!stmt) { ast_odbc_release_obj(obj); @@ -622,14 +631,16 @@ static SQLHSTMT update2_prepare(struct odbc_obj *obj, void *data) } va_end(ap); - /* Restart search, because we need to add the search parameters */ - va_copy(ap, ups->ap); ast_str_append(&sql, 0, "WHERE"); first = 1; + /* Restart search, because we need to add the search parameters */ + va_copy(ap, ups->ap); + while ((newparam = va_arg(ap, const char *))) { newval = va_arg(ap, const char *); if (!(column = ast_odbc_find_column(tableptr, newparam))) { + va_end(ap); ast_log(LOG_ERROR, "One or more of the criteria columns '%s' on '%s@%s' for this update does not exist!\n", newparam, ups->table, ups->database); ast_odbc_release_table(tableptr); SQLFreeHandle(SQL_HANDLE_STMT, stmt); @@ -677,16 +688,17 @@ static int update2_odbc(const char *database, const char *table, va_list ap) int res; SQLLEN rowcount = 0; - va_copy(ups.ap, ap); - if (!(obj = ast_odbc_request_obj(database, 0))) { return -1; } + va_copy(ups.ap, ap); if (!(stmt = ast_odbc_prepare_and_execute(obj, update2_prepare, &ups))) { + va_end(ups.ap); ast_odbc_release_obj(obj); return -1; } + va_end(ups.ap); res = SQLRowCount(stmt, &rowcount); SQLFreeHandle(SQL_HANDLE_STMT, stmt); @@ -733,18 +745,20 @@ static int store_odbc(const char *database, const char *table, va_list ap) struct custom_prepare_struct cps = { .sql = sql, .extra = NULL }; struct ast_flags connected_flag = { RES_ODBC_CONNECTED }; - va_copy(cps.ap, ap); - va_copy(aq, ap); - - if (!table) + if (!table) { return -1; + } obj = ast_odbc_request_obj2(database, connected_flag); - if (!obj) + if (!obj) { return -1; + } + + va_copy(aq, ap); newparam = va_arg(aq, const char *); if (!newparam) { + va_end(aq); ast_odbc_release_obj(obj); return -1; } @@ -759,7 +773,10 @@ static int store_odbc(const char *database, const char *table, va_list ap) va_end(aq); snprintf(sql, sizeof(sql), "INSERT INTO %s (%s) VALUES (%s)", table, keys, vals); + + va_copy(cps.ap, ap); stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps); + va_end(cps.ap); if (!stmt) { ast_odbc_release_obj(obj); @@ -808,17 +825,18 @@ static int destroy_odbc(const char *database, const char *table, const char *key struct custom_prepare_struct cps = { .sql = sql, .extra = lookup }; struct ast_flags connected_flag = { RES_ODBC_CONNECTED }; - va_copy(cps.ap, ap); - va_copy(aq, ap); - - if (!table) + if (!table) { return -1; + } obj = ast_odbc_request_obj2(database, connected_flag); - if (!obj) + if (!obj) { return -1; + } snprintf(sql, sizeof(sql), "DELETE FROM %s WHERE ", table); + + va_copy(aq, ap); while((newparam = va_arg(aq, const char *))) { snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), "%s=? AND ", newparam); va_arg(aq, const char *); @@ -826,7 +844,9 @@ static int destroy_odbc(const char *database, const char *table, const char *key va_end(aq); snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), "%s=?", keyfield); + va_copy(cps.ap, ap); stmt = ast_odbc_prepare_and_execute(obj, custom_prepare, &cps); + va_end(cps.ap); if (!stmt) { ast_odbc_release_obj(obj); @@ -1124,7 +1144,6 @@ static int require_odbc(const char *database, const char *table, va_list ap) ast_log(LOG_WARNING, "Realtime table %s@%s requires column '%s', but that column does not exist!\n", table, database, elm); } } - va_end(ap); AST_RWLIST_UNLOCK(&tableptr->columns); return 0; } diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 8eae03f5ad..02c76fcfe5 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -461,7 +461,6 @@ static struct ast_variable *realtime_pgsql(const char *database, const char *tab ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); return NULL; } @@ -476,13 +475,11 @@ static struct ast_variable *realtime_pgsql(const char *database, const char *tab ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); return NULL; } ast_str_append(&sql, 0, " AND %s%s '%s'", newparam, op, ast_str_buffer(escapebuf)); } - va_end(ap); /* We now have our complete statement; Lets connect to the server and execute it. */ ast_mutex_lock(&pgsql_lock); @@ -598,7 +595,6 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); ast_config_destroy(cfg); return NULL; } @@ -614,7 +610,6 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); ast_config_destroy(cfg); return NULL; } @@ -626,7 +621,6 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char ast_str_append(&sql, 0, " ORDER BY %s", initfield); } - va_end(ap); /* We now have our complete statement; Lets connect to the server and execute it. */ ast_mutex_lock(&pgsql_lock); @@ -761,7 +755,6 @@ static int update_pgsql(const char *database, const char *tablename, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); release_table(table); return -1; } @@ -778,20 +771,17 @@ static int update_pgsql(const char *database, const char *tablename, const char ESCAPE_STRING(escapebuf, newval); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", newval); - va_end(ap); release_table(table); return -1; } ast_str_append(&sql, 0, ", %s = '%s'", newparam, ast_str_buffer(escapebuf)); } - va_end(ap); release_table(table); ESCAPE_STRING(escapebuf, lookup); if (pgresult) { ast_log(LOG_ERROR, "PostgreSQL RealTime: detected invalid input: '%s'\n", lookup); - va_end(ap); return -1; } @@ -1007,7 +997,6 @@ static int store_pgsql(const char *database, const char *table, va_list ap) ESCAPE_STRING(buf, newval); ast_str_append(&sql2, 0, ", '%s'", ast_str_buffer(buf)); } - va_end(ap); ast_str_append(&sql1, 0, "%s)", ast_str_buffer(sql2)); ast_debug(1, "PostgreSQL RealTime: Insert SQL: %s\n", ast_str_buffer(sql1)); @@ -1089,7 +1078,6 @@ static int destroy_pgsql(const char *database, const char *table, const char *ke ESCAPE_STRING(buf2, newval); ast_str_append(&sql, 0, " AND %s = '%s'", ast_str_buffer(buf1), ast_str_buffer(buf2)); } - va_end(ap); ast_debug(1, "PostgreSQL RealTime: Delete SQL: %s\n", ast_str_buffer(sql)); diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c index d43c32b2aa..5dfbab1bcb 100644 --- a/res/res_config_sqlite.c +++ b/res/res_config_sqlite.c @@ -903,7 +903,7 @@ static int add_cfg_entry(void *arg, int argc, char **argv, char **columnNames) var = ast_variable_new(argv[RES_CONFIG_SQLITE_CONFIG_VAR_NAME], argv[RES_CONFIG_SQLITE_CONFIG_VAR_VAL], ""); if (!var) { - ast_log(LOG_WARNING, "Unable to allocate variable"); + ast_log(LOG_WARNING, "Unable to allocate variable\n"); return 1; } diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 76b9bafd9b..34124e9ba1 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -669,7 +669,7 @@ static void *monmp3thread(void *data) ast_log(LOG_WARNING, "Unable to spawn mp3player\n"); /* Try again later */ sleep(500); - pthread_testcancel(); + continue; } } if (class->timer) { diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index d804d2cb0b..de99acf32c 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -2046,6 +2046,11 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int /* Otherwise adjust bridged payload to match */ bridged_payload = ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), payload_type.asterisk_format, &payload_type.format, payload_type.rtp_code); + /* If no codec could be matched between instance and instance1, then somehow things were made incompatible while we were still bridged. Bail. */ + if (bridged_payload < 0) { + return -1; + } + /* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */ if (!(ast_rtp_instance_get_codecs(instance1)->payloads[bridged_payload].rtp_code) && !(ast_rtp_instance_get_codecs(instance1)->payloads[bridged_payload].asterisk_format)) { diff --git a/res/res_srtp.c b/res/res_srtp.c index 0dd3d3eec7..756c62e2fa 100644 --- a/res/res_srtp.c +++ b/res/res_srtp.c @@ -475,7 +475,7 @@ static int ast_srtp_add_stream(struct ast_srtp *srtp, struct ast_srtp_policy *po /* For existing streams, replace if its an SSRC stream, or bail if its a wildcard */ if ((match = find_policy(srtp, &policy->sp, OBJ_POINTER))) { if (policy->sp.ssrc.type != ssrc_specific) { - ast_log(AST_LOG_WARNING, "Cannot replace an existing wildcard policy"); + ast_log(AST_LOG_WARNING, "Cannot replace an existing wildcard policy\n"); ao2_t_ref(match, -1, "Unreffing already existing policy"); return -1; } else { diff --git a/tests/test_config.c b/tests/test_config.c index 07bf95ffdd..5c3eab358d 100644 --- a/tests/test_config.c +++ b/tests/test_config.c @@ -33,10 +33,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); +#include /* HUGE_VAL */ + #include "asterisk/config.h" #include "asterisk/module.h" #include "asterisk/test.h" #include "asterisk/paths.h" +#include "asterisk/logger.h" #define CONFIG_FILE "test_config.conf" @@ -374,10 +377,241 @@ out: return res; } +enum { + EXPECT_FAIL = 0, + EXPECT_SUCCEED, +}; + +#define TOOBIG_I32 "2147483649" +#define TOOSMALL_I32 "-2147483649" +#define TOOBIG_U32 "4294967297" +#define TOOSMALL_U32 "-4294967297" +#define DEFAULTVAL 42 +#define EPSILON 0.001 + +#define TEST_PARSE(input, should_succeed, expected_result, flags, result, ...) do {\ + int __res = ast_parse_arg(input, (flags), result, ##__VA_ARGS__); \ + if (!__res == !should_succeed) { \ + ast_test_status_update(test, "ast_parse_arg failed on '%s'. %d/%d\n", input, __res, should_succeed); \ + ret = AST_TEST_FAIL; \ + } else { \ + if (((flags) & PARSE_TYPE) == PARSE_INT32) { \ + int32_t *r = (int32_t *) result, e = (int32_t) expected_result; \ + if (*r != e) { \ + ast_test_status_update(test, "ast_parse_arg int32_t failed with %d != %d\n", *r, e); \ + ret = AST_TEST_FAIL; \ + } \ + } else if (((flags) & PARSE_TYPE) == PARSE_UINT32) { \ + uint32_t *r = (uint32_t *) result, e = (uint32_t) expected_result; \ + if (*r != e) { \ + ast_test_status_update(test, "ast_parse_arg uint32_t failed with %u != %u\n", *r, e); \ + ret = AST_TEST_FAIL; \ + } \ + } else if (((flags) & PARSE_TYPE) == PARSE_DOUBLE) { \ + double *r = (double *) result, e = (double) expected_result; \ + if (fabs(*r - e) > EPSILON) { \ + ast_test_status_update(test, "ast_parse_arg double failed with %f != %f\n", *r, e); \ + ret = AST_TEST_FAIL; \ + } \ + } \ + } \ + *(result) = DEFAULTVAL; \ +} while (0) + +AST_TEST_DEFINE(ast_parse_arg_test) +{ + int ret = AST_TEST_PASS; + int32_t int32_t_val = DEFAULTVAL; + uint32_t uint32_t_val = DEFAULTVAL; + double double_val = DEFAULTVAL; + + switch (cmd) { + case TEST_INIT: + info->name = "ast_parse_arg"; + info->category = "/config/"; + info->summary = "Test the output of ast_parse_arg"; + info->description = + "Ensures that ast_parse_arg behaves as expected"; + return AST_TEST_NOT_RUN; + case TEST_EXECUTE: + break; + } + + /* int32 testing */ + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_INT32, &int32_t_val); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_INT32, &int32_t_val); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_INT32, &int32_t_val); + TEST_PARSE(TOOBIG_I32, EXPECT_FAIL, DEFAULTVAL, PARSE_INT32, &int32_t_val); + TEST_PARSE(TOOSMALL_I32, EXPECT_FAIL, DEFAULTVAL, PARSE_INT32, &int32_t_val); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32, &int32_t_val); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32, &int32_t_val); + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + TEST_PARSE(TOOBIG_I32, EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + TEST_PARSE(TOOSMALL_I32, EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + TEST_PARSE("not a number", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + TEST_PARSE("7not a number", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT, &int32_t_val, 7); + + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, 0, 200); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, -200, 100); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, -1, 0); + TEST_PARSE("123", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, 0, 122); + TEST_PARSE("-123", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, -122, 100); + TEST_PARSE("0", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, 1, 100); + TEST_PARSE(TOOBIG_I32, EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_I32, EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_IN_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("123", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, 0, 200); + TEST_PARSE("-123", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, -200, 100); + TEST_PARSE("0", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, -1, 0); + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, 0, 122); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, -122, 100); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, 1, 100); + TEST_PARSE(TOOBIG_I32, EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_I32, EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_INT32 | PARSE_OUT_RANGE, &int32_t_val, INT_MIN, INT_MAX); + + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, 0, 200); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, -200, 100); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, -1, 0); + TEST_PARSE("123", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, 0, 122); + TEST_PARSE("-123", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, -122, 100); + TEST_PARSE("0", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, 1, 100); + TEST_PARSE(TOOBIG_I32, EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_I32, EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("123", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, 0, 200); + TEST_PARSE("-123", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, -200, 100); + TEST_PARSE("0", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, -1, 0); + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, 0, 122); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, -122, 100); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, 1, 100); + TEST_PARSE(TOOBIG_I32, EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_I32, EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, 7, PARSE_INT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &int32_t_val, 7, INT_MIN, INT_MAX); + + /* uuint32 testing */ + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_UINT32, &uint32_t_val); + TEST_PARSE("-123", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32, &uint32_t_val); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_UINT32, &uint32_t_val); + TEST_PARSE(TOOBIG_U32, EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32, &uint32_t_val); + TEST_PARSE(TOOSMALL_U32, EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32, &uint32_t_val); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32, &uint32_t_val); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32, &uint32_t_val); + + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + TEST_PARSE("-123", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + TEST_PARSE(TOOBIG_U32, EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + TEST_PARSE(TOOSMALL_U32, EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + TEST_PARSE("not a number", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + TEST_PARSE("7not a number", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT, &uint32_t_val, 7); + + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, 0, 200); + TEST_PARSE("-123", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, 0, 200); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, 0, 1); + + TEST_PARSE("123", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, 0, 122); + TEST_PARSE("0", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, 1, 100); + TEST_PARSE(TOOBIG_U32, EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_U32, EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_IN_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + + TEST_PARSE("123", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, 0, 200); + TEST_PARSE("-123", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, 0, 200); + TEST_PARSE("0", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, 0, 1); + + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, 0, 122); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, 1, 100); + TEST_PARSE(TOOBIG_U32, EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_U32, EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32 | PARSE_OUT_RANGE, &uint32_t_val, INT_MIN, INT_MAX); + + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, 0, 200); + TEST_PARSE("-123", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, 0, 200); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, 0, 1); + TEST_PARSE("123", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, 0, 122); + TEST_PARSE("0", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, 1, 100); + TEST_PARSE(TOOBIG_U32, EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_U32, EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_IN_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("123", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, 0, 200); + TEST_PARSE("-123", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, 0, 100); + TEST_PARSE("0", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, 0, 1); + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, 0, 122); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, 1, 100); + TEST_PARSE(TOOBIG_U32, EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE(TOOSMALL_U32, EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("not a number", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + TEST_PARSE("7not a number", EXPECT_FAIL, 7, PARSE_UINT32 | PARSE_DEFAULT | PARSE_OUT_RANGE, &uint32_t_val, 7, INT_MIN, INT_MAX); + + TEST_PARSE(" -123", EXPECT_FAIL, DEFAULTVAL, PARSE_UINT32, &uint32_t_val); + + /* double testing */ + TEST_PARSE("123", EXPECT_SUCCEED, 123, PARSE_DOUBLE, &double_val); + TEST_PARSE("123.123", EXPECT_SUCCEED, 123.123, PARSE_DOUBLE, &double_val); + TEST_PARSE("-123", EXPECT_SUCCEED, -123, PARSE_DOUBLE, &double_val); + TEST_PARSE("-123.123", EXPECT_SUCCEED, -123.123, PARSE_DOUBLE, &double_val); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_DOUBLE, &double_val); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE, &double_val); + TEST_PARSE("7.0not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE, &double_val); + TEST_PARSE("123.123", EXPECT_SUCCEED, 123.123, PARSE_DOUBLE | PARSE_DEFAULT, &double_val, 7.0); + TEST_PARSE("-123.123", EXPECT_SUCCEED, -123.123, PARSE_DOUBLE | PARSE_DEFAULT, &double_val, 7.0); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_DOUBLE | PARSE_DEFAULT, &double_val, 7.0); + TEST_PARSE("not a number", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT, &double_val, 7.0); + TEST_PARSE("7.0not a number", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT, &double_val, 7.0); + + TEST_PARSE("123.123", EXPECT_SUCCEED, 123.123, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, 0.0, 200.0); + TEST_PARSE("-123.123", EXPECT_SUCCEED, -123.123, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, -200.0, 100.0); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, -1.0, 0.0); + TEST_PARSE("123.123", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, 0.0, 122.0); + TEST_PARSE("-123.123", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, -122.0, 100.0); + TEST_PARSE("0", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, 1.0, 100.0); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, -HUGE_VAL, HUGE_VAL); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_IN_RANGE, &double_val, -HUGE_VAL, HUGE_VAL); + TEST_PARSE("123.123", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, 0.0, 200.0); + TEST_PARSE("-123.123", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, -200.0, 100.0); + TEST_PARSE("0", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, -1.0, 0.0); + TEST_PARSE("123.123", EXPECT_SUCCEED, 123.123, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, 0.0, 122.0); + TEST_PARSE("-123.123", EXPECT_SUCCEED, -123.123, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, -122.0, 100.0); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, 1.0, 100.0); + TEST_PARSE("not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, -HUGE_VAL, HUGE_VAL); + TEST_PARSE("7not a number", EXPECT_FAIL, DEFAULTVAL, PARSE_DOUBLE | PARSE_OUT_RANGE, &double_val, -HUGE_VAL, HUGE_VAL); + + TEST_PARSE("123.123", EXPECT_SUCCEED, 123.123, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, 0.0, 200.0); + TEST_PARSE("-123.123", EXPECT_SUCCEED, -123.123, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, -200.0, 100.0); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, -1.0, 0.0); + TEST_PARSE("123.123", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, 0.0, 122.0); + TEST_PARSE("-123.123", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, -122.0, 100.0); + TEST_PARSE("0", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, 1.0, 100.0); + TEST_PARSE("not a number", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, -HUGE_VAL, HUGE_VAL); + TEST_PARSE("7not a number", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_IN_RANGE, &double_val, 7.0, -HUGE_VAL, HUGE_VAL); + TEST_PARSE("123.123", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, 0.0, 200.0); + TEST_PARSE("-123.123", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, -200.0, 100.0); + TEST_PARSE("0", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, -1.0, 0.0); + TEST_PARSE("123.123", EXPECT_SUCCEED, 123.123, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, 0.0, 122.0); + TEST_PARSE("-123.123", EXPECT_SUCCEED, -123.123, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, -122.0, 100.0); + TEST_PARSE("0", EXPECT_SUCCEED, 0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, 1.0, 100.0); + TEST_PARSE("not a number", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, -HUGE_VAL, HUGE_VAL); + TEST_PARSE("7not a number", EXPECT_FAIL, 7.0, PARSE_DOUBLE | PARSE_DEFAULT | PARSE_OUT_RANGE, &double_val, 7.0, -HUGE_VAL, HUGE_VAL); + + /* ast_sockaddr_parse is tested extensively in test_netsock2.c and PARSE_ADDR is a very simple wrapper */ + + return ret; +} static int unload_module(void) { AST_TEST_UNREGISTER(copy_config); AST_TEST_UNREGISTER(config_hook); + AST_TEST_UNREGISTER(ast_parse_arg_test); return 0; } @@ -385,6 +619,7 @@ static int load_module(void) { AST_TEST_REGISTER(copy_config); AST_TEST_REGISTER(config_hook); + AST_TEST_REGISTER(ast_parse_arg_test); return AST_MODULE_LOAD_SUCCESS; } diff --git a/tests/test_linkedlists.c b/tests/test_linkedlists.c index 2d816945cc..f8fee9b9ef 100644 --- a/tests/test_linkedlists.c +++ b/tests/test_linkedlists.c @@ -85,7 +85,7 @@ AST_TEST_DEFINE(single_ll_tests) switch (cmd) { case TEST_INIT: info->name = "ll_tests"; - info->category = "/main/linkedlists"; + info->category = "/main/linkedlists/"; info->summary = "single linked list unit test"; info->description = "Test the single linked list API"; diff --git a/tests/test_poll.c b/tests/test_poll.c index 32e48e2e60..755bb0f9e3 100644 --- a/tests/test_poll.c +++ b/tests/test_poll.c @@ -85,7 +85,7 @@ AST_TEST_DEFINE(poll_test) switch (cmd) { case TEST_INIT: info->name = "poll_test"; - info->category = "main/poll/"; + info->category = "/main/poll/"; info->summary = "unit test for the ast_poll() API"; info->description = "Verifies behavior for the ast_poll() API call\n"; diff --git a/tests/test_security_events.c b/tests/test_security_events.c index 925b662787..4f4da414f1 100644 --- a/tests/test_security_events.c +++ b/tests/test_security_events.c @@ -50,6 +50,8 @@ static void evt_gen_successful_auth(void); static void evt_gen_unexpected_addr(void); static void evt_gen_chal_resp_failed(void); static void evt_gen_inval_password(void); +static void evt_gen_chal_sent(void); +static void evt_gen_inval_transport(void); typedef void (*evt_generator)(void); static const evt_generator evt_generators[AST_SECURITY_EVENT_NUM_TYPES] = { @@ -66,6 +68,8 @@ static const evt_generator evt_generators[AST_SECURITY_EVENT_NUM_TYPES] = { [AST_SECURITY_EVENT_UNEXPECTED_ADDR] = evt_gen_unexpected_addr, [AST_SECURITY_EVENT_CHAL_RESP_FAILED] = evt_gen_chal_resp_failed, [AST_SECURITY_EVENT_INVAL_PASSWORD] = evt_gen_inval_password, + [AST_SECURITY_EVENT_CHAL_SENT] = evt_gen_chal_sent, + [AST_SECURITY_EVENT_INVAL_TRANSPORT] = evt_gen_inval_transport, }; static void evt_gen_failed_acl(void) @@ -552,6 +556,9 @@ static void evt_gen_inval_password(void) .sin = &sin_remote, .transport = AST_SECURITY_EVENT_TRANSPORT_TCP, }, + .challenge = "GoOdChAlLeNgE", + .received_challenge = "BaDcHaLlEnGe", + .received_hash = "3ad9023adf309", }; inet_aton("10.200.100.30", &sin_local.sin_addr); @@ -563,6 +570,82 @@ static void evt_gen_inval_password(void) ast_security_event_report(AST_SEC_EVT(&inval_password)); } +static void evt_gen_chal_sent(void) +{ + struct sockaddr_in sin_local = { + .sin_family = AF_INET + }; + struct sockaddr_in sin_remote = { + .sin_family = AF_INET + }; + + struct timeval session_tv = ast_tvnow(); + struct ast_security_event_chal_sent chal_sent = { + .common.event_type = AST_SECURITY_EVENT_CHAL_SENT, + .common.version = AST_SECURITY_EVENT_CHAL_SENT_VERSION, + .common.service = "TEST", + .common.module = AST_MODULE, + .common.account_id = "AccountIDGoesHere", + .common.session_id = "SessionIDGoesHere", + .common.session_tv = &session_tv, + .common.local_addr = { + .sin = &sin_local, + .transport = AST_SECURITY_EVENT_TRANSPORT_TCP, + }, + .common.remote_addr = { + .sin = &sin_remote, + .transport = AST_SECURITY_EVENT_TRANSPORT_TCP, + }, + .challenge = "IcHaLlEnGeYoU", + }; + + inet_aton("10.200.10.30", &sin_local.sin_addr); + sin_local.sin_port = htons(5392); + + inet_aton("10.200.10.31", &sin_remote.sin_addr); + sin_remote.sin_port = htons(1443); + + ast_security_event_report(AST_SEC_EVT(&chal_sent)); +} + +static void evt_gen_inval_transport(void) +{ + struct sockaddr_in sin_local = { + .sin_family = AF_INET + }; + struct sockaddr_in sin_remote = { + .sin_family = AF_INET + }; + + struct timeval session_tv = ast_tvnow(); + struct ast_security_event_inval_transport inval_transport = { + .common.event_type = AST_SECURITY_EVENT_INVAL_TRANSPORT, + .common.version = AST_SECURITY_EVENT_INVAL_TRANSPORT_VERSION, + .common.service = "TEST", + .common.module = AST_MODULE, + .common.account_id = "AccountIDGoesHere", + .common.session_id = "SessionIDGoesHere", + .common.session_tv = &session_tv, + .common.local_addr = { + .sin = &sin_local, + .transport = AST_SECURITY_EVENT_TRANSPORT_TCP, + }, + .common.remote_addr = { + .sin = &sin_remote, + .transport = AST_SECURITY_EVENT_TRANSPORT_TCP, + }, + .transport = "UDP", + }; + + inet_aton("10.200.103.45", &sin_local.sin_addr); + sin_local.sin_port = htons(8223); + + inet_aton("10.200.103.44", &sin_remote.sin_addr); + sin_remote.sin_port = htons(1039); + + ast_security_event_report(AST_SEC_EVT(&inval_transport)); +} + static void gen_events(struct ast_cli_args *a) { unsigned int i; diff --git a/utils/extconf.c b/utils/extconf.c index 20b2e5b2a1..8245a161f1 100644 --- a/utils/extconf.c +++ b/utils/extconf.c @@ -2910,7 +2910,7 @@ struct ast_timing { unsigned int monthmask; /*!< Mask for month */ unsigned int daymask; /*!< Mask for date */ unsigned int dowmask; /*!< Mask for day of week (mon-sun) */ - unsigned int minmask[24]; /*!< Mask for minute */ + unsigned int minmask[48]; /*!< Mask for minute */ char *timezone; /*!< NULL, or zoneinfo style timezone */ }; /* end of pbx.h */