aboutsummaryrefslogtreecommitdiffstats
path: root/main/dial.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-06 00:14:32 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-06 00:14:32 +0000
commitf9f33f16fbad3c7f228791cb1f4e38b4d73ced73 (patch)
tree629fd8245dca6f6351b5dcf9560420dfb221655e /main/dial.c
parentc7864bc14b10cc91805378e278f007019dfc7187 (diff)
Merged revisions 105840 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r105840 | tilghman | 2008-03-04 17:04:29 -0600 (Tue, 04 Mar 2008) | 2 lines Whitespace changes only ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106306 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/dial.c')
-rw-r--r--main/dial.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/main/dial.c b/main/dial.c
index b7dcec2ef..22472a89e 100644
--- a/main/dial.c
+++ b/main/dial.c
@@ -174,12 +174,13 @@ static const struct ast_option_types {
};
/*! \brief free the buffer if allocated, and set the pointer to the second arg */
-#define S_REPLACE(s, new_val) \
- do { \
- if (s) \
- free(s); \
- s = (new_val); \
- } while (0)
+#define S_REPLACE(s, new_val) \
+ do { \
+ if (s) { \
+ free(s); \
+ } \
+ s = (new_val); \
+ } while (0)
/*! \brief Maximum number of channels we can watch at a time */
#define AST_MAX_WATCHERS 256
@@ -871,7 +872,7 @@ int ast_dial_destroy(struct ast_dial *dial)
}
AST_LIST_TRAVERSE_SAFE_END;
AST_LIST_UNLOCK(&dial->channels);
-
+
/* Disable any enabled options globally */
for (i = 0; i < AST_DIAL_OPTION_MAX; i++) {
if (!dial->options[i])
@@ -954,7 +955,7 @@ int ast_dial_option_enable(struct ast_dial *dial, int num, enum ast_dial_option
if (channel->options[option])
return -1;
- /* Execute enable callback if it exists, if not simply make sure the value is set */
+ /* Execute enable callback if it exists, if not simply make sure the value is set */
if (option_types[option].enable)
channel->options[option] = option_types[option].enable(data);
else
@@ -970,9 +971,10 @@ int ast_dial_option_enable(struct ast_dial *dial, int num, enum ast_dial_option
*/
int ast_dial_option_global_disable(struct ast_dial *dial, enum ast_dial_option option)
{
- /* If the option is not enabled, return failure */
- if (!dial->options[option])
- return -1;
+ /* If the option is not enabled, return failure */
+ if (!dial->options[option]) {
+ return -1;
+ }
/* Execute callback of option to disable if it exists */
if (option_types[option].disable)
@@ -981,7 +983,7 @@ int ast_dial_option_global_disable(struct ast_dial *dial, enum ast_dial_option o
/* Finally disable option on the structure */
dial->options[option] = NULL;
- return 0;
+ return 0;
}
/*! \brief Disables an option per channel