]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
if plus a space
authorBrian West <brian@freeswitch.org>
Mon, 6 Oct 2008 19:21:59 +0000 (19:21 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 6 Oct 2008 19:21:59 +0000 (19:21 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9855 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c
src/mod/applications/mod_voicemail/mod_voicemail.c
src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c
src/mod/formats/mod_shout/mod_shout.c
src/mod/loggers/mod_syslog/mod_syslog.c
src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
src/mod/xml_int/mod_xml_ldap/mod_xml_ldap.c
src/switch_core_port_allocator.c
src/switch_stun.c
src/switch_xml.c

index 66346dfd69f259501f945f804903b47df6de82d0..7b6de973a7b91c85b0b4baaa9001ad9daf7cabbe 100644 (file)
@@ -247,7 +247,7 @@ SWITCH_STANDARD_API(eval_function)
 SWITCH_STANDARD_API(module_exists_function)
 {
        if (!switch_strlen_zero(cmd)) {
-               if(switch_loadable_module_exists(cmd) == SWITCH_STATUS_SUCCESS) {
+               if (switch_loadable_module_exists(cmd) == SWITCH_STATUS_SUCCESS) {
                        stream->write_function(stream, "true");
                } else {
                        stream->write_function(stream, "false");
index 2676ea82ed49cb3467f9ed117a35343cfaa5a252..6f497c76f50cf0b1d1a529c171db3981c5008129 100644 (file)
@@ -2231,7 +2231,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
                switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_file_path", file_path);
                switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_read_flags", read_flags);
                
-               if(!switch_strlen_zero(vm_timezone)) {
+               if (!switch_strlen_zero(vm_timezone)) {
                        char tz_date[80] = "";
                        if ((switch_strftime_tz(vm_timezone, profile->date_fmt, tz_date, sizeof(tz_date)) == SWITCH_STATUS_SUCCESS) && !switch_strlen_zero_buf(tz_date)) {
                                switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "voicemail_time", tz_date);
index 6c874a51e06e27f470750ec53e9918600fd13ed6..7f22eacdb3628e688be558d7111bf5c79f856013 100644 (file)
@@ -266,7 +266,7 @@ static mrcp_status_t openmrcp_recog_start(mrcp_client_context_t *context, openmr
 
        recognizer_header = mrcp_resource_header_prepare(mrcp_message);
 
-       if(!recognizer_header) {
+       if (!recognizer_header) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not prepare resource_header\n");
                return MRCP_STATUS_FAILURE;
        }
index 02426c7f7dccbd5ebb203d0c2399c8eab0651525..e52a8a6d6a26dee724f8018844f07ceb3c44fcf8 100644 (file)
@@ -616,6 +616,7 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, const char
                        mpg123_param(context->mh, MPG123_FLAGS, MPG123_SEEKBUFFER|MPG123_MONO_MIX, 0);
                        context->stream_url = switch_core_sprintf(context->memory_pool, "http://%s", path);
                        context->prebuf = handle->prebuf;
+                       handle->vol = -4;
                        launch_read_stream_thread(context);
                } else {
                        mpg123_param(context->mh, MPG123_FLAGS, MPG123_MONO_MIX, 0);
index 8ea4103a2398df9e21357e44acc5e16494bc9ef1..ba7de4c29c9dfc958053075f02085e5f07774de2 100644 (file)
@@ -99,7 +99,7 @@ static switch_status_t mod_syslog_logger(const switch_log_node_t *node, switch_l
        }
 
        /* don't log blank lines */
-       if(!switch_strlen_zero(node->data) && (strspn(node->data, " \t\r\n") < strlen(node->data))) {
+       if (!switch_strlen_zero(node->data) && (strspn(node->data, " \t\r\n") < strlen(node->data))) {
                syslog(syslog_level, "%s", node->data);
        }
 
@@ -128,8 +128,7 @@ static switch_status_t load_config(void)
                                        set_global_format(val);
                 } else if (!strcasecmp(var, "loglevel") && !switch_strlen_zero(val)) {
                     log_level = switch_log_str2level(val);
-                    if(log_level == SWITCH_LOG_INVALID)
-                    {
+                    if (log_level == SWITCH_LOG_INVALID) {
                         log_level = SWITCH_LOG_WARNING;
                     }
                 }
index ba5992754d58ea7b5e26e668e5410ba4eb30c34e..a008a06aa3a9b68c7ac1dd0a76ce5c73b7a7ee7b 100644 (file)
@@ -306,12 +306,12 @@ static switch_status_t do_config(void)
 
                binding->vars_map = vars_map;
                
-               if(vars_map) {
+               if (vars_map) {
                    switch_zmalloc(hash_node,sizeof(hash_node_t));
                    hash_node->hash = vars_map;
                    hash_node->next = NULL;
                    
-                   if(!globals.hash_root) {
+                   if (!globals.hash_root) {
                        globals.hash_root = hash_node;
                        globals.hash_tail = globals.hash_root;
                    }
index f7f6bc28bf1c4e606f1c9127f3301a69c87ef855..7f542a403eb12d8531ee3fa207ed0d087f812f1d 100644 (file)
@@ -389,7 +389,7 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
        //switch_xml_toxml_buf(xml,buf,0,0,1);
        //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "providing:\n%s\n", buf);
 
-       if(ret) {
+       if (ret) {
                switch_xml_free(xml);
                return NULL;
        }
index feff7c3970d0b158938c17ca584f4b5380c4d9ef..c4c351058749d6f6f76546b51a75a53d9006a090 100644 (file)
@@ -131,7 +131,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
                while (alloc->track[index] && tries < alloc->track_len)
                {
                        tries++;
-                       if(++index >= alloc->track_len) index = 0;
+                       if (++index >= alloc->track_len) { 
+                               index = 0;
+                       }
                }
 
                if (tries < alloc->track_len) {
index 545462eecbe2400b6e5e345a780847e5a4ea5fad..ee0cc4be5764cefce82af6833ff9648b0444ce1d 100644 (file)
@@ -538,8 +538,7 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
                switch (attr->type) {
                case SWITCH_STUN_ATTR_MAPPED_ADDRESS:
                        if (attr->type) {
-                               if(funny)
-                               {
+                               if (funny) {
                                        ((switch_stun_ip_t *) attr->value)->address ^= ntohl(0xabcdabcd);
                                }
                                switch_stun_packet_attribute_get_mapped_address(attr, rip, &rport);
index 22c1b22b1909f9ada85d8d36160b4e0c3e1ff466..33344c90005ce3d0bc9ab479251792b81c517733 100644 (file)
@@ -1082,7 +1082,7 @@ static int preprocess_glob(const char *cwd, const char *pattern, int write_fd, i
                pattern = full_path;
        }
        
-    if(glob(pattern, GLOB_NOCHECK, NULL, &glob_data) != 0) {
+    if (glob(pattern, GLOB_NOCHECK, NULL, &glob_data) != 0) {
                if (stderr) {
                        fprintf(stderr, "Error including %s\n", pattern);
                }
@@ -1154,7 +1154,7 @@ static int preprocess(const char *cwd, const char *file, int write_fd, int rleve
                        if ((e = strstr(tcmd, "/>"))) {
                                *e += 2;
                                *e = '\0';
-                               if(write(write_fd, e, (unsigned) strlen(e)) != (int) strlen(e)) {
+                               if (write(write_fd, e, (unsigned) strlen(e)) != (int) strlen(e)) {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Short write!\n");
                                }
                        }
@@ -1223,13 +1223,13 @@ static int preprocess(const char *cwd, const char *file, int write_fd, int rleve
                }
                
                if ((cmd = strstr(bp, "<!--#"))) {
-                       if(write(write_fd, bp, (unsigned) (cmd - bp)) != (cmd - bp)) {
+                       if (write(write_fd, bp, (unsigned) (cmd - bp)) != (cmd - bp)) {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Short write!\n");
                        }
                        if ((e = strstr(cmd, "-->"))) {
                                *e = '\0';
                                e += 3;
-                               if(write(write_fd, e, (unsigned) strlen(e)) != (int) strlen(e)) {
+                               if (write(write_fd, e, (unsigned) strlen(e)) != (int) strlen(e)) {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Short write!\n");
                                }
                        } else {
@@ -1279,7 +1279,7 @@ static int preprocess(const char *cwd, const char *file, int write_fd, int rleve
                        continue;
                }
 
-               if(write(write_fd, bp, (unsigned) cur) != (int) cur) {
+               if (write(write_fd, bp, (unsigned) cur) != (int) cur) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Short write!\n");
                }
        }
@@ -2490,7 +2490,7 @@ static int glob3(char *pathbuf, char *pathend, char *pathend_last, char *pattern
        *pathend = EOS;
        errno = 0;
        
-       if(apr_dir_open (&dirp, pathbuf, pool) != APR_SUCCESS) {
+       if (apr_dir_open (&dirp, pathbuf, pool) != APR_SUCCESS) {
                /* TODO: don't call for ENOENT or ENOTDIR? */
                apr_pool_destroy(pool);
                if (pglob->gl_errfunc) {
@@ -2510,9 +2510,9 @@ static int glob3(char *pathbuf, char *pathend, char *pathend_last, char *pattern
                unsigned char *sc;
                char *dc;
                
-               if(apr_dir_read(&dp, APR_FINFO_NAME, dirp) != APR_SUCCESS)
+               if (apr_dir_read(&dp, APR_FINFO_NAME, dirp) != APR_SUCCESS)
                        break;
-               if(!(dp.valid & APR_FINFO_NAME) || !(dp.name) || !strlen(dp.name))
+               if (!(dp.valid & APR_FINFO_NAME) || !(dp.name) || !strlen(dp.name))
                        break;
                
                /* Initial DOT must be matched literally. */
@@ -2533,7 +2533,7 @@ static int glob3(char *pathbuf, char *pathend, char *pathend_last, char *pattern
                        break;
        }
        
-       if(dirp) 
+       if (dirp) 
                apr_dir_close (dirp);
        apr_pool_destroy(pool);
        return(err);