[svn-commits] jrose: branch jrose/call_identifiers r360260 - in /team/jrose/call_identifier...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Mar 23 09:13:40 CDT 2012
Author: jrose
Date: Fri Mar 23 09:13:31 2012
New Revision: 360260
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360260
Log:
Dealing with automerge
Modified:
team/jrose/call_identifiers/ (props changed)
team/jrose/call_identifiers/CHANGES
team/jrose/call_identifiers/apps/app_dial.c
team/jrose/call_identifiers/apps/app_queue.c
team/jrose/call_identifiers/include/asterisk/utils.h
team/jrose/call_identifiers/main/app.c
team/jrose/call_identifiers/main/asterisk.c
team/jrose/call_identifiers/main/astmm.c
team/jrose/call_identifiers/main/audiohook.c
team/jrose/call_identifiers/main/autoservice.c
team/jrose/call_identifiers/main/callerid.c
team/jrose/call_identifiers/main/cel.c
team/jrose/call_identifiers/main/channel.c
team/jrose/call_identifiers/main/chanvars.c
team/jrose/call_identifiers/main/cli.c
team/jrose/call_identifiers/main/config.c
team/jrose/call_identifiers/main/cygload.c
team/jrose/call_identifiers/main/devicestate.c
team/jrose/call_identifiers/main/dial.c
team/jrose/call_identifiers/main/dns.c
team/jrose/call_identifiers/main/dnsmgr.c
team/jrose/call_identifiers/main/dsp.c
team/jrose/call_identifiers/main/ecdisa.h
team/jrose/call_identifiers/main/enum.c
team/jrose/call_identifiers/main/event.c
team/jrose/call_identifiers/main/features.c
team/jrose/call_identifiers/main/file.c
team/jrose/call_identifiers/main/fixedjitterbuf.c
team/jrose/call_identifiers/main/fixedjitterbuf.h
team/jrose/call_identifiers/main/frame.c
team/jrose/call_identifiers/main/fskmodem_float.c
team/jrose/call_identifiers/main/fskmodem_int.c
team/jrose/call_identifiers/main/image.c
team/jrose/call_identifiers/main/indications.c
team/jrose/call_identifiers/main/io.c
team/jrose/call_identifiers/main/jitterbuf.c
team/jrose/call_identifiers/main/loader.c
team/jrose/call_identifiers/main/lock.c
team/jrose/call_identifiers/main/logger.c
team/jrose/call_identifiers/main/manager.c
team/jrose/call_identifiers/main/md5.c
team/jrose/call_identifiers/main/message.c
team/jrose/call_identifiers/main/netsock.c
team/jrose/call_identifiers/main/pbx.c
team/jrose/call_identifiers/main/plc.c
team/jrose/call_identifiers/main/privacy.c
team/jrose/call_identifiers/main/rtp_engine.c
team/jrose/call_identifiers/main/say.c
team/jrose/call_identifiers/main/sched.c
team/jrose/call_identifiers/main/sha1.c
team/jrose/call_identifiers/main/slinfactory.c
team/jrose/call_identifiers/main/srv.c
team/jrose/call_identifiers/main/stdtime/localtime.c
team/jrose/call_identifiers/main/stdtime/test.c
team/jrose/call_identifiers/main/strcompat.c
team/jrose/call_identifiers/main/taskprocessor.c
team/jrose/call_identifiers/main/tdd.c
team/jrose/call_identifiers/main/term.c
team/jrose/call_identifiers/main/timing.c
team/jrose/call_identifiers/main/translate.c
team/jrose/call_identifiers/main/udptl.c
team/jrose/call_identifiers/main/ulaw.c
team/jrose/call_identifiers/main/utils.c
team/jrose/call_identifiers/main/xmldoc.c
Propchange: team/jrose/call_identifiers/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Mar 23 09:13:31 2012
@@ -1,1 +1,1 @@
-/trunk:1-360152
+/trunk:1-360259
Modified: team/jrose/call_identifiers/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/CHANGES?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/CHANGES (original)
+++ team/jrose/call_identifiers/CHANGES Fri Mar 23 09:13:31 2012
@@ -130,6 +130,10 @@
when using multiple options (so that j option could be used without having to
manually specify timezone and format) There are other beneftis eg. format can
now be used without specifying time zone as well.
+ * Added 'F()' option to Queue and Bridge. Similar to the dial option, these can
+ be supplied with arguments indicating where the callee should go after the caller
+ is hung up, or without options specified, the priority after the Queue/Bridge
+ will be used.
Parking
------------
Modified: team/jrose/call_identifiers/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/apps/app_dial.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/apps/app_dial.c (original)
+++ team/jrose/call_identifiers/apps/app_dial.c Fri Mar 23 09:13:31 2012
@@ -1615,13 +1615,6 @@
return 0;
}
-static void replace_macro_delimiter(char *s)
-{
- for (; *s; s++)
- if (*s == '^')
- *s = ',';
-}
-
/* returns true if there is a valid privacy reply */
static int valid_priv_reply(struct ast_flags64 *opts, int res)
{
@@ -2628,7 +2621,7 @@
ast_clear_flag(ast_channel_cdr(chan), AST_CDR_FLAG_DIALED);
ast_clear_flag(ast_channel_cdr(peer), AST_CDR_FLAG_DIALED);
- replace_macro_delimiter(opt_args[OPT_ARG_GOTO]);
+ ast_replace_subargument_delimiter(opt_args[OPT_ARG_GOTO]);
ast_parseable_goto(chan, opt_args[OPT_ARG_GOTO]);
/* peer goes to the same context and extension as chan, so just copy info from chan*/
ast_channel_context_set(peer, ast_channel_context(chan));
@@ -2659,7 +2652,7 @@
ast_channel_context_set(peer, ast_channel_context(chan));
ast_channel_exten_set(peer, ast_channel_exten(chan));
- replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_MACRO]);
+ ast_replace_subargument_delimiter(opt_args[OPT_ARG_CALLEE_MACRO]);
res = pbx_exec(peer, theapp, opt_args[OPT_ARG_CALLEE_MACRO]);
ast_debug(1, "Macro exited with status %d\n", res);
res = 0;
@@ -2699,7 +2692,7 @@
res = -1;
/* perform a transfer to a new extension */
if (strchr(macro_transfer_dest, '^')) { /* context^exten^priority*/
- replace_macro_delimiter(macro_transfer_dest);
+ ast_replace_subargument_delimiter(macro_transfer_dest);
if (!ast_parseable_goto(chan, macro_transfer_dest))
ast_set_flag64(peerflags, OPT_GO_ON);
}
@@ -2724,7 +2717,7 @@
theapp = pbx_findapp("Gosub");
if (theapp && !res9) {
- replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GOSUB]);
+ ast_replace_subargument_delimiter(opt_args[OPT_ARG_CALLEE_GOSUB]);
/* Set where we came from */
ast_channel_context_set(peer, "app_dial_gosub_virtual_context");
@@ -2814,7 +2807,7 @@
res = -1;
/* perform a transfer to a new extension */
if (strchr(gosub_transfer_dest, '^')) { /* context^exten^priority*/
- replace_macro_delimiter(gosub_transfer_dest);
+ ast_replace_subargument_delimiter(gosub_transfer_dest);
if (!ast_parseable_goto(chan, gosub_transfer_dest))
ast_set_flag64(peerflags, OPT_GO_ON);
}
@@ -2928,7 +2921,7 @@
}
if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
if(!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
- replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+ ast_replace_subargument_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
} else { /* F() */
int goto_res;
Modified: team/jrose/call_identifiers/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/apps/app_queue.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/apps/app_queue.c (original)
+++ team/jrose/call_identifiers/apps/app_queue.c Fri Mar 23 09:13:31 2012
@@ -1305,21 +1305,6 @@
}
}
-/*!
- * \internal
- * \brief Converts delimited '^' characters in a target priority/extension/context string
- * to commas so that they can be used with ast_parseable_goto.
- * \param s string that '^' characters are being replaced in.
- */
-static void replace_macro_delimiter(char *s)
-{
- for (; *s; s++) {
- if (*s == '^') {
- *s = ',';
- }
- }
-}
-
static const char *int2strat(int strategy)
{
int x;
@@ -5326,7 +5311,7 @@
if (!ast_check_hangup(peer) && ast_test_flag(&opts, OPT_CALLEE_GO_ON)) {
if (!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
- replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+ ast_replace_subargument_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
if (ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]) == AST_PBX_SUCCESS) {
ast_pbx_start(peer);
Modified: team/jrose/call_identifiers/include/asterisk/utils.h
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/include/asterisk/utils.h?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/include/asterisk/utils.h (original)
+++ team/jrose/call_identifiers/include/asterisk/utils.h Fri Mar 23 09:13:31 2012
@@ -427,6 +427,12 @@
__FILE__, __FUNCTION__, __LINE__, #c)
/* End of thread management support */
+
+/*!
+ \brief Replace '^' in a string with ','
+ \param s String within which to replace characters
+*/
+void ast_replace_subargument_delimiter(char *s);
/*!
\brief Process a string to find and replace characters
Modified: team/jrose/call_identifiers/main/app.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/app.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/main/app.c (original)
+++ team/jrose/call_identifiers/main/app.c Fri Mar 23 09:13:31 2012
@@ -168,7 +168,7 @@
* \param prompt The file to stream to the channel
* \param s The string to read in to. Must be at least the size of your length
* \param maxlen How many digits to read (maximum)
- * \param timeout set timeout to 0 for "standard" timeouts. Set timeout to -1 for
+ * \param timeout set timeout to 0 for "standard" timeouts. Set timeout to -1 for
* "ludicrous time" (essentially never times out) */
enum ast_getdata_result ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxlen, int timeout)
{
@@ -1605,7 +1605,7 @@
return r;
}
-int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path)
+int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path)
{
int silencethreshold;
int maxsilence = 0;
Modified: team/jrose/call_identifiers/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/asterisk.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/main/asterisk.c (original)
+++ team/jrose/call_identifiers/main/asterisk.c Fri Mar 23 09:13:31 2012
@@ -23,18 +23,18 @@
*
* \par Developer Documentation for Asterisk
*
- * This is the main developer documentation for Asterisk. It is
- * generated by running "make progdocs" from the Asterisk source tree.
+ * This is the main developer documentation for Asterisk. It is
+ * generated by running "make progdocs" from the Asterisk source tree.
*
- * In addition to the information available on the Asterisk source code,
- * please see the appendices for information on coding guidelines,
+ * In addition to the information available on the Asterisk source code,
+ * please see the appendices for information on coding guidelines,
* release management, commit policies, and more.
*
* \arg \ref AsteriskArchitecture
*
* \par Additional documentation
* \arg \ref Licensing
- * \arg \ref DevDoc
+ * \arg \ref DevDoc
* \arg \ref ConfigFiles
*
* \section copyright Copyright and Author
@@ -56,7 +56,7 @@
/*! \file
\brief Top level source file for Asterisk - the Open Source PBX. Implementation
of PBX core functions and CLI interface.
-
+
*/
#include "asterisk.h"
@@ -170,7 +170,7 @@
/*! \defgroup main_options Main Configuration Options
* \brief Main configuration options from asterisk.conf or OS command line on starting Asterisk.
* \arg \ref Config_ast "asterisk.conf"
- * \note Some of them can be changed in the CLI
+ * \note Some of them can be changed in the CLI
*/
/*! @{ */
@@ -323,7 +323,7 @@
work = ast_strdupa(version);
work = ast_strip(ast_strip_quoted(work, "$", "$"));
version_length = strlen(work) + 1;
-
+
if (!(new = ast_calloc(1, sizeof(*new) + version_length)))
return;
@@ -385,8 +385,8 @@
if (iterator)
return iterator->version;
return NULL;
-}
-
+}
+
struct thread_list_t {
@@ -399,7 +399,7 @@
static AST_RWLIST_HEAD_STATIC(thread_list, thread_list_t);
void ast_register_thread(char *name)
-{
+{
struct thread_list_t *new = ast_calloc(1, sizeof(*new));
if (!new)
@@ -459,7 +459,7 @@
else
ast_cli(a->fd, " Maximum calls: Not set\n");
if (option_maxfiles)
- ast_cli(a->fd, " Maximum open file handles: %d\n", option_maxfiles);
+ ast_cli(a->fd, " Maximum open file handles: %d\n", option_maxfiles);
else
ast_cli(a->fd, " Maximum open file handles: Not set\n");
ast_cli(a->fd, " Verbosity: %d\n", option_verbose);
@@ -522,7 +522,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core show threads";
- e->usage =
+ e->usage =
"Usage: core show threads\n"
" List threads currently active in the system.\n";
return NULL;
@@ -535,7 +535,7 @@
ast_cli(a->fd, "%p %d %s\n", (void *)cur->id, cur->lwp, cur->name);
count++;
}
- AST_RWLIST_UNLOCK(&thread_list);
+ AST_RWLIST_UNLOCK(&thread_list);
ast_cli(a->fd, "%d threads listed.\n", count);
return CLI_SUCCESS;
}
@@ -754,7 +754,7 @@
#elif defined(linux)
static __inline uint64_t
rdtsc(void)
-{
+{
uint64_t rv;
__asm __volatile(".byte 0x0f, 0x31" : "=A" (rv));
@@ -877,7 +877,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core show file version [like]";
- e->usage =
+ e->usage =
"Usage: core show file version [like <pattern>]\n"
" Lists the revision numbers of the files used to build this copy of Asterisk.\n"
" Optional regular expression pattern is used to filter the file list.\n";
@@ -954,7 +954,7 @@
ae->func = func;
- ast_unregister_atexit(func);
+ ast_unregister_atexit(func);
AST_RWLIST_WRLOCK(&atexits);
AST_RWLIST_INSERT_HEAD(&atexits, ae, list);
@@ -1056,7 +1056,7 @@
pid = fork();
#else
pid = vfork();
-#endif
+#endif
if (pid == 0) {
#ifdef HAVE_CAP
@@ -1082,7 +1082,7 @@
if (res > -1) {
res = WIFEXITED(status) ? WEXITSTATUS(status) : -1;
break;
- } else if (errno != EINTR)
+ } else if (errno != EINTR)
break;
}
} else {
@@ -1149,7 +1149,7 @@
if (consoles[x].mute)
continue;
if (consoles[x].fd > -1) {
- if (!consoles[x].levels[level])
+ if (!consoles[x].levels[level])
fdprint(consoles[x].p[1], string);
}
}
@@ -1173,7 +1173,7 @@
{
int x;
for (x = 0; x < AST_MAX_CONNECTS; x++) {
- if (consoles[x].fd > -1)
+ if (consoles[x].fd > -1)
fdprint(consoles[x].p[1], string);
}
}
@@ -1262,7 +1262,7 @@
char tmp[512];
int res;
struct pollfd fds[2];
-
+
if (gethostname(hostname, sizeof(hostname)-1))
ast_copy_string(hostname, "<Unknown>", sizeof(hostname));
snprintf(tmp, sizeof(tmp), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ast_get_version());
@@ -1311,7 +1311,7 @@
close(con->p[0]);
close(con->p[1]);
con->fd = -1;
-
+
return NULL;
}
@@ -1400,14 +1400,14 @@
uid_t uid = -1;
gid_t gid = -1;
- for (x = 0; x < AST_MAX_CONNECTS; x++)
+ for (x = 0; x < AST_MAX_CONNECTS; x++)
consoles[x].fd = -1;
unlink(ast_config_AST_SOCKET);
ast_socket = socket(PF_LOCAL, SOCK_STREAM, 0);
if (ast_socket < 0) {
ast_log(LOG_WARNING, "Unable to create control socket: %s\n", strerror(errno));
return -1;
- }
+ }
memset(&sunaddr, 0, sizeof(sunaddr));
sunaddr.sun_family = AF_LOCAL;
ast_copy_string(sunaddr.sun_path, ast_config_AST_SOCKET, sizeof(sunaddr.sun_path));
@@ -1438,7 +1438,7 @@
else
uid = pw->pw_uid;
}
-
+
if (!ast_strlen_zero(ast_config_AST_CTL_GROUP)) {
struct group *grp;
if ((grp = getgrnam(ast_config_AST_CTL_GROUP)) == NULL)
@@ -1486,8 +1486,8 @@
/*! \brief Urgent handler
Called by soft_hangup to interrupt the poll, read, or other
- system call. We don't actually need to do anything though.
- Remember: Cannot EVER ast_log from within a signal handler
+ system call. We don't actually need to do anything though.
+ Remember: Cannot EVER ast_log from within a signal handler
*/
static void _urg_handler(int num)
{
@@ -1529,7 +1529,7 @@
*/
for (n = 0; wait4(-1, &status, WNOHANG, NULL) > 0; n++)
;
- if (n == 0 && option_debug)
+ if (n == 0 && option_debug)
printf("Huh? Child handler, but nobody there?\n");
errno = save_errno;
}
@@ -1543,22 +1543,22 @@
static void set_ulimit(int value)
{
struct rlimit l = {0, 0};
-
+
if (value <= 0) {
ast_log(LOG_WARNING, "Unable to change max files open to invalid value %i\n",value);
return;
}
-
+
l.rlim_cur = value;
l.rlim_max = value;
-
+
if (setrlimit(RLIMIT_NOFILE, &l)) {
ast_log(LOG_WARNING, "Unable to disable core size resource limit: %s\n",strerror(errno));
return;
}
-
+
ast_log(LOG_NOTICE, "Setting max files open to %d\n",value);
-
+
return;
}
@@ -1582,7 +1582,7 @@
struct sched_param sched;
memset(&sched, 0, sizeof(sched));
#ifdef __linux__
- if (pri) {
+ if (pri) {
sched.sched_priority = 10;
if (sched_setscheduler(0, SCHED_RR, &sched)) {
ast_log(LOG_WARNING, "Unable to set high priority\n");
@@ -1614,7 +1614,7 @@
struct ast_atexit *ae;
AST_RWLIST_RDLOCK(&atexits);
AST_RWLIST_TRAVERSE(&atexits, ae, list) {
- if (ae->func)
+ if (ae->func)
ae->func();
}
AST_RWLIST_UNLOCK(&atexits);
@@ -1756,7 +1756,7 @@
/* close logger */
close_logger();
- /* If there is a consolethread running send it a SIGHUP
+ /* If there is a consolethread running send it a SIGHUP
so it can execvp, otherwise we can do it ourselves */
if ((consolethread != AST_PTHREADT_NULL) && (consolethread != pthread_self())) {
pthread_kill(consolethread, SIGHUP);
@@ -1764,7 +1764,7 @@
sleep(2);
} else
execvp(_argv[0], _argv);
-
+
} else {
/* close logger */
close_logger();
@@ -1846,7 +1846,7 @@
while (*s) {
if (*s > 32)
return 0;
- s++;
+ s++;
}
return 1;
}
@@ -1865,7 +1865,7 @@
ast_safe_system(s+1);
else
ast_safe_system(getenv("SHELL") ? getenv("SHELL") : "/bin/sh");
- } else
+ } else
ast_cli_command(STDOUT_FILENO, s);
}
@@ -1925,7 +1925,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core show version";
- e->usage =
+ e->usage =
"Usage: core show version\n"
" Shows Asterisk version information.\n";
return NULL;
@@ -1956,7 +1956,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core stop now";
- e->usage =
+ e->usage =
"Usage: core stop now\n"
" Shuts down a running Asterisk immediately, hanging up all active calls .\n";
return NULL;
@@ -1975,7 +1975,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core stop gracefully";
- e->usage =
+ e->usage =
"Usage: core stop gracefully\n"
" Causes Asterisk to not accept new calls, and exit when all\n"
" active calls have terminated normally.\n";
@@ -1995,7 +1995,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core stop when convenient";
- e->usage =
+ e->usage =
"Usage: core stop when convenient\n"
" Causes Asterisk to perform a shutdown when all active calls have ended.\n";
return NULL;
@@ -2015,7 +2015,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core restart now";
- e->usage =
+ e->usage =
"Usage: core restart now\n"
" Causes Asterisk to hangup all calls and exec() itself performing a cold\n"
" restart.\n";
@@ -2035,7 +2035,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core restart gracefully";
- e->usage =
+ e->usage =
"Usage: core restart gracefully\n"
" Causes Asterisk to stop accepting new calls and exec() itself performing a cold\n"
" restart when all active calls have ended.\n";
@@ -2055,7 +2055,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core restart when convenient";
- e->usage =
+ e->usage =
"Usage: core restart when convenient\n"
" Causes Asterisk to perform a cold restart when all active calls have ended.\n";
return NULL;
@@ -2077,7 +2077,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core abort shutdown";
- e->usage =
+ e->usage =
"Usage: core abort shutdown\n"
" Causes Asterisk to abort an executing shutdown or restart, and resume normal\n"
" call operations.\n";
@@ -2107,7 +2107,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "!";
- e->usage =
+ e->usage =
"Usage: !<command>\n"
" Executes a given shell command\n";
return NULL;
@@ -2147,7 +2147,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core show warranty";
- e->usage =
+ e->usage =
"Usage: core show warranty\n"
" Shows the warranty (if any) for this copy of Asterisk.\n";
return NULL;
@@ -2184,7 +2184,7 @@
switch (cmd) {
case CLI_INIT:
e->command = "core show license";
- e->usage =
+ e->usage =
"Usage: core show license\n"
" Shows the license(s) for this copy of Asterisk.\n";
return NULL;
@@ -2206,7 +2206,7 @@
AST_CLI_DEFINE(handle_stop_now, "Shut down Asterisk immediately"),
AST_CLI_DEFINE(handle_stop_gracefully, "Gracefully shut down Asterisk"),
AST_CLI_DEFINE(handle_stop_when_convenient, "Shut down Asterisk at empty call volume"),
- AST_CLI_DEFINE(handle_restart_now, "Restart Asterisk immediately"),
+ AST_CLI_DEFINE(handle_restart_now, "Restart Asterisk immediately"),
AST_CLI_DEFINE(handle_restart_gracefully, "Restart Asterisk gracefully"),
AST_CLI_DEFINE(handle_restart_when_convenient, "Restart Asterisk at empty call volume"),
AST_CLI_DEFINE(show_warranty, "Show the warranty (if any) for this copy of Asterisk"),
@@ -2300,7 +2300,7 @@
WELCOME_MESSAGE;
if (!ast_opt_mute)
fdsend(ast_consock, "logger mute silent");
- else
+ else
printf("log and verbose output currently muted ('logger mute' to unmute)\n");
break;
} else
@@ -2487,7 +2487,7 @@
ast_str_set(&prompt, 0, "%s", ASTERISK_PROMPT);
}
- return ast_str_buffer(prompt);
+ return ast_str_buffer(prompt);
}
static char **ast_el_strtoarr(char *buf)
@@ -2619,7 +2619,7 @@
len = lf->cursor - ptr;
if (ast_opt_remote) {
- snprintf(buf, sizeof(buf), "_COMMAND NUMMATCHES \"%s\" \"%s\"", lf->buffer, ptr);
+ snprintf(buf, sizeof(buf), "_COMMAND NUMMATCHES \"%s\" \"%s\"", lf->buffer, ptr);
fdsend(ast_consock, buf);
res = read(ast_consock, buf, sizeof(buf) - 1);
buf[res] = '\0';
@@ -2628,19 +2628,19 @@
if (nummatches > 0) {
char *mbuf;
int mlen = 0, maxmbuf = 2048;
- /* Start with a 2048 byte buffer */
+ /* Start with a 2048 byte buffer */
if (!(mbuf = ast_malloc(maxmbuf))) {
lf->cursor[0] = savechr;
return (char *)(CC_ERROR);
}
- snprintf(buf, sizeof(buf), "_COMMAND MATCHESARRAY \"%s\" \"%s\"", lf->buffer, ptr);
+ snprintf(buf, sizeof(buf), "_COMMAND MATCHESARRAY \"%s\" \"%s\"", lf->buffer, ptr);
fdsend(ast_consock, buf);
res = 0;
mbuf[0] = '\0';
while (!strstr(mbuf, AST_CLI_COMPLETE_EOF) && res != -1) {
if (mlen + 1024 > maxmbuf) {
/* Every step increment buffer 1024 bytes */
- maxmbuf += 1024;
+ maxmbuf += 1024;
if (!(mbuf = ast_realloc(mbuf, maxmbuf))) {
lf->cursor[0] = savechr;
return (char *)(CC_ERROR);
@@ -2694,7 +2694,7 @@
fprintf(stdout, "\n");
ast_cli_display_match_list(matches, nummatches, maxlen);
retval = CC_REDISPLAY;
- } else {
+ } else {
el_insertstr(editline," ");
retval = CC_REFRESH;
}
@@ -2728,7 +2728,7 @@
el = el_init("asterisk", stdin, stdout, stderr);
el_set(el, EL_PROMPT, cli_prompt);
- el_set(el, EL_EDITMODE, 1);
+ el_set(el, EL_EDITMODE, 1);
el_set(el, EL_EDITOR, editor);
el_hist = history_init();
if (!el || !el_hist)
@@ -2928,7 +2928,7 @@
ast_verbose("Connected to Asterisk %s currently running on %s (pid = %d)\n", version, hostname, pid);
remotehostname = hostname;
- if (getenv("HOME"))
+ if (getenv("HOME"))
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
if (el_hist == NULL || el == NULL)
ast_el_initialize();
@@ -3009,7 +3009,7 @@
return 0;
}
-static void ast_readconfig(void)
+static void ast_readconfig(void)
{
struct ast_config *cfg;
struct ast_variable *v;
@@ -3025,14 +3025,14 @@
cfg = ast_config_load2(ast_config_AST_CONFIG_FILE, "" /* core, can't reload */, config_flags);
if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
ast_log(LOG_WARNING, "Unable to open specified master config file '%s', using built-in defaults\n", ast_config_AST_CONFIG_FILE);
- } else
+ } else
cfg = ast_config_load2(config, "" /* core, can't reload */, config_flags);
/* init with buildtime config */
ast_copy_string(cfg_paths.config_dir, DEFAULT_CONFIG_DIR, sizeof(cfg_paths.config_dir));
ast_copy_string(cfg_paths.spool_dir, DEFAULT_SPOOL_DIR, sizeof(cfg_paths.spool_dir));
ast_copy_string(cfg_paths.module_dir, DEFAULT_MODULE_DIR, sizeof(cfg_paths.module_dir));
- snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", cfg_paths.spool_dir);
+ snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", cfg_paths.spool_dir);
ast_copy_string(cfg_paths.var_dir, DEFAULT_VAR_DIR, sizeof(cfg_paths.var_dir));
ast_copy_string(cfg_paths.data_dir, DEFAULT_DATA_DIR, sizeof(cfg_paths.data_dir));
ast_copy_string(cfg_paths.log_dir, DEFAULT_LOG_DIR, sizeof(cfg_paths.log_dir));
@@ -3197,15 +3197,15 @@
ast_language_is_prefix = ast_true(v->value);
} else if (!strcasecmp(v->name, "defaultlanguage")) {
ast_copy_string(defaultlanguage, v->value, MAX_LANGUAGE);
- } else if (!strcasecmp(v->name, "lockmode")) {
- if (!strcasecmp(v->value, "lockfile")) {
- ast_set_lock_type(AST_LOCK_TYPE_LOCKFILE);
- } else if (!strcasecmp(v->value, "flock")) {
- ast_set_lock_type(AST_LOCK_TYPE_FLOCK);
- } else {
+ } else if (!strcasecmp(v->name, "lockmode")) {
+ if (!strcasecmp(v->value, "lockfile")) {
+ ast_set_lock_type(AST_LOCK_TYPE_LOCKFILE);
+ } else if (!strcasecmp(v->value, "flock")) {
+ ast_set_lock_type(AST_LOCK_TYPE_FLOCK);
+ } else {
ast_log(LOG_WARNING, "'%s' is not a valid setting for the lockmode option, "
"defaulting to 'lockfile'\n", v->value);
- ast_set_lock_type(AST_LOCK_TYPE_LOCKFILE);
+ ast_set_lock_type(AST_LOCK_TYPE_LOCKFILE);
}
#if defined(HAVE_SYSINFO)
} else if (!strcasecmp(v->name, "minmemfree")) {
@@ -3398,7 +3398,7 @@
ast_fd_init();
ast_pbx_init();
- if (getenv("HOME"))
+ if (getenv("HOME"))
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
/* Check for options */
while ((c = getopt(argc, argv, "BC:cde:FfG:ghIiL:M:mnpqRrs:TtU:VvWXx:")) != -1) {
@@ -3524,7 +3524,7 @@
WELCOME_MESSAGE;
}
- if (ast_opt_console && !option_verbose)
+ if (ast_opt_console && !option_verbose)
ast_verbose("[ Booting...\n");
/* For remote connections, change the name of the remote connection.
@@ -3750,7 +3750,7 @@
/* custom config setup */
register_config_cli();
read_config_maps();
-
+
if (ast_opt_console) {
if (el_hist == NULL || el == NULL)
ast_el_initialize();
Modified: team/jrose/call_identifiers/main/astmm.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/astmm.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/main/astmm.c (original)
+++ team/jrose/call_identifiers/main/astmm.c Fri Mar 23 09:13:31 2012
@@ -142,7 +142,7 @@
int hash = HASH(ptr);
struct ast_region *reg;
size_t len = 0;
-
+
ast_mutex_lock(®lock);
for (reg = regions[hash]; reg; reg = reg->next) {
if (reg->data == ptr) {
@@ -191,42 +191,42 @@
}
free(reg);
} else {
- astmm_log("WARNING: Freeing unused memory at %p, in %s of %s, line %d\n",
+ astmm_log("WARNING: Freeing unused memory at %p, in %s of %s, line %d\n",
ptr, func, file, lineno);
}
}
-void *__ast_calloc(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
+void *__ast_calloc(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
{
void *ptr;
- if ((ptr = __ast_alloc_region(size * nmemb, FUNC_CALLOC, file, lineno, func, 0)))
+ if ((ptr = __ast_alloc_region(size * nmemb, FUNC_CALLOC, file, lineno, func, 0)))
memset(ptr, 0, size * nmemb);
return ptr;
}
-void *__ast_calloc_cache(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
+void *__ast_calloc_cache(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
{
void *ptr;
- if ((ptr = __ast_alloc_region(size * nmemb, FUNC_CALLOC, file, lineno, func, 1)))
+ if ((ptr = __ast_alloc_region(size * nmemb, FUNC_CALLOC, file, lineno, func, 1)))
memset(ptr, 0, size * nmemb);
return ptr;
}
-void *__ast_malloc(size_t size, const char *file, int lineno, const char *func)
+void *__ast_malloc(size_t size, const char *file, int lineno, const char *func)
{
return __ast_alloc_region(size, FUNC_MALLOC, file, lineno, func, 0);
}
-void __ast_free(void *ptr, const char *file, int lineno, const char *func)
+void __ast_free(void *ptr, const char *file, int lineno, const char *func)
{
__ast_free_region(ptr, file, lineno, func);
}
-void *__ast_realloc(void *ptr, size_t size, const char *file, int lineno, const char *func)
+void *__ast_realloc(void *ptr, size_t size, const char *file, int lineno, const char *func)
{
void *tmp;
size_t len = 0;
@@ -246,11 +246,11 @@
memcpy(tmp, ptr, len);
__ast_free_region(ptr, file, lineno, func);
}
-
+
return tmp;
}
-char *__ast_strdup(const char *s, const char *file, int lineno, const char *func)
+char *__ast_strdup(const char *s, const char *file, int lineno, const char *func)
{
size_t len;
void *ptr;
@@ -265,7 +265,7 @@
return ptr;
}
-char *__ast_strndup(const char *s, size_t n, const char *file, int lineno, const char *func)
+char *__ast_strndup(const char *s, size_t n, const char *file, int lineno, const char *func)
{
size_t len;
void *ptr;
@@ -303,7 +303,7 @@
return size;
}
-int __ast_vasprintf(char **strp, const char *fmt, va_list ap, const char *file, int lineno, const char *func)
+int __ast_vasprintf(char **strp, const char *fmt, va_list ap, const char *file, int lineno, const char *func)
{
int size;
va_list ap2;
@@ -355,7 +355,7 @@
fence = (unsigned int *)(reg->data + reg->len);
if (reg->fence != FENCE_MAGIC) {
astmm_log("WARNING: Low fence violation at %p, "
- "in %s of %s, line %d\n", reg->data,
+ "in %s of %s, line %d\n", reg->data,
reg->func, reg->file, reg->lineno);
}
if (get_unaligned_uint32(fence) != FENCE_MAGIC) {
@@ -364,8 +364,8 @@
}
}
if (!fn || !strcasecmp(fn, reg->file)) {
- ast_cli(a->fd, "%10d bytes allocated%s in %20s at line %5d of %s\n",
- (int) reg->len, reg->cache ? " (cache)" : "",
+ ast_cli(a->fd, "%10d bytes allocated%s in %20s at line %5d of %s\n",
+ (int) reg->len, reg->cache ? " (cache)" : "",
reg->func, reg->lineno, reg->file);
len += reg->len;
if (reg->cache)
@@ -375,12 +375,12 @@
}
}
ast_mutex_unlock(®lock);
-
+
if (cache_len)
ast_cli(a->fd, "%d bytes allocated (%d in caches) in %d allocations\n", len, cache_len, count);
else
ast_cli(a->fd, "%d bytes allocated in %d allocations\n", len, count);
-
+
return CLI_SUCCESS;
}
@@ -399,7 +399,7 @@
int count;
struct file_summary *next;
} *list = NULL, *cur;
-
+
switch (cmd) {
case CLI_INIT:
e->command = "memory show summary";
@@ -412,7 +412,7 @@
return NULL;
}
- if (a->argc > 3)
+ if (a->argc > 3)
fn = a->argv[3];
ast_mutex_lock(®lock);
@@ -440,7 +440,7 @@
}
}
ast_mutex_unlock(®lock);
-
+
/* Dump the whole list */
for (cur = list; cur; cur = cur->next) {
len += cur->len;
@@ -448,18 +448,18 @@
count += cur->count;
if (cur->cache_len) {
if (fn) {
- ast_cli(a->fd, "%10d bytes (%10d cache) in %d allocations in function '%s' of '%s'\n",
+ ast_cli(a->fd, "%10d bytes (%10d cache) in %d allocations in function '%s' of '%s'\n",
cur->len, cur->cache_len, cur->count, cur->fn, fn);
} else {
- ast_cli(a->fd, "%10d bytes (%10d cache) in %d allocations in file '%s'\n",
+ ast_cli(a->fd, "%10d bytes (%10d cache) in %d allocations in file '%s'\n",
cur->len, cur->cache_len, cur->count, cur->fn);
}
} else {
if (fn) {
- ast_cli(a->fd, "%10d bytes in %d allocations in function '%s' of '%s'\n",
+ ast_cli(a->fd, "%10d bytes in %d allocations in function '%s' of '%s'\n",
cur->len, cur->count, cur->fn, fn);
} else {
- ast_cli(a->fd, "%10d bytes in %d allocations in file '%s'\n",
+ ast_cli(a->fd, "%10d bytes in %d allocations in file '%s'\n",
cur->len, cur->count, cur->fn);
}
}
@@ -488,11 +488,11 @@
}
ast_cli_register_multiple(cli_memory, ARRAY_LEN(cli_memory));
-
+
snprintf(filename, sizeof(filename), "%s/mmlog", ast_config_AST_LOG_DIR);
-
+
ast_verb(1, "Asterisk Malloc Debugger Started (see %s))\n", filename);
-
+
if ((mmlog = fopen(filename, "a+"))) {
fprintf(mmlog, "%ld - New session\n", (long)time(NULL));
fflush(mmlog);
Modified: team/jrose/call_identifiers/main/audiohook.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/audiohook.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/main/audiohook.c (original)
+++ team/jrose/call_identifiers/main/audiohook.c Fri Mar 23 09:13:31 2012
@@ -226,7 +226,7 @@
/* Ensure the factory is able to give us the samples we want */
if (samples > ast_slinfactory_available(factory))
return NULL;
-
+
/* Read data in from factory */
if (!ast_slinfactory_read(factory, buf, samples))
return NULL;
@@ -356,10 +356,10 @@
samples_converted = samples * (ast_format_rate(format) / (float) audiohook->hook_internal_samp_rate);
}
- if (!(read_frame = (direction == AST_AUDIOHOOK_DIRECTION_BOTH ?
- audiohook_read_frame_both(audiohook, samples_converted, read_reference, write_reference) :
- audiohook_read_frame_single(audiohook, samples_converted, direction)))) {
- return NULL;
+ if (!(read_frame = (direction == AST_AUDIOHOOK_DIRECTION_BOTH ?
+ audiohook_read_frame_both(audiohook, samples_converted, read_reference, write_reference) :
+ audiohook_read_frame_single(audiohook, samples_converted, direction)))) {
+ return NULL;
}
/* If they don't want signed linear back out, we'll have to send it through the translation path */
@@ -536,7 +536,7 @@
if (audiohook_list->out_translate[i].trans_pvt)
ast_translator_free_path(audiohook_list->out_translate[i].trans_pvt);
}
-
+
/* Free ourselves */
ast_free(audiohook_list);
@@ -770,7 +770,7 @@
* because no translation to SLINEAR audio was required.
* Part_3: Translate end_frame's audio back into the format of start frame if necessary. This
* is only necessary if manipulation of middle_frame occurred.
- *
+ *
* \param chan Channel that the list is coming off of
* \param audiohook_list List of audiohooks
* \param direction Direction frame is coming in from
@@ -929,9 +929,9 @@
wait = ast_tvadd(ast_tvnow(), ast_samp2tv(50000, 1000));
ts.tv_sec = wait.tv_sec;
ts.tv_nsec = wait.tv_usec * 1000;
-
+
ast_cond_timedwait(&audiohook->trigger, &audiohook->lock, &ts);
-
+
return;
}
Modified: team/jrose/call_identifiers/main/autoservice.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/autoservice.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/main/autoservice.c (original)
+++ team/jrose/call_identifiers/main/autoservice.c Fri Mar 23 09:13:31 2012
@@ -21,7 +21,7 @@
*
* \brief Automatic channel service routines
*
- * \author Mark Spencer <markster at digium.com>
+ * \author Mark Spencer <markster at digium.com>
* \author Russell Bryant <russell at digium.com>
*/
@@ -52,7 +52,7 @@
struct asent {
struct ast_channel *chan;
/*! This gets incremented each time autoservice gets started on the same
- * channel. It will ensure that it doesn't actually get stopped until
+ * channel. It will ensure that it doesn't actually get stopped until
* it gets stopped for the last time. */
unsigned int use_count;
unsigned int orig_end_dtmf_flag:1;
@@ -141,11 +141,11 @@
if (defer_frame) {
for (i = 0; i < x; i++) {
struct ast_frame *dup_f;
-
+
if (mons[i] != chan) {
continue;
}
-
+
if (defer_frame != f) {
if ((dup_f = ast_frdup(defer_frame))) {
AST_LIST_INSERT_HEAD(&ents[i]->deferred_frames, dup_f, frame_list);
@@ -158,7 +158,7 @@
AST_LIST_INSERT_HEAD(&ents[i]->deferred_frames, dup_f, frame_list);
}
}
-
+
break;
}
} else if (f) {
@@ -192,7 +192,7 @@
if (!(as = ast_calloc(1, sizeof(*as))))
return -1;
-
+
/* New entry created */
as->chan = chan;
as->use_count = 1;
@@ -247,7 +247,7 @@
/* Find the entry, but do not free it because it still can be in the
autoservice thread array */
- AST_LIST_TRAVERSE_SAFE_BEGIN(&aslist, as, list) {
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&aslist, as, list) {
if (as->chan == chan) {
as->use_count--;
if (as->use_count < 1) {
Modified: team/jrose/call_identifiers/main/callerid.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/call_identifiers/main/callerid.c?view=diff&rev=360260&r1=360259&r2=360260
==============================================================================
--- team/jrose/call_identifiers/main/callerid.c (original)
+++ team/jrose/call_identifiers/main/callerid.c Fri Mar 23 09:13:31 2012
@@ -18,9 +18,9 @@
/*! \file
*
- * \brief CallerID Generation support
+ * \brief CallerID Generation support
*
- * \author Mark Spencer <markster at digium.com>
+ * \author Mark Spencer <markster at digium.com>
*/
#include "asterisk.h"
@@ -53,7 +53,7 @@
int sawflag;
int len;
- int skipflag;
+ int skipflag;
unsigned short crc;
};
@@ -81,14 +81,14 @@
*cr1 = t;
t = 2.0 - (*cr1 * *cr1 + *ci1 * *ci1);
*cr1 *= t;
- *ci1 *= t;
+ *ci1 *= t;
t = *cr2 * ddr2 - *ci2 * ddi2;
*ci2 = *cr2 * ddi2 + *ci2 * ddr2;
*cr2 = t;
t = 2.0 - (*cr2 * *cr2 + *ci2 * *ci2);
*cr2 *= t;
- *ci2 *= t;
+ *ci2 *= t;
buf[x] = AST_LIN2X((*cr1 + *cr2) * 2048.0);
}
}
@@ -103,7 +103,7 @@
*cr1 = t;
t = 2.0 - (*cr1 * *cr1 + *ci1 * *ci1);
*cr1 *= t;
- *ci1 *= t;
+ *ci1 *= t;
buf[x] = AST_LIN2X(*cr1 * 8192.0);
}
}
@@ -129,12 +129,12 @@
if ((cid = ast_calloc(1, sizeof(*cid)))) {
#ifdef INTEGER_CALLERID
- cid->fskd.ispb = 7; /* 1200 baud */
+ cid->fskd.ispb = 7; /* 1200 baud */
/* Set up for 1200 / 8000 freq *32 to allow ints */
[... 8526 lines stripped ...]
More information about the svn-commits
mailing list