From c15d7892c072eb15e57f92f9279ab4f0bd85269e Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 30 Mar 2007 00:15:25 +0000 Subject: [PATCH] indent again git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4799 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- build/indent_options.sh | 2 +- src/include/private/switch_core.h | 4 +- src/include/switch_apr.h | 38 +-- src/include/switch_bitpack.h | 5 +- src/include/switch_buffer.h | 5 +- src/include/switch_caller.h | 5 +- src/include/switch_channel.h | 7 +- src/include/switch_core.h | 36 +-- src/include/switch_core_db.h | 16 +- src/include/switch_core_event_hook.h | 3 +- src/include/switch_event.h | 5 +- src/include/switch_ivr.h | 15 +- src/include/switch_loadable_module.h | 2 +- src/include/switch_log.h | 2 +- src/include/switch_platform.h | 6 +- src/include/switch_regex.h | 9 +- src/include/switch_resample.h | 2 +- src/include/switch_rtp.h | 7 +- src/include/switch_sqlite.h | 271 ++++++------------ src/include/switch_stun.h | 6 +- src/include/switch_types.h | 5 +- src/include/switch_utils.h | 2 +- src/include/switch_xml.h | 5 +- .../applications/mod_commands/mod_commands.c | 3 +- .../mod_conference/mod_conference.c | 27 +- .../applications/mod_ivrtest/mod_ivrtest.c | 3 +- src/mod/applications/mod_rss/mod_rss.c | 3 +- src/mod/codecs/mod_amr/mod_amr.c | 6 +- src/mod/codecs/mod_g711/mod_g711.c | 12 +- src/mod/codecs/mod_g722/mod_g722.c | 6 +- src/mod/codecs/mod_g723_1/mod_g723_1.c | 6 +- src/mod/codecs/mod_g726/mod_g726.c | 6 +- src/mod/codecs/mod_g729/mod_g729.c | 6 +- src/mod/codecs/mod_ilbc/mod_ilbc.c | 6 +- src/mod/codecs/mod_l16/mod_l16.c | 6 +- src/mod/codecs/mod_lpc10/mod_lpc10.c | 6 +- src/mod/codecs/mod_speex/mod_speex.c | 6 +- .../mod_dialplan_directory.c | 3 +- .../mod_dialplan_xml/mod_dialplan_xml.c | 3 +- .../endpoints/mod_dingaling/mod_dingaling.c | 25 +- src/mod/endpoints/mod_iax/mod_iax.c | 4 +- .../endpoints/mod_portaudio/mod_portaudio.c | 22 +- src/mod/endpoints/mod_portaudio/pablio.c | 3 +- src/mod/endpoints/mod_sofia/mod_sofia.c | 40 ++- .../mod_wanpipe/libsangoma/win_api_common.h | 12 +- src/mod/endpoints/mod_wanpipe/mod_wanpipe.c | 22 +- .../endpoints/mod_wanpipe/ss7boost_client.c | 2 +- .../endpoints/mod_wanpipe/ss7boost_client.h | 2 +- src/mod/endpoints/mod_woomera/mod_woomera.c | 4 +- src/mod/event_handlers/mod_cdr/cdrcontainer.h | 4 +- src/mod/formats/mod_shout/mod_shout.c | 3 +- src/mod/languages/mod_perl/switch_swig_wrap.c | 9 +- .../languages/mod_python/switch_swig_wrap.c | 24 +- .../mod_spidermonkey/mod_spidermonkey.c | 6 +- .../mod_spidermonkey_etpan.c | 3 +- src/mod/say/mod_say_en/mod_say_en.c | 6 +- src/mod/xml_int/mod_xml_curl/mod_xml_curl.c | 3 +- src/switch_apr.c | 33 +-- src/switch_buffer.c | 5 +- src/switch_caller.c | 5 +- src/switch_channel.c | 7 +- src/switch_core.c | 5 +- src/switch_core_asr.c | 2 +- src/switch_core_codec.c | 11 +- src/switch_core_db.c | 16 +- src/switch_core_directory.c | 4 +- src/switch_core_file.c | 2 +- src/switch_core_hash.c | 2 +- src/switch_core_io.c | 15 +- src/switch_core_memory.c | 10 +- src/switch_core_rwlock.c | 6 +- src/switch_core_session.c | 8 +- src/switch_core_sqldb.c | 6 +- src/switch_core_state_machine.c | 21 +- src/switch_core_timer.c | 2 +- src/switch_event.c | 5 +- src/switch_ivr.c | 5 +- src/switch_ivr_async.c | 3 +- src/switch_ivr_bridge.c | 9 +- src/switch_ivr_menu.c | 8 +- src/switch_ivr_originate.c | 14 +- src/switch_ivr_play_say.c | 9 +- src/switch_loadable_module.c | 2 +- src/switch_log.c | 2 +- src/switch_regex.c | 4 +- src/switch_resample.c | 5 +- src/switch_rtp.c | 27 +- src/switch_stun.c | 14 +- src/switch_swig.c | 3 +- src/switch_utils.c | 2 +- src/switch_xml.c | 5 +- 91 files changed, 546 insertions(+), 491 deletions(-) diff --git a/build/indent_options.sh b/build/indent_options.sh index b6e23f7f49..ef842fb22a 100755 --- a/build/indent_options.sh +++ b/build/indent_options.sh @@ -1,4 +1,4 @@ #!/bin/bash -echo -n "-brs -npsl -di0 -br -ce -d0 -cli0 -npcs -nfc1 -ut -i4 -ts4 -l160 -cs -T size_t " > ./.indent.pro +echo -n "-brs -npsl -di0 -br -ce -d0 -cli0 -npcs -nfc1 -ut -i4 -ts4 -l155 -cs -T size_t " > ./.indent.pro grep typedef ./src/include/*.h | grep switch_ | grep -v "\*\|{" | sed -e s/struct// | perl -ne '@l = split; $l[2] =~ s/;//g ; print "-T $l[2] "' >> ./.indent.pro grep "} switch_" ./src/include/*.h | perl -ne '@l = split; $l[1] =~ s/;//g ; print " -T $l[1] "' >> ./.indent.pro diff --git a/src/include/private/switch_core.h b/src/include/private/switch_core.h index 03777a2560..90a4a344aa 100644 --- a/src/include/private/switch_core.h +++ b/src/include/private/switch_core.h @@ -143,7 +143,7 @@ struct switch_media_bug { struct switch_media_bug *next; }; -SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t * pool); +SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t *pool); SWITCH_DECLARE(void) switch_core_sqldb_stop(void); -SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t * pool); +SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t *pool); SWITCH_DECLARE(switch_memory_pool_t *) switch_core_memory_init(void); diff --git a/src/include/switch_apr.h b/src/include/switch_apr.h index 11871f8dfb..88d01e11ce 100644 --- a/src/include/switch_apr.h +++ b/src/include/switch_apr.h @@ -55,7 +55,7 @@ SWITCH_BEGIN_EXTERN_C * @{ */ /** The fundamental pool type */ -typedef struct apr_pool_t switch_memory_pool_t; + typedef struct apr_pool_t switch_memory_pool_t; /** @@ -66,7 +66,7 @@ typedef struct apr_pool_t switch_memory_pool_t; * to re-use this memory for the next allocation. * @see apr_pool_destroy() */ -SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p); +SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p); /** @} */ @@ -93,7 +93,7 @@ SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p); * @bug We aught to provide an alternative to RTLD_GLOBAL, which * is the only supported method of loading DSOs today. */ -SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t * ctx); +SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t *ctx); /** * Close a DSO library. @@ -163,7 +163,7 @@ SWITCH_DECLARE(char *) switch_copy_string(char *dst, const char *src, switch_siz * progress at the same time. */ -SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t * p, switch_hash_t * ht); +SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t * ht); /** * Continue iterating over the entries in a hash table. @@ -333,7 +333,7 @@ SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t); * it will behave as either a nested or an unnested lock. * */ -SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t *pool); /** @@ -375,7 +375,7 @@ SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t * lock); /** Opaque structure used for the rwlock */ typedef struct apr_thread_rwlock_t switch_thread_rwlock_t; -SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t *pool); SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_destroy(switch_thread_rwlock_t * rwlock); SWITCH_DECLARE(switch_memory_pool_t *) switch_thread_rwlock_pool_get(switch_thread_rwlock_t * rwlock); SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_rdlock(switch_thread_rwlock_t * rwlock); @@ -408,7 +408,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock * will be stored. * @param pool the pool from which to allocate the mutex. */ -SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t *pool); /** * Put the active calling thread to sleep until signaled to wake up. Each @@ -522,7 +522,7 @@ SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t * uuid, const ch * @param queue_capacity maximum size of the queue * @param a pool to allocate queue from */ -SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t *pool); /** * pop/get an object from the queue, blocking if the queue is already empty @@ -676,7 +676,8 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t * queue, voi * @remark If perm is SWITCH_FPROT_OS_DEFAULT and the file is being created, * appropriate default permissions will be used. */ -SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, + switch_memory_pool_t *pool); SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t * thefile, switch_seek_where_t where, int64_t *offset); @@ -694,7 +695,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile); * @remark If the file is open, it won't be removed until all * instances are closed. */ -SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool); /** * Read data from the specified file. @@ -762,7 +763,7 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadatt * @param new_attr The newly created threadattr. * @param cont The pool to use */ -SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t *pool); /** * Set if newly created threads should be created in detached state. @@ -780,7 +781,7 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_detach_set(switch_threadattr_t * @param cont The pool to use */ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr, - switch_thread_start_t func, void *data, switch_memory_pool_t * cont); + switch_thread_start_t func, void *data, switch_memory_pool_t *cont); /** @} */ @@ -846,7 +847,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thre * @param protocol The protocol of the socket (e.g., SWITCH_PROTO_TCP). * @param pool The pool to use */ -SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t *pool); /** * Shutdown either reading, writing, or both sides of a socket. @@ -895,7 +896,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t * sock, int * @param sock The socket we are listening on. * @param connection_pool The pool for the new socket. */ -SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t *pool); /** * Issue a connection request to a socket either on the same machine @@ -935,7 +936,7 @@ SWITCH_DECLARE(switch_status_t) switch_sockaddr_ip_get(char **addr, switch_socka * @param p The pool for the apr_sockaddr_t and associated storage. */ SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname, - int32_t family, switch_port_t port, int32_t flags, switch_memory_pool_t * pool); + int32_t family, switch_port_t port, int32_t flags, switch_memory_pool_t *pool); /** * Send data over a network. @@ -963,7 +964,8 @@ SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t * sock, const * @param buf The data to send * @param len The length of the data to send */ -SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t * sock, switch_sockaddr_t * where, int32_t flags, const char *buf, switch_size_t *len); +SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t * sock, switch_sockaddr_t * where, int32_t flags, const char *buf, + switch_size_t *len); /** * @param from The apr_sockaddr_t to fill in the recipient info @@ -1084,7 +1086,7 @@ SWITCH_DECLARE(switch_status_t) switch_mcast_join(switch_socket_t * sock, switch * platforms; the apr_pollset_create() call will fail with * APR_ENOTIMPL on platforms where it is not supported. */ -SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t * p, uint32_t flags); +SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t *p, uint32_t flags); /** * Add a socket or file descriptor to a pollset @@ -1128,7 +1130,7 @@ SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t * aprset, int32_t nu \param pool the memory pool to use \return SWITCH_STATUS_SUCCESS when successful */ -SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t *pool); /** @} */ diff --git a/src/include/switch_bitpack.h b/src/include/switch_bitpack.h index e9a98c0b9a..5f07a1f050 100644 --- a/src/include/switch_bitpack.h +++ b/src/include/switch_bitpack.h @@ -72,8 +72,9 @@ static const uint8_t SWITCH_REVERSE_BITPACKED_MASKS[] = { 255, 254, 252, 248, 24 \param buflen the length of the storage buffer \param mode RFC3551 or AAL2 mode (curse you backwards folks) */ -DoxyDefine(void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t * buf, uint32_t buflen, switch_bitpack_mode_t mode)) - static inline int8_t switch_bitpack_init(switch_bitpack_t *pack, switch_byte_t bitlen, switch_byte_t * buf, uint32_t buflen, switch_bitpack_mode_t mode) +DoxyDefine(void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t *buf, uint32_t buflen, switch_bitpack_mode_t mode)) + static inline int8_t switch_bitpack_init(switch_bitpack_t *pack, switch_byte_t bitlen, switch_byte_t *buf, uint32_t buflen, + switch_bitpack_mode_t mode) { if (!pack || (bitlen > SWITCH_BITS_PER_BYTE) || !buf || !buflen) { return -1; diff --git a/src/include/switch_buffer.h b/src/include/switch_buffer.h index 46e3f98952..fb9a73425c 100644 --- a/src/include/switch_buffer.h +++ b/src/include/switch_buffer.h @@ -58,7 +58,7 @@ SWITCH_BEGIN_EXTERN_C * \param max_len length required by the buffer * \return status */ -SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool, switch_buffer_t **buffer, switch_size_t max_len); +SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len); /*! \brief Allocate a new dynamic switch_buffer * \param buffer returned pointer to the new buffer @@ -67,7 +67,8 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool * \param max_len length the buffer is allowed to grow to * \return status */ -SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, switch_size_t max_len); +SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, + switch_size_t max_len); /*! \brief Get the length of a switch_buffer_t * \param buffer any buffer of type switch_buffer_t diff --git a/src/include/switch_caller.h b/src/include/switch_caller.h index 3387c39440..b2e429ffb1 100644 --- a/src/include/switch_caller.h +++ b/src/include/switch_caller.h @@ -164,7 +164,7 @@ SWITCH_DECLARE(char *) switch_caller_get_field_by_name(switch_caller_profile_t * \param destination_number destination number \return a new profile object allocated from the session's memory pool */ -SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t * pool, +SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t *pool, const char *username, const char *dialplan, const char *caller_id_name, @@ -172,7 +172,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor const char *network_addr, const char *ani, const char *aniii, - const char *rdnis, const char *source, const char *context, const char *destination_number); + const char *rdnis, const char *source, const char *context, + const char *destination_number); /*! \brief Clone an existing caller profile object diff --git a/src/include/switch_channel.h b/src/include/switch_channel.h index 67c01f4ffe..347b5ef436 100644 --- a/src/include/switch_channel.h +++ b/src/include/switch_channel.h @@ -118,7 +118,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch \param pool memory_pool to use for allocation \return SWITCH_STATUS_SUCCESS if successful */ -SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool); /*! \brief Connect a newly allocated channel to a session object and setup it's initial state @@ -127,7 +127,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, \param state the initial state of the channel \param flags the initial channel flags */ -SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, uint32_t flags); +SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, + uint32_t flags); /*! \brief Fire A presence event for the channel @@ -226,7 +227,7 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch * pool is NULL, then an internal, non-thread-safe iterator is used. * @remark Use switch_hash_next and switch_hash_this with this function to iterate all the channel variables */ -SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool); /*! \brief Assign a caller extension to a given channel diff --git a/src/include/switch_core.h b/src/include/switch_core.h index 63e1067cc6..f00466319e 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -315,13 +315,13 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl \brief Create a new sub memory pool from the core's master pool \return SWITCH_STATUS_SUCCESS on success */ -SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t ** pool); +SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool); /*! \brief Returns a subpool back to the main pool \return SWITCH_STATUS_SUCCESS on success */ -SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t ** pool); +SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool); /*! \brief Start the session's state machine @@ -349,7 +349,7 @@ SWITCH_DECLARE(void *) switch_core_permanent_alloc(switch_size_t memory); \param memory the number of bytes to allocate \return a void pointer to the allocated memory */ -SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t * pool, switch_size_t memory); +SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size_t memory); /*! \brief Allocate memory from a session's pool @@ -381,7 +381,7 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session_t *session \param todup the string to duplicate \return a pointer to the newly duplicated string */ -SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const char *todup); +SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t *pool, const char *todup); /*! \brief printf-style style printing routine. The data is output to a string allocated from the session @@ -399,7 +399,7 @@ SWITCH_DECLARE(char *) switch_core_session_sprintf(switch_core_session_t *sessio \param ... The arguments to use while printing the data \return The new string */ -SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t * pool, const char *fmt, ...); +SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t *pool, const char *fmt, ...); /*! \brief Retrieve the memory pool from a session @@ -420,7 +420,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(switch_core_ \return the newly created session */ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t - *endpoint_interface, switch_memory_pool_t ** pool); + *endpoint_interface, switch_memory_pool_t **pool); /*! \brief Destroy a session and return the memory pool to the core @@ -441,7 +441,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void); \param pool the pool to use \return the newly created session */ -SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t ** pool); +SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t **pool); /*! \brief Launch the session thread (state machine) on a given session @@ -637,7 +637,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session, SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session, char *endpoint_name, switch_caller_profile_t *caller_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_core_session_t **new_session, switch_memory_pool_t **pool); /*! \brief Answer the channel of a given session @@ -778,7 +778,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio \param pool the pool to use for the new hash \return SWITCH_STATUS_SUCCESS if the hash is created */ -SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t *pool); /*! \brief Destroy an existing hash table @@ -835,7 +835,7 @@ SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t * hash, const char *k \param pool the memory pool to use for allocation \return */ -SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool); /*! \brief Wait for one cycle on an existing timer @@ -888,7 +888,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, uint32_t rate, int ms, int channels, - uint32_t flags, const switch_codec_settings_t *codec_settings, switch_memory_pool_t * pool); + uint32_t flags, const switch_codec_settings_t *codec_settings, switch_memory_pool_t *pool); /*! \brief Encode data using a codec handle @@ -988,7 +988,7 @@ SWITCH_DECLARE(switch_core_db_t *) switch_core_db_open_file(char *filename); \return SWITCH_STATUS_SUCCESS if successful */ -SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t * db, char *sql, uint32_t retries); +SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t *db, char *sql, uint32_t retries); /*! \brief perform a test query then perform a reactive query if the first one fails @@ -996,7 +996,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db \param test_sql the test sql \param reactive_sql the reactive sql */ -SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *test_sql, char *reactive_sql); +SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *test_sql, char *reactive_sql); #define SWITCH_CORE_DB "core" /*! @@ -1021,7 +1021,7 @@ SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *t \note the loadable module used is chosen based on the file extension */ SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh, - char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t * pool); + char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t *pool); /*! \brief Read media from a file handle \param fh the file handle to read from (must be initilized by you memset all 0 for read, fill in channels and rate for write) @@ -1092,7 +1092,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh) */ SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh, char *module_name, - char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t * pool); + char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t *pool); /*! \brief Feed text to the TTS module \param sh the speech handle to feed @@ -1165,7 +1165,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t */ SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah, char *module_name, - char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t * pool); + char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool); /*! \brief Close an asr handle @@ -1250,7 +1250,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_resume(switch_asr_handle_t *ah); \return SWITCH_STATUS_SUCCESS if the handle is opened */ SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh, - char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t * pool); + char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t *pool); /*! \brief Query a directory handle @@ -1360,7 +1360,7 @@ SWITCH_DECLARE(FILE *) switch_core_get_console(void); /*! \brief Launch a thread */ -SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t * pool); +SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t *pool); /*! \brief Initiate Globals diff --git a/src/include/switch_core_db.h b/src/include/switch_core_db.h index 131d715560..6fc3c79c00 100644 --- a/src/include/switch_core_db.h +++ b/src/include/switch_core_db.h @@ -50,7 +50,7 @@ SWITCH_BEGIN_EXTERN_C * Each open database is represented by an instance of the * following opaque structure. */ -typedef struct sqlite3 switch_core_db_t; + typedef struct sqlite3 switch_core_db_t; typedef struct sqlite3_stmt switch_core_db_stmt_t; typedef int (*switch_core_db_callback_func_t) (void *pArg, int argc, char **argv, char **columnNames); @@ -82,7 +82,7 @@ typedef void (*switch_core_db_destructor_type_t) (void *); * this routine is called. Otherwise, SWITCH_CORE_DB_BUSY is returned and the * database connection remains open. */ -SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db); +SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db); /** * Open the database file "filename". The "filename" is UTF-8 @@ -99,7 +99,7 @@ SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db); * with the switch_core_db_t* handle should be released by passing it to * switch_core_db_close() when it is no longer required. */ -SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t ** ppDb); +SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb); /** * The next group of routines returns information about the information @@ -164,7 +164,7 @@ SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt); * The string "not an error" is returned when the most recent API call was * successful. */ -SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db); +SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t *db); /** * A function to executes one or more statements of SQL. @@ -206,7 +206,7 @@ SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db); * behavior can be modified somewhat using the sswitch_core_db_busy_handler() * and switch_core_db_busy_timeout() functions below.) */ -SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t * db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg); +SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg); /** * This function is called to delete a compiled @@ -246,7 +246,7 @@ SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt); * * On success, SWITCH_CORE_DB_OK is returned. Otherwise an error code is returned. */ -SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t * db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail); +SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail); /** * After an SQL query has been compiled with a call to either @@ -396,7 +396,7 @@ SWITCH_DECLARE(int) switch_core_db_bind_double(switch_core_db_stmt_t *pStmt, int * * This function is similar to the mysql_insert_id() function from MySQL. */ -SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db); +SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t *db); /** * This next routine is really just a wrapper around switch_core_db_exec(). @@ -439,7 +439,7 @@ SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db); * * The return value of this routine is the same as from switch_core_db_exec(). */ -SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t * db, /* An open database */ +SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t *db, /* An open database */ const char *sql, /* SQL to be executed */ char ***resultp, /* Result written to a char *[] that this points to */ int *nrow, /* Number of result rows written here */ diff --git a/src/include/switch_core_event_hook.h b/src/include/switch_core_event_hook.h index 5838733d68..3084343a43 100644 --- a/src/include/switch_core_event_hook.h +++ b/src/include/switch_core_event_hook.h @@ -177,7 +177,8 @@ extern switch_io_event_hooks_t switch_core_session_get_event_hooks(switch_core_s \param outgoing_channel hook to bind \return SWITCH_STATUS_SUCCESS on suceess */ -SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(switch_core_session_t *session, switch_outgoing_channel_hook_t outgoing_channel); +SWITCH_DECLARE(switch_status_t) switch_core_event_hook_add_outgoing_channel(switch_core_session_t *session, + switch_outgoing_channel_hook_t outgoing_channel); /*! \brief Add an event hook to be executed when a session answers a channel diff --git a/src/include/switch_event.h b/src/include/switch_event.h index eb8957148a..a34e0571b4 100644 --- a/src/include/switch_event.h +++ b/src/include/switch_event.h @@ -123,7 +123,7 @@ struct switch_event_node { \param pool the memory pool to use for the event system (creates a new one if NULL) \return SWITCH_STATUS_SUCCESS when complete */ -SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool); /*! \brief Stop the eventing system @@ -208,7 +208,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun \param user_data optional user specific data to pass whenever the callback is invoked \return SWITCH_STATUS_SUCCESS if the event was binded */ -SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data); +SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, + void *user_data); /*! \brief Render the name of an event id enumeration diff --git a/src/include/switch_ivr.h b/src/include/switch_ivr.h index 6b86e02d4d..b3f9fa920b 100644 --- a/src/include/switch_ivr.h +++ b/src/include/switch_ivr.h @@ -227,7 +227,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t uint32_t timeout, char *valid_terminators, char *audio_file, - char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, char *digits_regex); + char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, + char *digits_regex); SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session, switch_speech_handle_t *sh, @@ -280,7 +281,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess */ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session, switch_core_session_t *peer_session, - switch_input_callback_function_t dtmf_callback, void *session_data, void *peer_session_data); + switch_input_callback_function_t dtmf_callback, void *session_data, + void *peer_session_data); /*! \brief Bridge Signalling from one session to another @@ -414,7 +416,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_transfer_variable(switch_core_session \param parser a pointer to the object pointer \return SWITCH_STATUS_SUCCESS if all is well */ -SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t * pool, switch_ivr_digit_stream_parser_t ** parser); +SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t *pool, switch_ivr_digit_stream_parser_t ** parser); /*! \brief Destroy a digit stream parser object @@ -541,7 +543,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me const char *invalid_sound, const char *tts_engine, const char *tts_voice, - const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t * pool); + const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t *pool); /*! *\brief switch_ivr_menu_bind_action: Bind a keystroke to an action. @@ -613,9 +615,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_add_custom(switch_ivr_ *\param pool memory pool (NULL to create one) *\return SWITCH_STATUS_SUCCESS if all is well */ -SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t *pool); -SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, switch_input_args_t *args); +SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, + switch_input_args_t *args); /** @} */ SWITCH_END_EXTERN_C diff --git a/src/include/switch_loadable_module.h b/src/include/switch_loadable_module.h index 1fe9aec535..0657352145 100644 --- a/src/include/switch_loadable_module.h +++ b/src/include/switch_loadable_module.h @@ -204,7 +204,7 @@ SWITCH_DECLARE(switch_management_interface_t *) switch_loadable_module_get_manag \param arraylen the max size in elements of the array \return the number of elements added to the array */ -SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t * pool, const switch_codec_implementation_t **array, int arraylen); +SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array, int arraylen); /*! diff --git a/src/include/switch_log.h b/src/include/switch_log.h index a875a97077..8cc8b1e646 100644 --- a/src/include/switch_log.h +++ b/src/include/switch_log.h @@ -74,7 +74,7 @@ typedef switch_status_t (*switch_log_function_t) (const switch_log_node_t *node, \param pool the memory pool to use \note to be called at application startup by the core */ -SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t * pool); +SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool); /*! \brief Shut down the logging engine diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index a89a0b6b7d..f8a50ad7d3 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -74,7 +74,7 @@ SWITCH_BEGIN_EXTERN_C #undef inline #define inline __inline #ifndef uint32_t - typedef unsigned __int8 uint8_t; +typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; @@ -166,9 +166,9 @@ typedef int gid_t; #define PRINTF_FUNCTION(fmtstr,vars) #endif #ifdef SWITCH_INT32 -typedef SWITCH_INT32 switch_int32_t; + typedef SWITCH_INT32 switch_int32_t; #else -typedef int32_t switch_int32_t; + typedef int32_t switch_int32_t; #endif #ifdef SWITCH_SIZE_T diff --git a/src/include/switch_regex.h b/src/include/switch_regex.h index 212d80ee47..f1ef020784 100644 --- a/src/include/switch_regex.h +++ b/src/include/switch_regex.h @@ -40,16 +40,17 @@ SWITCH_BEGIN_EXTERN_C * @ingroup FREESWITCH * @{ */ -typedef struct real_pcre switch_regex_t; + typedef struct real_pcre switch_regex_t; -SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables); +SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern, int options, const char **errorptr, int *erroroffset, + const unsigned char *tables); SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size); SWITCH_DECLARE(void) switch_regex_free(void *data); -SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t ** new_re, int *ovector, uint32_t olen); -SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t * re, int match_count, char *data, char *field_data, +SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen); +SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector); /*! diff --git a/src/include/switch_resample.h b/src/include/switch_resample.h index 5c1f81f1e9..24f351e506 100644 --- a/src/include/switch_resample.h +++ b/src/include/switch_resample.h @@ -85,7 +85,7 @@ SWITCH_BEGIN_EXTERN_C \return SWITCH_STATUS_SUCCESS if the handle was created */ SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler, - int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t * pool); + int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t *pool); /*! \brief Destroy an existing resampler handle diff --git a/src/include/switch_rtp.h b/src/include/switch_rtp.h index 774c38c000..f2cc1f2910 100644 --- a/src/include/switch_rtp.h +++ b/src/include/switch_rtp.h @@ -51,7 +51,7 @@ typedef void (*switch_rtp_invalid_handler_t) (switch_rtp_t *rtp_session, \param pool the memory pool to use for long term allocations \note Generally called by the core_init */ -SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t * pool); +SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool); /*! \brief Request a new port to be used for media @@ -76,7 +76,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session switch_payload_t payload, uint32_t samples_per_interval, uint32_t ms_per_packet, - switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool); + switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, + switch_memory_pool_t *pool); /*! @@ -102,7 +103,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host, switch_payload_t payload, uint32_t samples_per_interval, uint32_t ms_per_packet, - switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool); + switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t *pool); /*! diff --git a/src/include/switch_sqlite.h b/src/include/switch_sqlite.h index 8a0d6c0092..1fc69713df 100644 --- a/src/include/switch_sqlite.h +++ b/src/include/switch_sqlite.h @@ -51,7 +51,7 @@ SWITCH_BEGIN_EXTERN_C * Each open sqlite database is represented by an instance of the * following opaque structure. */ -typedef sqlite3 switch_core_db_t; + typedef sqlite3 switch_core_db_t; typedef sqlite3_stmt switch_core_db_stmt_t; /** * Aggregate functions use the following routine to allocate @@ -63,16 +63,14 @@ typedef sqlite3_stmt switch_core_db_stmt_t; * * The buffer allocated is freed automatically by SQLite. */ -DoxyDefine(void *switch_core_db_aggregate_context(sqlite3_context *, int nBytes); - ) +DoxyDefine(void *switch_core_db_aggregate_context(sqlite3_context *, int nBytes);) #define switch_core_db_aggregate_context sqlite3_aggregate_context /** * /return the number of calls to xStep for a particular * aggregate function instance. The current call to xStep counts so this * routine always returns at least 1. */ -DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *); - ) +DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *);) #define switch_core_db_aggregate_count sqlite3_aggregate_count /** * In the SQL strings input to switch_core_db_prepare(), @@ -102,8 +100,7 @@ DoxyDefine(int switch_core_db_aggregate_count(sqlite3_context *); * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n, void (*)(void *)); - ) +DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n, void (*)(void *));) #define switch_core_db_bind_blob sqlite3_bind_blob /** * In the SQL strings input to switch_core_db_prepare(), @@ -125,8 +122,7 @@ DoxyDefine(int switch_core_db_bind_blob(sqlite3_stmt *, int, const void *, int n * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double); - ) +DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double);) #define switch_core_db_bind_double sqlite3_bind_double /** * In the SQL strings input to switch_core_db_prepare(), @@ -148,8 +144,7 @@ DoxyDefine(int switch_core_db_bind_double(sqlite3_stmt *, int, double); * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int); - ) +DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int);) #define switch_core_db_bind_int sqlite3_bind_int /** * In the SQL strings input to switch_core_db_prepare(), @@ -171,8 +166,7 @@ DoxyDefine(int switch_core_db_bind_int(sqlite3_stmt *, int, int); * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64); - ) +DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64);) #define switch_core_db_bind_int64 sqlite3_bind_int64 /** * In the SQL strings input to switch_core_db_prepare(), @@ -194,8 +188,7 @@ DoxyDefine(int switch_core_db_bind_int64(sqlite3_stmt *, int, sqlite_int64); * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int); - ) +DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int);) #define switch_core_db_bind_null sqlite3_bind_null /** * In the SQL strings input to switch_core_db_prepare(), @@ -225,8 +218,7 @@ DoxyDefine(int switch_core_db_bind_null(sqlite3_stmt *, int); * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n, void (*)(void *)); - ) +DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n, void (*)(void *));) #define switch_core_db_bind_text sqlite3_bind_text /** * In the SQL strings input to switch_core_db_prepare(), @@ -256,8 +248,7 @@ DoxyDefine(int switch_core_db_bind_text(sqlite3_stmt *, int, const char *, int n * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int, void (*)(void *)); - ) +DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int, void (*)(void *));) #define switch_core_db_bind_text16 sqlite3_bind_text16 /** * In the SQL strings input to switch_core_db_prepare(), @@ -279,23 +270,20 @@ DoxyDefine(int switch_core_db_bind_text16(sqlite3_stmt *, int, const void *, int * an switch_core_db_prepare() or sqlite3_reset(). Unbound parameterss are * interpreted as NULL. */ -DoxyDefine(int switch_core_db_bind_value(sqlite3_stmt *, int, const sqlite3_value *); - ) +DoxyDefine(int switch_core_db_bind_value(sqlite3_stmt *, int, const sqlite3_value *);) #define switch_core_db_bind_value sqlite3_bind_value /** * @return The number of parameters in a compiled SQL statement. * @remark This routine was added to support DBD::SQLite. */ -DoxyDefine(int switch_core_db_bind_parameter_count(sqlite3_stmt *); - ) +DoxyDefine(int switch_core_db_bind_parameter_count(sqlite3_stmt *);) #define switch_core_db_bind_parameter_count sqlite3_bind_parameter_count /** * @return the index of a parameter with the given name. If no parameter with the * given name is found, return 0. * @remark The name must match exactly. */ -DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *zName); - ) +DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *zName);) #define switch_core_db_bind_parameter_index sqlite3_bind_parameter_index /** * @return the name of the i-th parameter. @@ -304,8 +292,7 @@ DoxyDefine(int switch_core_db_bind_parameter_index(sqlite3_stmt *, const char *z * $VVV the complete text of the parameter name is returned, including * the initial ":" or "$". NULL is returned if the index is out of range. */ -DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int); - ) +DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int);) #define switch_core_db_bind_parameter_name sqlite3_bind_parameter_name /** * This routine identifies a callback function that is invoked @@ -329,8 +316,7 @@ DoxyDefine(const char *switch_core_db_bind_parameter_name(sqlite3_stmt *, int); * data structures out from under the executing query and will * probably result in a coredump. */ -DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int), void *); - ) +DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int), void *);) #define switch_core_db_busy_handler sqlite3_busy_handler /** * This routine sets a busy handler that sleeps for a while when a @@ -342,8 +328,7 @@ DoxyDefine(int switch_core_db_busy_handler(switch_core_db *, int (*)(void *, int * Calling this routine with an argument less than or equal to zero * turns off all busy handlers. */ -DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms); - ) +DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms);) #define switch_core_db_busy_timeout sqlite3_busy_timeout /** * This function returns the number of database rows that were changed @@ -365,8 +350,7 @@ DoxyDefine(int switch_core_db_busy_timeout(switch_core_db *, int ms); * table. To get an accurate count of the number of rows deleted, use * "DELETE FROM table WHERE 1" instead. */ -DoxyDefine(int switch_core_db_changes(switch_core_db *); - ) +DoxyDefine(int switch_core_db_changes(switch_core_db *);) #define switch_core_db_changes sqlite3_changes /** * A function to close the database. @@ -379,8 +363,7 @@ DoxyDefine(int switch_core_db_changes(switch_core_db *); * this routine is called. Otherwise, SQLITE_BUSY is returned and the * database connection remains open. */ -DoxyDefine(int switch_core_db_close(switch_core_db *); - ) +DoxyDefine(int switch_core_db_close(switch_core_db *);) #define switch_core_db_close sqlite3_close /** * To avoid having to register all collation sequences before a database @@ -402,8 +385,7 @@ DoxyDefine(int switch_core_db_close(switch_core_db *); * callback using the sqlite3_create_collation() API, described above. */ DoxyDefine(int switch_core_db_collation_needed(switch_core_db *, void *, void (*)(void *, switch_core_db *, int eTextRep, const char *) - ); - ) + );) #define switch_core_db_collation_needed sqlite3_collation_needed /** * The next group of routines returns information about the information @@ -446,8 +428,7 @@ DoxyDefine(int switch_core_db_collation_needed(switch_core_db *, void *, void (* * * @return the value of a BLOB. */ -DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol); - ) +DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol);) #define switch_core_db_column_blob sqlite3_column_blob /** * The next group of routines returns information about the information @@ -490,8 +471,7 @@ DoxyDefine(const void *switch_core_db_column_blob(sqlite3_stmt * stmt, int iCol) * TEXT value represented as UTF-8. The "\000" terminator is included in the * byte count for TEXT values. */ -DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol); - ) +DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol);) #define switch_core_db_column_bytes sqlite3_column_bytes /** * The next group of routines returns information about the information @@ -534,8 +514,7 @@ DoxyDefine(int switch_core_db_column_bytes(sqlite3_stmt *, int iCol); * TEXT value represented as UTF-16. The "\u0000" terminator is included in * the byte count for TEXT values. */ -DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol); - ) +DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol);) #define switch_core_db_column_bytes16 sqlite3_column_bytes16 /** * The next group of routines returns information about the information @@ -576,8 +555,7 @@ DoxyDefine(int switch_core_db_column_bytes16(sqlite3_stmt *, int iCol); * * Return a FLOAT value. */ -DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol); - ) +DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol);) #define switch_core_db_column_double sqlite3_column_double /** * The next group of routines returns information about the information @@ -619,8 +597,7 @@ DoxyDefine(double switch_core_db_column_double(sqlite3_stmt *, int iCol); * Return an INTEGER value in the host computer's native integer representation. * This might be either a 32- or 64-bit integer depending on the host. */ -DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol); - ) +DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol);) #define switch_core_db_column_int sqlite3_column_int /** * The next group of routines returns information about the information @@ -661,8 +638,7 @@ DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol); * * Return an INTEGER value as a 64-bit signed integer. */ - DoxyDefine(sqlite_int64 switch_core_db_column_int64(sqlite3_stmt *, int iCol); - ) + DoxyDefine(sqlite_int64 switch_core_db_column_int64(sqlite3_stmt *, int iCol);) #define switch_core_db_column_int64 sqlite3_column_int64 /** * The next group of routines returns information about the information @@ -703,8 +679,7 @@ DoxyDefine(int switch_core_db_column_int(sqlite3_stmt *, int iCol); * * Return the value as UTF-8 text. */ -DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int iCol); - ) +DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int iCol);) #define switch_core_db_column_text sqlite3_column_text /** * The next group of routines returns information about the information @@ -745,8 +720,7 @@ DoxyDefine(const unsigned char *switch_core_db_column_text(sqlite3_stmt *, int i * * Return the value as UTF-16 text. */ -DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol); - ) +DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol);) #define switch_core_db_column_text16 sqlite3_column_text16 /** * The next group of routines returns information about the information @@ -788,24 +762,21 @@ DoxyDefine(const void *switch_core_db_column_text16(sqlite3_stmt *, int iCol); * ReturnS the datatype of the result. This is one of * SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. */ -DoxyDefine(int switch_core_db_column_type(sqlite3_stmt *, int iCol); - ) +DoxyDefine(int switch_core_db_column_type(sqlite3_stmt *, int iCol);) #define switch_core_db_column_type sqlite3_column_type /** * The first parameter is a compiled SQL statement. This function returns * the column heading for the Nth column of that statement, where N is the * second function parameter. The string returned is UTF-8. */ -DoxyDefine(const char *switch_core_db_column_name(sqlite3_stmt *, int); - ) +DoxyDefine(const char *switch_core_db_column_name(sqlite3_stmt *, int);) #define switch_core_db_column_name sqlite3_column_name /** * Return the number of columns in the result set returned by the compiled * SQL statement. This routine returns 0 if pStmt is an SQL statement * that does not return data (for example an UPDATE). */ -DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt); - ) +DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt);) #define switch_core_db_column_count sqlite3_column_count /** * The first parameter is a compiled SQL statement. If this statement @@ -825,8 +796,7 @@ DoxyDefine(int switch_core_db_column_count(sqlite3_stmt * pStmt); * result column (i==1), and a NULL pointer for the first result column * (i==0). */ -DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i); - ) +DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i);) #define switch_core_db_column_decltype sqlite3_column_decltype /** * The first parameter is a compiled SQL statement. If this statement @@ -846,8 +816,7 @@ DoxyDefine(const char *switch_core_db_column_decltype(sqlite3_stmt *, int i); * result column (i==1), and a NULL pointer for the first result column * (i==0). */ -DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int); - ) +DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int);) #define switch_core_db_column_decltype16 sqlite3_column_decltype16 /** * Register a callback function to be invoked whenever a new transaction @@ -862,8 +831,7 @@ DoxyDefine(const void *switch_core_db_column_decltype16(sqlite3_stmt *, int); * ****** THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ****** */ -DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), void *); - ) +DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), void *);) #define switch_core_db_commit_hook sqlite3_commit_hook /** * This functions return true if the given input string comprises @@ -874,8 +842,7 @@ DoxyDefine(void *switch_core_db_commit_hook(switch_core_db *, int (*)(void *), v * and comments is a semicolon, then return true. otherwise return * false. */ -DoxyDefine(int switch_core_db_complete(const char *sql); - ) +DoxyDefine(int switch_core_db_complete(const char *sql);) #define switch_core_db_complete sqlite3_complete /** * This function is used to add new collation sequences to the @@ -904,8 +871,7 @@ DoxyDefine(int switch_core_db_complete(const char *sql); */ DoxyDefine(int switch_core_db_create_collation(switch_core_db *, const char *zName, int eTextRep, void *, int (*xCompare) (void *, int, const void *, int, const void *) - ); - ) + );) #define switch_core_db_create_collation sqlite3_create_collation /** * The following function is used to add user functions or aggregates @@ -947,8 +913,7 @@ DoxyDefine(int switch_core_db_create_function(switch_core_db *, void *, void (*xFunc) (sqlite3_context *, int, sqlite3_value **), void (*xStep) (sqlite3_context *, int, sqlite3_value **), void (*xFinal) (sqlite3_context *) - ); - ) + );) #define switch_core_db_create_function sqlite3_create_function /** * Return the number of values in the current row of the result set. @@ -959,8 +924,7 @@ DoxyDefine(int switch_core_db_create_function(switch_core_db *, * error code, or before switch_core_db_step() has been called on a * compiled SQL statement, this routine returns zero. */ -DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt); - ) +DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt);) #define switch_core_db_data_count sqlite3_data_count /** * Return the sqlite3* database handle to which the prepared statement given @@ -968,8 +932,7 @@ DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt); * the first argument to the switch_core_db_prepare() that was used to create * the statement in the first place. */ - DoxyDefine(switch_core_db * switch_core_db_db_handle(sqlite3_stmt *); - ) + DoxyDefine(switch_core_db * switch_core_db_db_handle(sqlite3_stmt *);) #define switch_core_db_db_handle sqlite3_db_handle /** ** Return the error code for the most recent switch_core_db_* API call associated @@ -986,8 +949,7 @@ DoxyDefine(int switch_core_db_data_count(sqlite3_stmt * pStmt); ** code returned by this function is associated with the same error as ** the strings returned by sqlite3_errmsg() and sqlite3_errmsg16(). */ -DoxyDefine(int switch_core_db_errcode(switch_core_db * db); - ) +DoxyDefine(int switch_core_db_errcode(switch_core_db * db);) #define switch_core_db_errcode sqlite3_errcode /** * Return a pointer to a UTF-8 encoded string describing in english the @@ -997,8 +959,7 @@ DoxyDefine(int switch_core_db_errcode(switch_core_db * db); * The string "not an error" is returned when the most recent API call was * successful. */ -DoxyDefine(const char *switch_core_db_errmsg(switch_core_db *); - ) +DoxyDefine(const char *switch_core_db_errmsg(switch_core_db *);) #define switch_core_db_errmsg sqlite3_errmsg /** * A function to executes one or more statements of SQL. @@ -1045,8 +1006,7 @@ DoxyDefine(int switch_core_db_exec(switch_core_db *, /* An open database */ sqlite3_callback, /* Callback function */ void *, /* 1st argument to callback function */ char **errmsg /* Error msg written here */ - ); - ) + );) #define switch_core_db_exec sqlite3_exec /** * Return TRUE (non-zero) if the statement supplied as an argument needs @@ -1057,8 +1017,7 @@ DoxyDefine(int switch_core_db_exec(switch_core_db *, /* An open database */ * added or changed. * */ -DoxyDefine(int switch_core_db_expired(sqlite3_stmt *); - ) +DoxyDefine(int switch_core_db_expired(sqlite3_stmt *);) #define switch_core_db_expired sqlite3_expired /** * This function is called to delete a compiled @@ -1074,14 +1033,12 @@ DoxyDefine(int switch_core_db_expired(sqlite3_stmt *); * rolled back and transactions cancelled, depending on the circumstances, * and the result code returned will be SQLITE_ABORT. */ -DoxyDefine(int switch_core_db_finalize(sqlite3_stmt * pStmt); - ) +DoxyDefine(int switch_core_db_finalize(sqlite3_stmt * pStmt);) #define switch_core_db_finalize sqlite3_finalize /** * Call this routine to free the memory that sqlite3_get_table() allocated. */ -DoxyDefine(void switch_core_db_free_table(char **result); - ) +DoxyDefine(void switch_core_db_free_table(char **result);) #define switch_core_db_free_table sqlite3_free_table /** * Test to see whether or not the database connection is in autocommit @@ -1089,8 +1046,7 @@ DoxyDefine(void switch_core_db_free_table(char **result); * by default. Autocommit is disabled by a BEGIN statement and reenabled * by the next COMMIT or ROLLBACK. */ -DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *); - ) +DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *);) #define switch_core_db_get_autocommit sqlite3_get_autocommit /** * The following function may be used by scalar user functions to @@ -1111,8 +1067,7 @@ DoxyDefine(int switch_core_db_get_autocommit(switch_core_db *); * expressions that are constant at compile time. This includes literal * values and SQL variables. */ -DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int); - ) +DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int);) #define switch_core_db_get_auxdata sqlite3_get_auxdata /** * The following function may be used by scalar user functions to @@ -1135,8 +1090,7 @@ DoxyDefine(void *switch_core_db_get_auxdata(sqlite3_context *, int); * expressions that are constant at compile time. This includes literal * values and SQL variables. */ -DoxyDefine(void switch_core_db_set_auxdata(sqlite3_context *, int, void *, void (*)(void *)); - ) +DoxyDefine(void switch_core_db_set_auxdata(sqlite3_context *, int, void *, void (*)(void *));) #define switch_core_db_set_auxdata sqlite3_set_auxdata /** * This next routine is really just a wrapper around sqlite3_exec(). @@ -1185,8 +1139,7 @@ DoxyDefine(int switch_core_db_get_table(switch_core_db *, /* An open database */ int *nrow, /* Number of result rows written here */ int *ncolumn, /* Number of result columns written here */ char **errmsg /* Error msg written here */ - ); - ) + );) #define switch_core_db_get_table sqlite3_get_table /** * This function is called to recover from a malloc() failure that occured @@ -1207,8 +1160,7 @@ DoxyDefine(int switch_core_db_get_table(switch_core_db *, /* An open database */ * This functionality can be omitted from a build by defining the * SQLITE_OMIT_GLOBALRECOVER at compile time. */ -DoxyDefine(int switch_core_db_global_recover(); - ) +DoxyDefine(int switch_core_db_global_recover();) #define switch_core_db_global_recover sqlite3_global_recover /** This function causes any pending database operation to abort and * return at its earliest opportunity. This routine is typically @@ -1216,8 +1168,7 @@ DoxyDefine(int switch_core_db_global_recover(); * or Ctrl-C where the user wants a long query operation to halt * immediately. */ -DoxyDefine(void switch_core_db_interrupt(switch_core_db *); - ) +DoxyDefine(void switch_core_db_interrupt(switch_core_db *);) #define switch_core_db_interrupt sqlite3_interrupt /** * Each entry in an SQLite table has a unique integer key. (The key is @@ -1228,8 +1179,7 @@ DoxyDefine(void switch_core_db_interrupt(switch_core_db *); * * This function is similar to the mysql_insert_id() function from MySQL. */ - DoxyDefine(sqlite_int64 switch_core_db_last_insert_rowid(switch_core_db *); - ) + DoxyDefine(sqlite_int64 switch_core_db_last_insert_rowid(switch_core_db *);) #define switch_core_db_last_insert_rowid sqlite3_last_insert_rowid /** * Open the sqlite database file "filename". The "filename" is UTF-8 @@ -1248,8 +1198,7 @@ DoxyDefine(void switch_core_db_interrupt(switch_core_db *); */ DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (UTF-8) */ switch_core_db ** ppDb /* OUT: SQLite db handle */ - ); - ) + );) #define switch_core_db_open sqlite3_open /** * To execute an SQL query, it must first be compiled into a byte-code @@ -1273,13 +1222,12 @@ DoxyDefine(int switch_core_db_open(const char *filename, /* Database filename (U * * On success, SQLITE_OK is returned. Otherwise an error code is returned. */ -DoxyDefine(int switch_core_db_prepare(sqlite3 *db, /* Database handle */ +DoxyDefine(int switch_core_db_prepare(sqlite3 * db, /* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nBytes, /* Length of zSql in bytes. */ sqlite3_stmt ** ppStmt, /* OUT: Statement handle */ const char **pzTail /* OUT: Pointer to unused portion of zSql */ - ); - ) + );) #define switch_core_db_prepare sqlite3_prepare /** * Register a function for tracing SQL command evaluation. The function registered by @@ -1289,8 +1237,7 @@ DoxyDefine(int switch_core_db_prepare(sqlite3 *db, /* Database handle */ * The sqlite3_profile() API is currently considered experimental and * is subject to change. */ -DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void *, const char *, sqlite_uint64), void *); - ) +DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void *, const char *, sqlite_uint64), void *);) #define switch_core_db_profile sqlite3_profile /** * This routine configures a callback function - the progress callback - that @@ -1318,8 +1265,7 @@ DoxyDefine(void *switch_core_db_profile(switch_core_db *, void (*xProfile) (void * ****** THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ****** */ -DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(void *), void *); - ) +DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(void *), void *);) #define switch_core_db_progress_handler sqlite3_progress_handler /** * The switch_core_db_reset() function is called to reset a compiled SQL @@ -1328,92 +1274,79 @@ DoxyDefine(void switch_core_db_progress_handler(switch_core_db *, int, int (*)(v * Any SQL statement variables that had values bound to them using * the switch_core_db_bind_*() API retain their values. */ -DoxyDefine(int switch_core_db_reset(sqlite3_stmt * pStmt); - ) +DoxyDefine(int switch_core_db_reset(sqlite3_stmt * pStmt);) #define switch_core_db_reset sqlite3_reset /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_blob(sqlite3_context *, const void *, int, void (*)(void *)); - ) +DoxyDefine(void switch_core_db_result_blob(sqlite3_context *, const void *, int, void (*)(void *));) #define switch_core_db_result_blob sqlite3_result_blob /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_double(sqlite3_context *, double); - ) +DoxyDefine(void switch_core_db_result_double(sqlite3_context *, double);) #define switch_core_db_result_double sqlite3_result_double /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_error(sqlite3_context *, const char *, int); - ) +DoxyDefine(void switch_core_db_result_error(sqlite3_context *, const char *, int);) #define switch_core_db_result_error sqlite3_result_error /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_error16(sqlite3_context *, const void *, int); - ) +DoxyDefine(void switch_core_db_result_error16(sqlite3_context *, const void *, int);) #define switch_core_db_result_error16 sqlite3_result_error16 /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_int(sqlite3_context *, int); - ) +DoxyDefine(void switch_core_db_result_int(sqlite3_context *, int);) #define switch_core_db_result_int sqlite3_result_int /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_int64(sqlite3_context *, sqlite_int64); - ) +DoxyDefine(void switch_core_db_result_int64(sqlite3_context *, sqlite_int64);) #define switch_core_db_result_int64 sqlite3_result_int64 /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_null(sqlite3_context *); - ) +DoxyDefine(void switch_core_db_result_null(sqlite3_context *);) #define switch_core_db_result_null sqlite3_result_null /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_text(sqlite3_context *, const char *, int, void (*)(void *)); - ) +DoxyDefine(void switch_core_db_result_text(sqlite3_context *, const char *, int, void (*)(void *));) #define switch_core_db_result_text sqlite3_result_text /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_text16(sqlite3_context *, const void *, int, void (*)(void *)); - ) +DoxyDefine(void switch_core_db_result_text16(sqlite3_context *, const void *, int, void (*)(void *));) #define switch_core_db_result_text16 sqlite3_result_text16 /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_text16le(sqlite3_context *, const void *, int, void (*)(void *)); - ) +DoxyDefine(void switch_core_db_result_text16le(sqlite3_context *, const void *, int, void (*)(void *));) #define switch_core_db_result_text16le sqlite3_result_text16le /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_text16be(sqlite3_context *, const void *, int, void (*)(void *)); - ) +DoxyDefine(void switch_core_db_result_text16be(sqlite3_context *, const void *, int, void (*)(void *));) #define switch_core_db_result_text16be sqlite3_result_text16be /** * User-defined functions invoke this routine in order to * set their return value. */ -DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *); - ) +DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *);) #define switch_core_db_result_value sqlite3_result_value /** * This routine registers a callback with the SQLite library. The @@ -1424,8 +1357,7 @@ DoxyDefine(void switch_core_db_result_value(sqlite3_context *, sqlite3_value *); * if the column should be treated as a NULL value. */ DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *, - int (*xAuth) (void *, int, const char *, const char *, const char *, const char *), void *pUserData); - ) + int (*xAuth) (void *, int, const char *, const char *, const char *, const char *), void *pUserData);) #define switch_core_db_set_authorizer sqlite3_set_authorizer /** * After an SQL query has been compiled with a call to either @@ -1459,8 +1391,7 @@ DoxyDefine(int switch_core_db_set_authorizer(switch_core_db *, * SQLITE_DONE. Or it could be the case the the same database connection * is being used simulataneously by two or more threads. */ -DoxyDefine(int switch_core_db_step(sqlite3_stmt *); - ) +DoxyDefine(int switch_core_db_step(sqlite3_stmt *);) #define switch_core_db_step sqlite3_step /** * If the following global variable is made to point to a @@ -1472,8 +1403,7 @@ DoxyDefine(int switch_core_db_step(sqlite3_stmt *); * Once switch_core_db_open() has been called, changing this variable will invalidate * the current temporary database, if any. */ - DoxyDefine(extern char *switch_core_db_temp_directory; - ) + DoxyDefine(extern char *switch_core_db_temp_directory;) #define switch_core_db_temp_directory sqlite3_temp_directory /** * This function returns the number of database rows that have been @@ -1491,16 +1421,14 @@ DoxyDefine(int switch_core_db_step(sqlite3_stmt *); * table. To get an accurate count of the number of rows deleted, use * "DELETE FROM table WHERE 1" instead. */ -DoxyDefine(int switch_core_db_total_changes(switch_core_db *); - ) +DoxyDefine(int switch_core_db_total_changes(switch_core_db *);) #define switch_core_db_total_changes sqlite3_total_changes /** * Register a function for tracing SQL command evaluation. The function * registered is invoked at the first switch_core_db_step() * for the evaluation of an SQL statement. */ -DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, const char *), void *); - ) +DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, const char *), void *);) #define switch_core_db_trace sqlite3_trace /** * Move all bindings from the first prepared statement over to the second. @@ -1509,16 +1437,14 @@ DoxyDefine(void *switch_core_db_trace(switch_core_db *, void (*xTrace) (void *, * the second prepared statement then all of the bindings transfered over * to the second statement before the first statement is finalized. */ -DoxyDefine(int switch_core_db_transfer_bindings(sqlite3_stmt *, sqlite3_stmt *); - ) +DoxyDefine(int switch_core_db_transfer_bindings(sqlite3_stmt *, sqlite3_stmt *);) #define switch_core_db_transfer_bindings sqlite3_transfer_bindings /** * The pUserData parameter to the switch_core_db_create_function() * routine used to register user functions is available to * the implementation of the function using this call. */ -DoxyDefine(void *switch_core_db_user_data(sqlite3_context *); - ) +DoxyDefine(void *switch_core_db_user_data(sqlite3_context *);) #define switch_core_db_user_data sqlite3_user_data /** * returns information about parameters to @@ -1528,8 +1454,7 @@ DoxyDefine(void *switch_core_db_user_data(sqlite3_context *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *); - ) +DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *);) #define switch_core_db_value_blob sqlite3_value_blob /** * returns information about parameters to @@ -1539,8 +1464,7 @@ DoxyDefine(const void *switch_core_db_value_blob(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *); - ) +DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *);) #define switch_core_db_value_bytes sqlite3_value_bytes /** * returns information about parameters to @@ -1550,8 +1474,7 @@ DoxyDefine(int switch_core_db_value_bytes(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *); - ) +DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *);) #define switch_core_db_value_bytes16 sqlite3_value_bytes16 /** * returns information about parameters to @@ -1561,8 +1484,7 @@ DoxyDefine(int switch_core_db_value_bytes16(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(double switch_core_db_value_double(sqlite3_value *); - ) +DoxyDefine(double switch_core_db_value_double(sqlite3_value *);) #define switch_core_db_value_double sqlite3_value_double /** * returns information about parameters to @@ -1572,8 +1494,7 @@ DoxyDefine(double switch_core_db_value_double(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(int switch_core_db_value_int(sqlite3_value *); - ) +DoxyDefine(int switch_core_db_value_int(sqlite3_value *);) #define switch_core_db_value_int sqlite3_value_int /** * returns information about parameters to @@ -1583,8 +1504,7 @@ DoxyDefine(int switch_core_db_value_int(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ - DoxyDefine(sqlite_int64 switch_core_db_value_int64(sqlite3_value *); - ) + DoxyDefine(sqlite_int64 switch_core_db_value_int64(sqlite3_value *);) #define switch_core_db_value_int64 sqlite3_value_int64 /** * returns information about parameters to @@ -1594,8 +1514,7 @@ DoxyDefine(int switch_core_db_value_int(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *); - ) +DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *);) #define switch_core_db_value_text sqlite3_value_text /** * returns information about parameters to @@ -1605,8 +1524,7 @@ DoxyDefine(const unsigned char *switch_core_db_value_text(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *); - ) +DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *);) #define switch_core_db_value_text16 sqlite3_value_text16 /** * returns information about parameters to @@ -1616,8 +1534,7 @@ DoxyDefine(const void *switch_core_db_value_text16(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *); - ) +DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *);) #define switch_core_db_value_text16be sqlite3_value_text16be /** * returns information about parameters to @@ -1627,8 +1544,7 @@ DoxyDefine(const void *switch_core_db_value_text16be(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *); - ) +DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *);) #define switch_core_db_value_text16le sqlite3_value_text16le /** * returns information about parameters to @@ -1638,8 +1554,7 @@ DoxyDefine(const void *switch_core_db_value_text16le(sqlite3_value *); * sqlite3_value* pointer instead of an sqlite3_stmt* and an integer * column number. */ -DoxyDefine(int switch_core_db_value_type(sqlite3_value *); - ) +DoxyDefine(int switch_core_db_value_type(sqlite3_value *);) #define switch_core_db_value_type sqlite3_value_type /** * This routine is a variant of the "sprintf()" from the @@ -1682,8 +1597,7 @@ DoxyDefine(int switch_core_db_value_type(sqlite3_value *); * should always use %q instead of %s when inserting text into a string * literal. */ -DoxyDefine(char *switch_core_db_mprintf(const char *, ...); - ) +DoxyDefine(char *switch_core_db_mprintf(const char *, ...);) #define switch_core_db_mprintf sqlite3_mprintf #define switch_mprintf sqlite3_mprintf /** @@ -1727,8 +1641,7 @@ DoxyDefine(char *switch_core_db_mprintf(const char *, ...); * should always use %q instead of %s when inserting text into a string * literal. */ -DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list); - ) +DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list);) #define switch_core_db_vmprintf sqlite3_vmprintf /** * This routine is a variant of the "sprintf()" from the @@ -1771,14 +1684,12 @@ DoxyDefine(char *switch_core_db_vmprintf(const char *, va_list); * should always use %q instead of %s when inserting text into a string * literal. */ -DoxyDefine(char *switch_core_db_snprintf(int, char *, const char *, ...); - ) +DoxyDefine(char *switch_core_db_snprintf(int, char *, const char *, ...);) #define switch_core_db_snprintf sqlite3_snprintf /** * call this routine to free memory malloced by a call to switch_core_db_mprintf, switch_core_db_vmprintf, or switch_core_db_snprintf */ -DoxyDefine(void switch_core_db_free(char *z); - ) +DoxyDefine(void switch_core_db_free(char *z);) #define switch_core_db_free sqlite3_free /** @} */ /** @} */ diff --git a/src/include/switch_stun.h b/src/include/switch_stun.h index 9c63c191ea..00961e5121 100644 --- a/src/include/switch_stun.h +++ b/src/include/switch_stun.h @@ -136,7 +136,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se \param len the length of the data \return a stun packet pointer to buf to use as an access point */ -SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, uint32_t len); +SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, uint32_t len); /*! \brief Obtain a printable string form of a given value @@ -173,7 +173,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac \param buf a pointer to data to use for the packet \return a pointer to a ready-to-use stun packet */ -SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t *buf); +SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t * buf); /*! \brief Add a username packet attribute @@ -205,7 +205,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_s \return SUCCESS or FAIL */ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip, - switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t * pool); + switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t *pool); diff --git a/src/include/switch_types.h b/src/include/switch_types.h index eb1b7160fd..4bf208053f 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -114,7 +114,7 @@ SWITCH_BEGIN_EXTERN_C #define SWITCH_SPEECH_KEY "speech" #define SWITCH_UUID_BRIDGE "uuid_bridge" #define SWITCH_BITS_PER_BYTE 8 -typedef uint8_t switch_byte_t; + typedef uint8_t switch_byte_t; typedef enum { SWITCH_FALSE = 0, @@ -997,7 +997,8 @@ typedef switch_status_t (*switch_module_shutdown_t) (void); typedef struct switch_xml *switch_xml_t; typedef struct switch_core_time_duration switch_core_time_duration_t; typedef switch_xml_t(*switch_xml_search_function_t) (const char *section, - const char *tag_name, const char *key_name, const char *key_value, const char *params, void *user_data); + const char *tag_name, const char *key_name, const char *key_value, const char *params, + void *user_data); /* things we don't deserve to know about */ /*! \brief A channel */ diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index dfce229a06..e88b15fb67 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -219,7 +219,7 @@ SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char \param esc the escape character \return the escaped string */ -SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t * pool, char *in, char *delim, char esc); +SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in, char *delim, char esc); /*! \brief Wait for a socket diff --git a/src/include/switch_xml.h b/src/include/switch_xml.h index 4c4e62fd5c..e7ace98998 100644 --- a/src/include/switch_xml.h +++ b/src/include/switch_xml.h @@ -291,7 +291,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **e ///\param pool a memory pool to use ///\param err a pointer to set error strings ///\return SWITCH_STATUS_SUCCESS if successful -SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t * pool, const char **err); +SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t *pool, const char **err); SWITCH_DECLARE(switch_status_t) switch_xml_destroy(void); @@ -312,7 +312,8 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_root(void); ///\return SWITCH_STATUS_SUCCESS if successful root and node will be assigned SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section, const char *tag_name, - const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, const char *params); + const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, + const char *params); ///\brief open a config in the core registry ///\param file_path the name of the config section e.g. modules.conf diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index f0379fb64c..25b6271ecf 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -80,7 +80,8 @@ static switch_status_t status_function(char *cmd, switch_core_session_t *session "UP %u year%s, %u day%s, %u hour%s, %u minute%s, %u second%s, %u millisecond%s, %u microsecond%s\n", duration.yr, duration.yr == 1 ? "" : "s", duration.day, duration.day == 1 ? "" : "s", duration.hr, duration.hr == 1 ? "" : "s", duration.min, duration.min == 1 ? "" : "s", - duration.sec, duration.sec == 1 ? "" : "s", duration.ms, duration.ms == 1 ? "" : "s", duration.mms, duration.mms == 1 ? "" : "s"); + duration.sec, duration.sec == 1 ? "" : "s", duration.ms, duration.ms == 1 ? "" : "s", duration.mms, + duration.mms == 1 ? "" : "s"); stream->write_function(stream, "%d sessions\n", switch_core_session_count()); diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 3e1b43e4a7..85430427f1 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -301,7 +301,7 @@ static switch_status_t conference_local_play_file(conference_obj_t * conference, static switch_status_t conference_member_play_file(conference_member_t * member, char *file, uint32_t leadin); static switch_status_t conference_member_say(conference_member_t * member, char *text, uint32_t leadin); static uint32_t conference_member_stop_file(conference_member_t * member, file_stop_t stop); -static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t * pool); +static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t *pool); static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint); static void launch_conference_record_thread(conference_obj_t * conference, char *path); @@ -1384,7 +1384,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t * thread, } /* launch an input thread for the call leg */ -static void launch_conference_loop_input(conference_member_t * member, switch_memory_pool_t * pool) +static void launch_conference_loop_input(conference_member_t * member, switch_memory_pool_t *pool) { if (member != NULL) { switch_thread_t *thread; @@ -1457,7 +1457,8 @@ static void conference_loop_output(conference_member_t * member) launch_conference_loop_input(member, switch_core_session_get_pool(member->session)); /* build a digit stream object */ - if (member->conference->dtmf_parser != NULL && switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) { + if (member->conference->dtmf_parser != NULL + && switch_ivr_digit_stream_new(member->conference->dtmf_parser, &member->digit_stream) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Warning Will Robinson, there is no digit parser stream object\n"); } @@ -1748,7 +1749,8 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t * t } if (switch_core_file_open(&fh, - rec->path, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, rec->pool) != SWITCH_STATUS_SUCCESS) { + rec->path, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, + rec->pool) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening File [%s]\n", rec->path); goto end; } @@ -1954,7 +1956,8 @@ static switch_status_t conference_play_file(conference_obj_t * conference, char fnode->leadin = leadin; /* Open the file */ - if (switch_core_file_open(&fnode->fh, file, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, pool) != SWITCH_STATUS_SUCCESS) { + if (switch_core_file_open(&fnode->fh, file, (uint8_t) 1, conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, pool) != + SWITCH_STATUS_SUCCESS) { switch_core_destroy_memory_pool(&pool); status = SWITCH_STATUS_NOTFOUND; goto done; @@ -2054,7 +2057,8 @@ static switch_status_t conference_member_play_file(conference_member_t * member, /* Open the file */ if (switch_core_file_open(&fnode->fh, - file, (uint8_t) 1, member->conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, pool) != SWITCH_STATUS_SUCCESS) { + file, (uint8_t) 1, member->conference->rate, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, + pool) != SWITCH_STATUS_SUCCESS) { switch_core_destroy_memory_pool(&pool); status = SWITCH_STATUS_NOTFOUND; goto done; @@ -2120,7 +2124,8 @@ static switch_status_t conference_member_say(conference_member_t * member, char fnode->pool = pool; memset(&fnode->sh, 0, sizeof(fnode->sh)); - if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, fnode->pool) != SWITCH_STATUS_SUCCESS) { + if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, fnode->pool) != + SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine); return SWITCH_STATUS_FALSE; } @@ -2191,7 +2196,8 @@ static switch_status_t conference_say(conference_obj_t * conference, const char fnode->leadin = leadin; memset(&fnode->sh, 0, sizeof(fnode->sh)); - if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, conference->pool) != SWITCH_STATUS_SUCCESS) { + if (switch_core_speech_open(&fnode->sh, conference->tts_engine, conference->tts_voice, conference->rate, &flags, conference->pool) != + SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module [%s]!\n", conference->tts_engine); return SWITCH_STATUS_FALSE; } @@ -3519,7 +3525,8 @@ static switch_status_t conference_outcall(conference_obj_t * conference, /* establish an outbound call leg */ if (switch_ivr_originate(session, - &peer_session, cause, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) { + &peer_session, cause, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num, + NULL) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot create outgoing channel, cause: %s\n", switch_channel_cause2str(*cause)); if (caller_channel) { switch_channel_hangup(caller_channel, *cause); @@ -4340,7 +4347,7 @@ static switch_status_t conference_new_install_caller_controls_custom(conference_ } /* create a new conferene with a specific profile */ -static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t * pool) +static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_memory_pool_t *pool) { conference_obj_t *conference; switch_xml_t xml_kvp; diff --git a/src/mod/applications/mod_ivrtest/mod_ivrtest.c b/src/mod/applications/mod_ivrtest/mod_ivrtest.c index cd3af99357..0215d0cc0f 100644 --- a/src/mod/applications/mod_ivrtest/mod_ivrtest.c +++ b/src/mod/applications/mod_ivrtest/mod_ivrtest.c @@ -272,7 +272,8 @@ static void asrtest_function(switch_core_session_t *session, char *data) if (switch_core_asr_open(&ah, "lumenvox", - read_codec->implementation->iananame, 8000, "127.0.0.1", &flags, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { + read_codec->implementation->iananame, 8000, "127.0.0.1", &flags, + switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { if (strcmp(ah.codec, read_codec->implementation->iananame)) { if (switch_core_codec_init(&codec, ah.codec, diff --git a/src/mod/applications/mod_rss/mod_rss.c b/src/mod/applications/mod_rss/mod_rss.c index 3f2ff2c199..e0cb1f9873 100644 --- a/src/mod/applications/mod_rss/mod_rss.c +++ b/src/mod/applications/mod_rss/mod_rss.c @@ -254,7 +254,8 @@ static void rss_function(switch_core_session_t *session, char *data) NULL, (int) rate, interval, - 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { + 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, + switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n"); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed L16@%uhz 1 channel %dms\n", rate, interval); diff --git a/src/mod/codecs/mod_amr/mod_amr.c b/src/mod/codecs/mod_amr/mod_amr.c index d145ef0dbc..e6227f8b1d 100644 --- a/src/mod/codecs/mod_amr/mod_amr.c +++ b/src/mod/codecs/mod_amr/mod_amr.c @@ -243,7 +243,8 @@ static switch_status_t switch_amr_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { #ifdef AMR_PASSTHROUGH switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); @@ -265,7 +266,8 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { #ifdef AMR_PASSTHROUGH switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); diff --git a/src/mod/codecs/mod_g711/mod_g711.c b/src/mod/codecs/mod_g711/mod_g711.c index 3ecc0bf274..3ab8c5faaf 100644 --- a/src/mod/codecs/mod_g711/mod_g711.c +++ b/src/mod/codecs/mod_g711/mod_g711.c @@ -55,7 +55,8 @@ static switch_status_t switch_g711u_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { short *dbuf; unsigned char *ebuf; @@ -77,7 +78,8 @@ static switch_status_t switch_g711u_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { short *dbuf; unsigned char *ebuf; @@ -125,7 +127,8 @@ static switch_status_t switch_g711a_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { short *dbuf; unsigned char *ebuf; @@ -147,7 +150,8 @@ static switch_status_t switch_g711a_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { short *dbuf; unsigned char *ebuf; diff --git a/src/mod/codecs/mod_g722/mod_g722.c b/src/mod/codecs/mod_g722/mod_g722.c index ebd0d2f537..a587557666 100644 --- a/src/mod/codecs/mod_g722/mod_g722.c +++ b/src/mod/codecs/mod_g722/mod_g722.c @@ -76,7 +76,8 @@ static switch_status_t switch_g722_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { struct g722_context *context = codec->private_info; @@ -93,7 +94,8 @@ static switch_status_t switch_g722_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { struct g722_context *context = codec->private_info; diff --git a/src/mod/codecs/mod_g723_1/mod_g723_1.c b/src/mod/codecs/mod_g723_1/mod_g723_1.c index 4ff0c488a0..8a7bb28a6a 100644 --- a/src/mod/codecs/mod_g723_1/mod_g723_1.c +++ b/src/mod/codecs/mod_g723_1/mod_g723_1.c @@ -109,7 +109,8 @@ static switch_status_t switch_g723_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { #ifdef G723_PASSTHROUGH switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); @@ -139,7 +140,8 @@ static switch_status_t switch_g723_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { #ifdef G723_PASSTHROUGH switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); diff --git a/src/mod/codecs/mod_g726/mod_g726.c b/src/mod/codecs/mod_g726/mod_g726.c index 880148b1e9..5a67b8cac4 100644 --- a/src/mod/codecs/mod_g726/mod_g726.c +++ b/src/mod/codecs/mod_g726/mod_g726.c @@ -114,7 +114,8 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { g726_handle_t *handle = codec->private_info; @@ -160,7 +161,8 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { g726_handle_t *handle = codec->private_info; diff --git a/src/mod/codecs/mod_g729/mod_g729.c b/src/mod/codecs/mod_g729/mod_g729.c index 0b0251db27..4995c3725c 100644 --- a/src/mod/codecs/mod_g729/mod_g729.c +++ b/src/mod/codecs/mod_g729/mod_g729.c @@ -95,7 +95,8 @@ static switch_status_t switch_g729_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { #ifdef G729_PASSTHROUGH switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); @@ -137,7 +138,8 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { #ifdef G729_PASSTHROUGH switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This codec is only usable in passthrough mode!\n"); diff --git a/src/mod/codecs/mod_ilbc/mod_ilbc.c b/src/mod/codecs/mod_ilbc/mod_ilbc.c index 0e2c4190fc..1cc15c3ee1 100644 --- a/src/mod/codecs/mod_ilbc/mod_ilbc.c +++ b/src/mod/codecs/mod_ilbc/mod_ilbc.c @@ -98,7 +98,8 @@ static switch_status_t switch_ilbc_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { struct ilbc_context *context = codec->private_info; @@ -137,7 +138,8 @@ static switch_status_t switch_ilbc_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { struct ilbc_context *context = codec->private_info; diff --git a/src/mod/codecs/mod_l16/mod_l16.c b/src/mod/codecs/mod_l16/mod_l16.c index c2b9d3485d..e0072a64dc 100644 --- a/src/mod/codecs/mod_l16/mod_l16.c +++ b/src/mod/codecs/mod_l16/mod_l16.c @@ -52,7 +52,8 @@ static switch_status_t switch_raw_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { /* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */ if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) { @@ -67,7 +68,8 @@ static switch_status_t switch_raw_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) { memcpy(decoded_data, encoded_data, encoded_data_len); diff --git a/src/mod/codecs/mod_lpc10/mod_lpc10.c b/src/mod/codecs/mod_lpc10/mod_lpc10.c index 1dcf8a1dd5..e059e242af 100644 --- a/src/mod/codecs/mod_lpc10/mod_lpc10.c +++ b/src/mod/codecs/mod_lpc10/mod_lpc10.c @@ -87,7 +87,8 @@ static switch_status_t switch_lpc10_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { struct lpc10_context *context = codec->private_info; uint8_t i; @@ -120,7 +121,8 @@ static switch_status_t switch_lpc10_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { struct lpc10_context *context = codec->private_info; int i; diff --git a/src/mod/codecs/mod_speex/mod_speex.c b/src/mod/codecs/mod_speex/mod_speex.c index 9b137abcd6..29dae4e669 100644 --- a/src/mod/codecs/mod_speex/mod_speex.c +++ b/src/mod/codecs/mod_speex/mod_speex.c @@ -157,7 +157,8 @@ static switch_status_t switch_speex_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data, uint32_t decoded_data_len, - uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, unsigned int *flag) + uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate, + unsigned int *flag) { struct speex_context *context = codec->private_info; short *buf; @@ -208,7 +209,8 @@ static switch_status_t switch_speex_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data, uint32_t encoded_data_len, - uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag) + uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, + unsigned int *flag) { struct speex_context *context = codec->private_info; short *buf; diff --git a/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c b/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c index f6121c7cd9..7b214d4679 100644 --- a/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c +++ b/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c @@ -99,7 +99,8 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t caller_profile = switch_channel_get_caller_profile(channel); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name, caller_profile->destination_number); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name, + caller_profile->destination_number); if (!(globals.directory_name && globals.host && globals.dn && globals.base && globals.pass)) { diff --git a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c index ac7e35fac3..f4ffc0710e 100644 --- a/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c +++ b/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c @@ -188,7 +188,8 @@ static int parse_exten(switch_core_session_t *session, switch_xml_t xexten, swit return proceed; } -static switch_status_t dialplan_xml_locate(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t * root, switch_xml_t * node) +static switch_status_t dialplan_xml_locate(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t * root, + switch_xml_t * node) { switch_status_t status = SWITCH_STATUS_GENERR; switch_channel_t *channel; diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index 6d38d70e8a..5a80f22f11 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -46,7 +46,8 @@ static switch_memory_pool_t *module_pool = NULL; static char sub_sql[] = "CREATE TABLE subscriptions (\n" - " sub_from VARCHAR(255),\n" " sub_to VARCHAR(255),\n" " show VARCHAR(255),\n" " status VARCHAR(255)\n" ");\n"; + " sub_from VARCHAR(255),\n" " sub_to VARCHAR(255),\n" " show VARCHAR(255),\n" " status VARCHAR(255)\n" + ");\n"; typedef enum { @@ -178,7 +179,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) static switch_status_t channel_on_transmit(switch_core_session_t *session); static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_core_session_t **new_session, switch_memory_pool_t **pool); static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); @@ -957,7 +958,8 @@ static switch_status_t negotiate_media(switch_core_session_t *session) while (!(switch_test_flag(tech_pvt, TFLAG_CODEC_READY) && switch_test_flag(tech_pvt, TFLAG_RTP_READY) && - switch_test_flag(tech_pvt, TFLAG_ANSWER) && switch_test_flag(tech_pvt, TFLAG_TRANSPORT_ACCEPT) && switch_test_flag(tech_pvt, TFLAG_TRANSPORT))) { + switch_test_flag(tech_pvt, TFLAG_ANSWER) && switch_test_flag(tech_pvt, TFLAG_TRANSPORT_ACCEPT) + && switch_test_flag(tech_pvt, TFLAG_TRANSPORT))) { now = switch_time_now(); elapsed = (unsigned int) ((now - started) / 1000); @@ -1502,7 +1504,7 @@ static const switch_loadable_module_interface_t channel_module_interface = { */ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_core_session_t **new_session, switch_memory_pool_t **pool) { if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) { struct private_object *tech_pvt; @@ -1758,7 +1760,8 @@ static switch_status_t init_profile(struct mdl_profile *profile, uint8_t login) "message[%s]\n" "rtp-ip[%s]\n" "name[%s]\n" - "exten[%s]\n", profile->login, profile->password, profile->dialplan, profile->message, profile->ip, profile->name, profile->exten); + "exten[%s]\n", profile->login, profile->password, profile->dialplan, profile->message, profile->ip, profile->name, + profile->exten); return SWITCH_STATUS_FALSE; } @@ -2129,7 +2132,8 @@ static void do_vcard(ldl_handle_t * handle, char *to, char *from, char *id) switch_safe_free(xmlstr); } -static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlsession, ldl_signal_t dl_signal, char *to, char *from, char *subject, char *msg) +static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlsession, ldl_signal_t dl_signal, char *to, char *from, char *subject, + char *msg) { struct mdl_profile *profile = NULL; switch_core_session_t *session = NULL; @@ -2267,7 +2271,8 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses if (profile->auto_reply) { ldl_handle_send_msg(handle, - (profile->user_flags & LDL_FLAG_COMPONENT) ? to : ldl_handle_get_login(profile->handle), from, "", profile->auto_reply); + (profile->user_flags & LDL_FLAG_COMPONENT) ? to : ldl_handle_get_login(profile->handle), from, "", + profile->auto_reply); } if (strchr(to, '+')) { @@ -2482,7 +2487,8 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses if (match && payloads[x].rate == tech_pvt->codecs[y]->samples_per_second) { tech_pvt->codec_index = y; - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing Payload index %u %s %u\n", y, payloads[x].name, payloads[x].id); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing Payload index %u %s %u\n", y, payloads[x].name, + payloads[x].id); tech_pvt->codec_name = tech_pvt->codecs[y]->iananame; tech_pvt->codec_num = tech_pvt->codecs[y]->ianacode; tech_pvt->r_codec_num = (switch_payload_t) (payloads[x].id); @@ -2636,7 +2642,8 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses ldl_session_get_value(dlsession, "aniii"), ldl_session_get_value(dlsession, - "rdnis"), (char *) modname, context, exten)) != 0) { + "rdnis"), (char *) modname, context, + exten)) != 0) { char name[128]; snprintf(name, sizeof(name), "DingaLing/%s", tech_pvt->caller_profile->destination_number); switch_channel_set_name(channel, name); diff --git a/src/mod/endpoints/mod_iax/mod_iax.c b/src/mod/endpoints/mod_iax/mod_iax.c index 1e302158c9..c77823c9fc 100644 --- a/src/mod/endpoints/mod_iax/mod_iax.c +++ b/src/mod/endpoints/mod_iax/mod_iax.c @@ -417,7 +417,7 @@ static switch_status_t channel_on_loopback(switch_core_session_t *session); static switch_status_t channel_on_transmit(switch_core_session_t *session); static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_core_session_t **new_session, switch_memory_pool_t **pool); static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); @@ -790,7 +790,7 @@ that allocate memory or you will have 1 channel with memory allocated from anoth */ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_core_session_t **new_session, switch_memory_pool_t **pool) { if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) { private_t *tech_pvt; diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 78acd0f40e..075fd01de9 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -144,7 +144,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan) static switch_status_t channel_on_transmit(switch_core_session_t *session); static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_core_session_t **new_session, switch_memory_pool_t **pool); static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig); @@ -821,7 +821,7 @@ static const switch_loadable_module_interface_t channel_module_interface = { */ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_core_session_t **new_session, switch_memory_pool_t **pool) { if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) { @@ -1248,7 +1248,8 @@ static int dump_info(void) if (inputParameters.channelCount > 0 && outputParameters.channelCount > 0) { switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, - "full-duplex 16 bit %d channel input, %d channel output rates:", inputParameters.channelCount, outputParameters.channelCount); + "full-duplex 16 bit %d channel input, %d channel output rates:", inputParameters.channelCount, + outputParameters.channelCount); PrintSupportedStandardSampleRates(&inputParameters, &outputParameters); } } @@ -1281,14 +1282,16 @@ static switch_status_t engage_device(int sample_rate, int codec_ms) if (switch_core_codec_init(&globals.read_codec, "L16", - NULL, sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) { + NULL, sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, + NULL) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n"); return SWITCH_STATUS_FALSE; } else { if (switch_core_codec_init(&globals.write_codec, "L16", NULL, - sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) { + sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, + NULL) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n"); switch_core_codec_destroy(&globals.read_codec); return SWITCH_STATUS_FALSE; @@ -1296,7 +1299,8 @@ static switch_status_t engage_device(int sample_rate, int codec_ms) } if (switch_core_timer_init(&globals.timer, - globals.timer_name, codec_ms, globals.read_codec.implementation->samples_per_frame, module_pool) != SWITCH_STATUS_SUCCESS) { + globals.timer_name, codec_ms, globals.read_codec.implementation->samples_per_frame, + module_pool) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n"); switch_core_codec_destroy(&globals.read_codec); switch_core_codec_destroy(&globals.write_codec); @@ -1674,9 +1678,11 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session), NULL, - dialplan, cid_name, cid_num, NULL, NULL, NULL, NULL, (char *) modname, NULL, dest)) != 0) { + dialplan, cid_name, cid_num, NULL, NULL, NULL, NULL, (char *) modname, NULL, + dest)) != 0) { char name[128]; - snprintf(name, sizeof(name), "PortAudio/%s", tech_pvt->caller_profile->destination_number ? tech_pvt->caller_profile->destination_number : modname); + snprintf(name, sizeof(name), "PortAudio/%s", + tech_pvt->caller_profile->destination_number ? tech_pvt->caller_profile->destination_number : modname); switch_channel_set_name(channel, name); switch_channel_set_caller_profile(channel, tech_pvt->caller_profile); diff --git a/src/mod/endpoints/mod_portaudio/pablio.c b/src/mod/endpoints/mod_portaudio/pablio.c index ac82612833..54ac542a48 100644 --- a/src/mod/endpoints/mod_portaudio/pablio.c +++ b/src/mod/endpoints/mod_portaudio/pablio.c @@ -191,7 +191,8 @@ static unsigned long RoundUpToNextPowerOf2(unsigned long n) * */ PaError OpenAudioStream(PABLIO_Stream ** rwblPtr, - const PaStreamParameters * inputParameters, const PaStreamParameters * outputParameters, double sampleRate, PaStreamFlags streamFlags) + const PaStreamParameters * inputParameters, const PaStreamParameters * outputParameters, double sampleRate, + PaStreamFlags streamFlags) { long bytesPerSample; PaError err; diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index faadb81b04..b992c35de5 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -108,7 +108,8 @@ static char sub_sql[] = static char auth_sql[] = "CREATE TABLE sip_authentication (\n" " user VARCHAR(255),\n" - " host VARCHAR(255),\n" " passwd VARCHAR(255),\n" " nonce VARCHAR(255),\n" " expires INTEGER(8)" ");\n"; + " host VARCHAR(255),\n" " passwd VARCHAR(255),\n" " nonce VARCHAR(255),\n" " expires INTEGER(8)" + ");\n"; static const char modname[] = "mod_sofia"; #define STRLEN 15 @@ -331,7 +332,8 @@ static switch_status_t sofia_on_loopback(switch_core_session_t *session); static switch_status_t sofia_on_transmit(switch_core_session_t *session); static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session, - switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, + switch_memory_pool_t **pool); static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); @@ -610,7 +612,7 @@ static int del_callback(void *pArg, int argc, char **argv, char **columnNames) return 0; } -static void check_expire(switch_core_db_t * db, sofia_profile_t * profile, time_t now) +static void check_expire(switch_core_db_t *db, sofia_profile_t * profile, time_t now) { char sql[1024]; char *errmsg; @@ -912,7 +914,7 @@ static void terminate_session(switch_core_session_t **session, switch_call_cause -static switch_status_t sofia_ext_address_lookup(char **ip, switch_port_t *port, char *sourceip, switch_memory_pool_t * pool) +static switch_status_t sofia_ext_address_lookup(char **ip, switch_port_t *port, char *sourceip, switch_memory_pool_t *pool) { char *error; @@ -956,7 +958,8 @@ static switch_status_t tech_choose_port(private_object_t * tech_pvt) sdp_port = tech_pvt->local_sdp_audio_port; if (tech_pvt->profile->extrtpip) { - if (sofia_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) { + if (sofia_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) != + SWITCH_STATUS_SUCCESS) { terminate_session(&tech_pvt->session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__); return SWITCH_STATUS_FALSE; } @@ -1065,7 +1068,8 @@ static switch_status_t do_invite(switch_core_session_t *session) char *url = get_url_from_contact(tech_pvt->dest, 1); tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL, NUTAG_URL(url), - SIPTAG_TO_STR(tech_pvt->dest_to), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), TAG_END()); + SIPTAG_TO_STR(tech_pvt->dest_to), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), + TAG_END()); switch_safe_free(url); if (!(tech_pvt->sofia_private = malloc(sizeof(*tech_pvt->sofia_private)))) { @@ -1158,7 +1162,8 @@ static void do_xfer_invite(switch_core_session_t *session) char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER); tech_pvt->nh2 = nua_handle(tech_pvt->profile->nua, NULL, - SIPTAG_TO_STR(tech_pvt->dest), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), TAG_END()); + SIPTAG_TO_STR(tech_pvt->dest), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), + TAG_END()); nua_handle_bind(tech_pvt->nh2, tech_pvt->sofia_private); @@ -1557,7 +1562,8 @@ static switch_status_t activate_rtp(private_object_t * tech_pvt) if (tech_pvt->rtp_session && switch_test_flag(tech_pvt, TFLAG_REINVITE)) { switch_clear_flag_locked(tech_pvt, TFLAG_REINVITE); - if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port, &err) != SWITCH_STATUS_SUCCESS) { + if (switch_rtp_set_remote_address(tech_pvt->rtp_session, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port, &err) != + SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "RTP CHANGING DEST TO: [%s:%d]\n", @@ -1694,7 +1700,8 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session) if (tech_pvt->nh) { if (tech_pvt->local_sdp_str) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP %s:\n%s\n", switch_channel_get_name(channel), tech_pvt->local_sdp_str); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP %s:\n%s\n", switch_channel_get_name(channel), + tech_pvt->local_sdp_str); } } } @@ -2233,7 +2240,8 @@ static void logger(void *logarg, char const *fmt, va_list ap) static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session, - switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session, + switch_memory_pool_t **pool) { switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER; switch_core_session_t *nsession; @@ -2621,7 +2629,8 @@ static switch_call_cause_t sip_cause_to_freeswitch(int status) static void set_hash_key(char *hash_key, int32_t len, sip_t const *sip) { - snprintf(hash_key, len, "%s%s%s", (char *) sip->sip_from->a_url->url_user, (char *) sip->sip_from->a_url->url_host, (char *) sip->sip_to->a_url->url_user); + snprintf(hash_key, len, "%s%s%s", (char *) sip->sip_from->a_url->url_user, (char *) sip->sip_from->a_url->url_host, + (char *) sip->sip_to->a_url->url_user); #if 0 @@ -3227,7 +3236,8 @@ typedef enum { REG_INVITE } sofia_regtype_t; -static uint8_t handle_register(nua_t * nua, sofia_profile_t * profile, nua_handle_t * nh, sip_t const *sip, sofia_regtype_t regtype, char *key, uint32_t keylen) +static uint8_t handle_register(nua_t * nua, sofia_profile_t * profile, nua_handle_t * nh, sip_t const *sip, sofia_regtype_t regtype, char *key, + uint32_t keylen) { sip_from_t const *from = NULL; sip_expires_t const *expires = NULL; @@ -3389,7 +3399,8 @@ static uint8_t handle_register(nua_t * nua, sofia_profile_t * profile, nua_handl sql = switch_mprintf("delete from sip_authentication where user='%q' and host='%q';\n" "insert into sip_authentication values('%q','%q','%q','%q', %ld)", from_user, from_host, from_user, from_host, a1_hash, uuid_str, time(NULL) + profile->nonce_ttl); - auth_str = switch_mprintf("Digest realm=\"%q\", nonce=\"%q\",%s algorithm=MD5, qop=\"auth\"", from_host, uuid_str, stale ? " stale=\"true\"," : ""); + auth_str = + switch_mprintf("Digest realm=\"%q\", nonce=\"%q\",%s algorithm=MD5, qop=\"auth\"", from_host, uuid_str, stale ? " stale=\"true\"," : ""); if (regtype == REG_REGISTER) { @@ -3980,7 +3991,8 @@ static void sip_i_refer(nua_t * nua, sofia_profile_t * profile, nua_handle_t * n switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Transfer! [%s]\n", br_a); switch_channel_set_variable(channel_a, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "ATTENDED_TRANSFER_ERROR"); nua_notify(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"), - NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR("SIP/2.0 403 Forbidden"), SIPTAG_EVENT_STR(etmp), TAG_END()); + NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR("SIP/2.0 403 Forbidden"), SIPTAG_EVENT_STR(etmp), + TAG_END()); } } } else { diff --git a/src/mod/endpoints/mod_wanpipe/libsangoma/win_api_common.h b/src/mod/endpoints/mod_wanpipe/libsangoma/win_api_common.h index 05dab420eb..b787523629 100644 --- a/src/mod/endpoints/mod_wanpipe/libsangoma/win_api_common.h +++ b/src/mod/endpoints/mod_wanpipe/libsangoma/win_api_common.h @@ -30,7 +30,8 @@ int tdmv_api_ioctl(HANDLE fd, wanpipe_tdm_api_cmd_t * tdm_api_cmd) if (DeviceIoControl(fd, IoctlManagementCommand, - (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) { + (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln), + (LPOVERLAPPED) NULL) == FALSE) { //actual ioctl failed err = 1; prn(1, "Error: tdmv_api_ioctl(): DeviceIoControl failed!!\n"); @@ -68,7 +69,8 @@ int wanpipe_api_ioctl(HANDLE fd, wan_cmd_api_t * api_cmd) if (DeviceIoControl(fd, IoctlManagementCommand, - (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) { + (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPVOID) & wan_udp, sizeof(wan_udp_hdr_t), (LPDWORD) (&ln), + (LPOVERLAPPED) NULL) == FALSE) { err = 1; prn(1, "Error: wanpipe_api_ioctl(): DeviceIoControl failed!!\n"); return err; @@ -108,7 +110,8 @@ static UCHAR DoWriteCommand(HANDLE drv, TX_DATA_STRUCT * pTx) if (DeviceIoControl(drv, IoctlWriteCommand, - (LPVOID) pTx, (ULONG) sizeof(TX_DATA_STRUCT), (LPVOID) pTx, sizeof(TX_DATA_STRUCT), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) { + (LPVOID) pTx, (ULONG) sizeof(TX_DATA_STRUCT), (LPVOID) pTx, sizeof(TX_DATA_STRUCT), (LPDWORD) (&ln), + (LPOVERLAPPED) NULL) == FALSE) { //check messages log prn(1, "Error: DoWriteCommand(): DeviceIoControl failed!\n"); return 1; @@ -122,7 +125,8 @@ static USHORT DoApiPollCommand(HANDLE drv, API_POLL_STRUCT * api_poll_ptr) { DWORD ln; - if (DeviceIoControl(drv, IoctlApiPoll, (LPVOID) NULL, 0L, (LPVOID) api_poll_ptr, sizeof(API_POLL_STRUCT), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == FALSE) { + if (DeviceIoControl(drv, IoctlApiPoll, (LPVOID) NULL, 0L, (LPVOID) api_poll_ptr, sizeof(API_POLL_STRUCT), (LPDWORD) (&ln), (LPOVERLAPPED) NULL) == + FALSE) { //check messages log prn(1, "Error: DoApiPollCommand(): DeviceIoControl failed!\n"); return 1; diff --git a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c index f3cd9f83fe..6eaeaab2b9 100644 --- a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c +++ b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c @@ -462,7 +462,7 @@ static switch_status_t wanpipe_on_loopback(switch_core_session_t *session); static switch_status_t wanpipe_on_transmit(switch_core_session_t *session); static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_core_session_t **new_session, switch_memory_pool_t **pool); static switch_status_t wanpipe_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t wanpipe_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static int on_info(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event * pevent); @@ -580,7 +580,8 @@ static switch_status_t wanpipe_on_init(switch_core_session_t *session) switch_core_session_get_uuid(session), sizeof(tech_pvt->ss7boost_handle->setup_array[tech_pvt->setup_index])); - ss7boost_client_call_init(&event, tech_pvt->caller_profile->caller_id_number, tech_pvt->caller_profile->destination_number, tech_pvt->setup_index); + ss7boost_client_call_init(&event, tech_pvt->caller_profile->caller_id_number, tech_pvt->caller_profile->destination_number, + tech_pvt->setup_index); if (ss7boost_client_connection_write(&tech_pvt->ss7boost_handle->mcon, &event) <= 0) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Critical System Error: Failed to tx on ISUP socket [%s]\n", strerror(errno)); @@ -985,7 +986,7 @@ static const switch_loadable_module_interface_t wanpipe_module_interface = { static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_core_session_t **new_session, switch_memory_pool_t **pool) { char *bchan = NULL; char name[128] = ""; @@ -1194,8 +1195,10 @@ static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *sessi pri_sr_set_bearer(sr, 0, SPANS[span]->l1); pri_sr_set_called(sr, caller_profile->destination_number, SPANS[span]->dp, 1); pri_sr_set_caller(sr, - caller_profile->caller_id_number, caller_profile->caller_id_name, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN); - pri_sr_set_redirecting(sr, caller_profile->caller_id_number, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, PRI_REDIR_UNCONDITIONAL); + caller_profile->caller_id_number, caller_profile->caller_id_name, SPANS[span]->dp, + PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN); + pri_sr_set_redirecting(sr, caller_profile->caller_id_number, SPANS[span]->dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, + PRI_REDIR_UNCONDITIONAL); if (pri_setup(spri->pri, tech_pvt->call, sr)) { switch_core_session_destroy(new_session); @@ -1432,7 +1435,8 @@ static int on_ringing(struct sangoma_pri *spri, sangoma_pri_event_t event_type, switch_core_session_rwunlock(session); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, - "-- Ringing on channel s%dc%d %s but it's not in use?\n", spri->span, pevent->ringing.channel, chanmap->map[pevent->ringing.channel]); + "-- Ringing on channel s%dc%d %s but it's not in use?\n", spri->span, pevent->ringing.channel, + chanmap->map[pevent->ringing.channel]); } return 0; @@ -1982,7 +1986,8 @@ static int parse_ss7_event(ss7boost_handle_t * ss7boost_handle, ss7boost_client_ event->chan + 1, (event->called_number_digits_count ? (char *) event->called_number_digits : "N/A"), (event->calling_number_digits_count ? (char *) event->calling_number_digits : "N/A"), - switch_channel_cause2str(event->release_cause), event->span + 1, event->chan + 1, event->event_id, event->call_setup_id, event->seqno); + switch_channel_cause2str(event->release_cause), event->span + 1, event->chan + 1, event->event_id, event->call_setup_id, + event->seqno); switch (event->event_id) { @@ -2012,7 +2017,8 @@ static int parse_ss7_event(ss7boost_handle_t * ss7boost_handle, ss7boost_client_ handle_call_stop_ack(ss7boost_handle, event); break; default: - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Warning no handler implemented for [%s]\n", ss7boost_client_event_id_name(event->event_id)); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Warning no handler implemented for [%s]\n", + ss7boost_client_event_id_name(event->event_id)); break; } switch_mutex_unlock(ss7boost_handle->mutex); diff --git a/src/mod/endpoints/mod_wanpipe/ss7boost_client.c b/src/mod/endpoints/mod_wanpipe/ss7boost_client.c index 241604a505..d02fd926dc 100644 --- a/src/mod/endpoints/mod_wanpipe/ss7boost_client.c +++ b/src/mod/endpoints/mod_wanpipe/ss7boost_client.c @@ -98,7 +98,7 @@ SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_close(ss7boost_client } SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_open(ss7boost_client_connection_t * mcon, - char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t * pool) + char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t *pool) { memset(mcon, 0, sizeof(*mcon)); mcon->pool = pool; diff --git a/src/mod/endpoints/mod_wanpipe/ss7boost_client.h b/src/mod/endpoints/mod_wanpipe/ss7boost_client.h index d3bb6e08a6..89be001275 100644 --- a/src/mod/endpoints/mod_wanpipe/ss7boost_client.h +++ b/src/mod/endpoints/mod_wanpipe/ss7boost_client.h @@ -91,7 +91,7 @@ typedef struct ss7boost_client_connection ss7boost_client_connection_t; SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_close(ss7boost_client_connection_t * mcon); SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_open(ss7boost_client_connection_t * mcon, - char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t * pool); + char *local_ip, int local_port, char *ip, int port, switch_memory_pool_t *pool); SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_read(ss7boost_client_connection_t * mcon, ss7boost_client_event_t ** event); SWITCH_DECLARE(switch_status_t) ss7boost_client_connection_write(ss7boost_client_connection_t * mcon, ss7boost_client_event_t * event); SWITCH_DECLARE(void) ss7boost_client_event_init(ss7boost_client_event_t * event, ss7boost_client_event_id_t event_id, int chan, int span); diff --git a/src/mod/endpoints/mod_woomera/mod_woomera.c b/src/mod/endpoints/mod_woomera/mod_woomera.c index efa3a25fda..8bec324fee 100644 --- a/src/mod/endpoints/mod_woomera/mod_woomera.c +++ b/src/mod/endpoints/mod_woomera/mod_woomera.c @@ -171,7 +171,7 @@ static switch_status_t woomera_on_loopback(switch_core_session_t *session); static switch_status_t woomera_on_transmit(switch_core_session_t *session); static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool); + switch_core_session_t **new_session, switch_memory_pool_t **pool); static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t woomera_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id); static switch_status_t woomera_kill_channel(switch_core_session_t *session, int sig); @@ -478,7 +478,7 @@ static const switch_loadable_module_interface_t woomera_module_interface = { */ static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_core_session_t **new_session, switch_memory_pool_t **pool) { if ((*new_session = switch_core_session_request(&woomera_endpoint_interface, pool)) != 0) { struct private_object *tech_pvt; diff --git a/src/mod/event_handlers/mod_cdr/cdrcontainer.h b/src/mod/event_handlers/mod_cdr/cdrcontainer.h index 65511df1fd..7e6c7d8e9c 100644 --- a/src/mod/event_handlers/mod_cdr/cdrcontainer.h +++ b/src/mod/event_handlers/mod_cdr/cdrcontainer.h @@ -54,8 +54,8 @@ extern "C" { class CDRContainer { public: CDRContainer(); - CDRContainer(switch_memory_pool_t * module_pool); - ~CDRContainer(); + CDRContainer(switch_memory_pool_t *module_pool); + ~CDRContainer(); void add_cdr(switch_core_session_t *session); void process_records(); #ifdef SWITCH_QUEUE_ENHANCED diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c index b05fbd4dbc..85271462ea 100644 --- a/src/mod/formats/mod_shout/mod_shout.c +++ b/src/mod/formats/mod_shout/mod_shout.c @@ -557,7 +557,8 @@ static switch_status_t shout_file_open(switch_file_handle_t *handle, char *path) context->stream_url = switch_core_sprintf(context->memory_pool, "http://%s", path); launch_read_stream_thread(context); } else { - if (switch_file_open(&context->fd, path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, handle->memory_pool) != SWITCH_STATUS_SUCCESS) { + if (switch_file_open(&context->fd, path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, handle->memory_pool) != + SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error opening %s\n", path); goto error; } diff --git a/src/mod/languages/mod_perl/switch_swig_wrap.c b/src/mod/languages/mod_perl/switch_swig_wrap.c index e662c71c0a..6dfef3a446 100644 --- a/src/mod/languages/mod_perl/switch_swig_wrap.c +++ b/src/mod/languages/mod_perl/switch_swig_wrap.c @@ -468,7 +468,8 @@ extern "C" { if (s->next) { s->next->prev = s->prev; } - /* Insert s as second element in the list */ s->next = ty->next; + /* Insert s as second element in the list */ + s-> next = ty->next; if (ty->next) ty->next->prev = s; ty->next = s; @@ -1697,13 +1698,15 @@ extern "C" { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static swig_type_info _swigt__p_switch_channel_t[] = { {"_p_switch_channel_t", 0, "switch_channel_t *", 0}, {"_p_switch_channel_t"}, {0} }; - static swig_type_info _swigt__p_switch_file_handle_t[] = { {"_p_switch_file_handle_t", 0, "switch_file_handle_t *", 0}, {"_p_switch_file_handle_t"}, {0} }; + static swig_type_info _swigt__p_switch_file_handle_t[] = + { {"_p_switch_file_handle_t", 0, "switch_file_handle_t *", 0}, {"_p_switch_file_handle_t"}, {0} }; static swig_type_info _swigt__p_switch_core_session_t[] = { {"_p_switch_core_session_t", 0, "switch_core_session_t *", 0}, {"_p_switch_core_session_t"}, {0} }; static swig_type_info _swigt__p_p_switch_core_session_t[] = { {"_p_p_switch_core_session_t", 0, "switch_core_session_t **", 0}, {"_p_p_switch_core_session_t"}, {0} }; static swig_type_info _swigt__p_uint32_t[] = { {"_p_uint32_t", 0, "uint32_t *", 0}, {"_p_uint32_t"}, {0} }; - static swig_type_info _swigt__p_switch_input_callback_function_t[] = { {"_p_switch_input_callback_function_t", 0, "switch_input_callback_function_t *", 0}, + static swig_type_info _swigt__p_switch_input_callback_function_t[] = + { {"_p_switch_input_callback_function_t", 0, "switch_input_callback_function_t *", 0}, {"_p_switch_input_callback_function_t"}, {0} }; diff --git a/src/mod/languages/mod_python/switch_swig_wrap.c b/src/mod/languages/mod_python/switch_swig_wrap.c index 347013f4e0..fcd39b44ed 100644 --- a/src/mod/languages/mod_python/switch_swig_wrap.c +++ b/src/mod/languages/mod_python/switch_swig_wrap.c @@ -571,7 +571,7 @@ extern "C" { * type checking. * * Author : David Beazley (beazley@cs.uchicago.edu) - ************************************************************************//* Common SWIG API */ + ************************************************************************//* Common SWIG API */ #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags) #define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) @@ -583,11 +583,11 @@ extern "C" { #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) /* ----------------------------------------------------------------------------- * Pointer declarations - * ----------------------------------------------------------------------------- *//* - Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent - C/C++ pointers in the python side. Very useful for debugging, but - not always safe. - */ + * ----------------------------------------------------------------------------- *//* + Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent + C/C++ pointers in the python side. Very useful for debugging, but + not always safe. + */ #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES) # define SWIG_COBJECT_TYPES #endif @@ -1538,7 +1538,8 @@ extern "C" { resultobj = Py_None; return resultobj; fail:return NULL; - } static PyObject *_wrap_fs_core_init(PyObject * self, PyObject * args) { + } + static PyObject *_wrap_fs_core_init(PyObject * self, PyObject * args) { PyObject *resultobj = NULL; char *arg1 = (char *) 0; int result; @@ -2448,11 +2449,13 @@ extern "C" { static swig_type_info _swigt__p_char = { "_p_char", "char *", 0, 0, 0 }; static swig_type_info _swigt__p_p_switch_core_session_t = { "_p_p_switch_core_session_t", "switch_core_session_t **", 0, 0, 0 }; - static swig_type_info _swigt__p_switch_channel_state_t = { "_p_switch_channel_state_t", "enum switch_channel_state_t *|switch_channel_state_t *", 0, 0, 0 }; + static swig_type_info _swigt__p_switch_channel_state_t = + { "_p_switch_channel_state_t", "enum switch_channel_state_t *|switch_channel_state_t *", 0, 0, 0 }; static swig_type_info _swigt__p_switch_channel_t = { "_p_switch_channel_t", "switch_channel_t *", 0, 0, 0 }; static swig_type_info _swigt__p_switch_core_session_t = { "_p_switch_core_session_t", "switch_core_session_t *", 0, 0, 0 }; static swig_type_info _swigt__p_switch_file_handle_t = { "_p_switch_file_handle_t", "switch_file_handle_t *", 0, 0, 0 }; - static swig_type_info _swigt__p_switch_input_callback_function_t = { "_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, 0 }; + static swig_type_info _swigt__p_switch_input_callback_function_t = + { "_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, 0 }; static swig_type_info _swigt__ptrdiff_t = { "_ptrdiff_t", "ptrdiff_t", 0, 0, 0 }; static swig_type_info _swigt__size_t = { "_size_t", "size_t", 0, 0, 0 }; @@ -2680,7 +2683,8 @@ extern "C" { SWIGINTERN PyObject *swig_varlink_repr(swig_varlinkobject * v) { v = v; return PyString_FromString(""); - } SWIGINTERN int swig_varlink_print(swig_varlinkobject * v, FILE * fp, int flags) { + } + SWIGINTERN int swig_varlink_print(swig_varlinkobject * v, FILE * fp, int flags) { swig_globalvar *var; flags = flags; fprintf(fp, "Swig global variables { "); diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 745a7f0199..047b830b06 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -1337,7 +1337,8 @@ static JSBool session_speak(JSContext * cx, JSObject * obj, uintN argc, jsval * args.input_callback = dtmf_func; args.buf = bp; args.buflen = len; - switch_ivr_speak_text(jss->session, tts_name, voice_name && strlen(voice_name) ? voice_name : NULL, codec->implementation->samples_per_second, text, &args); + switch_ivr_speak_text(jss->session, tts_name, voice_name + && strlen(voice_name) ? voice_name : NULL, codec->implementation->samples_per_second, text, &args); JS_ResumeRequest(cx, cb_state.saveDepth); *rval = cb_state.ret; @@ -2135,7 +2136,8 @@ static JSBool session_originate(JSContext * cx, JSObject * obj, uintN argc, jsva } caller_profile = switch_caller_profile_new(pool, - username, dialplan, cid_name, cid_num, network_addr, ani, aniii, rdnis, (char *) modname, context, dest); + username, dialplan, cid_name, cid_num, network_addr, ani, aniii, rdnis, (char *) modname, context, + dest); if (switch_ivr_originate(session, &peer_session, &jss->cause, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot Create Outgoing Channel! [%s]\n", dest); diff --git a/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c b/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c index bf074ec9a5..7b47c9d285 100644 --- a/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c +++ b/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c @@ -407,7 +407,8 @@ int send_message(char *data, size_t len, char **rcpts) /* recipients */ for (r = rcpts; *r != NULL; r++) { if ((ret = (esmtp ? - mailesmtp_rcpt(smtp, *r, MAILSMTP_DSN_NOTIFY_FAILURE | MAILSMTP_DSN_NOTIFY_DELAY, NULL) : mailsmtp_rcpt(smtp, *r))) != MAILSMTP_NO_ERROR) { + mailesmtp_rcpt(smtp, *r, MAILSMTP_DSN_NOTIFY_FAILURE | MAILSMTP_DSN_NOTIFY_DELAY, NULL) : mailsmtp_rcpt(smtp, + *r))) != MAILSMTP_NO_ERROR) { fprintf(stderr, "mailsmtp_rcpt: %s: %s\n", *r, mailsmtp_strerror(ret)); goto error; } diff --git a/src/mod/say/mod_say_en/mod_say_en.c b/src/mod/say/mod_say_en/mod_say_en.c index c3a9bc823d..53f21c8d20 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -256,7 +256,8 @@ static switch_status_t en_ip(switch_core_session_t *session, char *tosay, switch } -static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) +static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, + switch_input_args_t *args) { int32_t t; switch_time_t target = 0; @@ -402,7 +403,8 @@ static switch_status_t en_say_time(switch_core_session_t *session, char *tosay, } -static switch_status_t en_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) +static switch_status_t en_say_money(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, + switch_input_args_t *args) { switch_channel_t *channel; diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c index 5f93d16c9b..8f0a8c7b0b 100644 --- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c +++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c @@ -56,7 +56,8 @@ static size_t file_callback(void *ptr, size_t size, size_t nmemb, void *data) } -static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, const char *params, void *user_data) +static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, const char *params, + void *user_data) { char filename[512] = ""; CURL *curl_handle = NULL; diff --git a/src/switch_apr.c b/src/switch_apr.c index 8e7f38f896..de82ab8e5e 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -65,14 +65,14 @@ /* Memory Pools */ -SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t * p) +SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p) { apr_pool_clear(p); } /* Hash tables */ -SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t * p, switch_hash_t * ht) +SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t * ht) { return apr_hash_first(p, ht); } @@ -99,7 +99,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_hash_pool_get(switch_hash_t * ht) /* DSO functions */ -SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t * ctx) +SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t ** res_handle, const char *path, switch_memory_pool_t *ctx) { return apr_dso_load(res_handle, path, ctx); } @@ -149,7 +149,7 @@ SWITCH_DECLARE(char *) switch_copy_string(char *dst, const char *src, switch_siz /* thread read write lock functions */ -SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t ** rwlock, switch_memory_pool_t *pool) { return apr_thread_rwlock_create(rwlock, pool); } @@ -191,7 +191,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock /* thread mutex functions */ -SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t ** lock, unsigned int flags, switch_memory_pool_t *pool) { return apr_thread_mutex_create(lock, flags, pool); } @@ -268,7 +268,7 @@ SWITCH_DECLARE(switch_time_t) switch_time_make(switch_time_t sec, int32_t usec) /* Thread condition locks */ -SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t ** cond, switch_memory_pool_t *pool) { return apr_thread_cond_create(cond, pool); } @@ -300,7 +300,8 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t /* file i/o stubs */ -SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t ** newf, const char *fname, int32_t flag, switch_fileperms_t perm, + switch_memory_pool_t *pool) { return apr_file_open(newf, fname, flag, perm, pool); } @@ -319,7 +320,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t * thefile) return apr_file_close(thefile); } -SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool) { return apr_file_remove(path, pool); } @@ -350,7 +351,7 @@ SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename) /* thread stubs */ -SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t ** new_attr, switch_memory_pool_t *pool) { return apr_threadattr_create(new_attr, pool); } @@ -366,14 +367,14 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadatt } SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thread, switch_threadattr_t * attr, - switch_thread_start_t func, void *data, switch_memory_pool_t * cont) + switch_thread_start_t func, void *data, switch_memory_pool_t *cont) { return apr_thread_create(new_thread, attr, func, data, cont); } /* socket stubs */ -SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t ** new_sock, int family, int type, int protocol, switch_memory_pool_t *pool) { return apr_socket_create(new_sock, family, type, protocol, pool); } @@ -398,7 +399,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t * sock, int return apr_socket_listen(sock, backlog); } -SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t ** new_sock, switch_socket_t * sock, switch_memory_pool_t *pool) { return apr_socket_accept(new_sock, sock, pool); } @@ -425,7 +426,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_recv(switch_socket_t * sock, char } SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t ** sa, const char *hostname, int32_t family, - switch_port_t port, int32_t flags, switch_memory_pool_t * pool) + switch_port_t port, int32_t flags, switch_memory_pool_t *pool) { return apr_sockaddr_info_get(sa, hostname, family, port, flags, pool); } @@ -487,7 +488,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t * from, /* poll stubs */ -SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t * p, uint32_t flags) +SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t ** pollset, uint32_t size, switch_memory_pool_t *p, uint32_t flags) { return apr_pollset_create(pollset, size, p, flags); } @@ -502,7 +503,7 @@ SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t * aprset, int32_t nu return apr_poll(aprset, numsock, nsds, timeout); } -SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t ** poll, switch_socket_t * sock, int16_t flags, switch_memory_pool_t *pool) { switch_pollset_t *pollset; @@ -558,7 +559,7 @@ SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t * uuid, const ch /* FIFO queues (apr-util) */ -SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t ** queue, unsigned int queue_capacity, switch_memory_pool_t *pool) { return apr_queue_create(queue, queue_capacity, pool); } diff --git a/src/switch_buffer.c b/src/switch_buffer.c index df352871fe..78345bdd5a 100644 --- a/src/switch_buffer.c +++ b/src/switch_buffer.c @@ -50,7 +50,7 @@ struct switch_buffer { uint32_t id; }; -SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool, switch_buffer_t **buffer, switch_size_t max_len) +SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len) { switch_buffer_t *new_buffer; @@ -64,7 +64,8 @@ SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t * pool return SWITCH_STATUS_MEMERR; } -SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, switch_size_t max_len) +SWITCH_DECLARE(switch_status_t) switch_buffer_create_dynamic(switch_buffer_t **buffer, switch_size_t blocksize, switch_size_t start_len, + switch_size_t max_len) { switch_buffer_t *new_buffer; diff --git a/src/switch_caller.c b/src/switch_caller.c index 49c461113a..2663f5e68f 100644 --- a/src/switch_caller.c +++ b/src/switch_caller.c @@ -32,7 +32,7 @@ #include #include -SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t * pool, +SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t *pool, const char *username, const char *dialplan, const char *caller_id_name, @@ -40,7 +40,8 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor const char *network_addr, const char *ani, const char *aniii, - const char *rdnis, const char *source, const char *context, const char *destination_number) + const char *rdnis, const char *source, const char *context, + const char *destination_number) { diff --git a/src/switch_channel.c b/src/switch_channel.c index 321aa1436f..a0bcf9d504 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -165,7 +165,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch return times; } -SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool) { assert(pool != NULL); @@ -259,7 +259,8 @@ SWITCH_DECLARE(void) switch_channel_uninit(switch_channel_t *channel) switch_buffer_destroy(&channel->dtmf_buffer); } -SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, uint32_t flags) +SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel, switch_core_session_t *session, switch_channel_state_t state, + uint32_t flags) { assert(channel != NULL); channel->state = state; @@ -317,7 +318,7 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch return v; } -SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool) { assert(channel != NULL); return switch_hash_first(pool, channel->variables); diff --git a/src/switch_core.c b/src/switch_core.c index a9993361a6..5ee66c3c50 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -232,7 +232,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session, */ -SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void *obj, switch_memory_pool_t * pool) +SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void *obj, switch_memory_pool_t *pool) { switch_thread_t *thread; switch_threadattr_t *thd_attr = NULL; @@ -581,7 +581,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, cons } switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, - "\nFreeSWITCH Version %s Started.\nCrash Protection [%s]\nMax Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP, switch_core_session_limit(0)); + "\nFreeSWITCH Version %s Started.\nCrash Protection [%s]\nMax Sessions[%u]\n\n", SWITCH_VERSION_FULL, __CP, + switch_core_session_limit(0)); return SWITCH_STATUS_SUCCESS; } diff --git a/src/switch_core_asr.c b/src/switch_core_asr.c index 9a3f33e47a..9c970dbd1f 100644 --- a/src/switch_core_asr.c +++ b/src/switch_core_asr.c @@ -36,7 +36,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah, char *module_name, - char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t * pool) + char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool) { switch_status_t status; diff --git a/src/switch_core_codec.c b/src/switch_core_codec.c index 57b69e7456..beb59df083 100644 --- a/src/switch_core_codec.c +++ b/src/switch_core_codec.c @@ -79,7 +79,7 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_write_codec(switch_core SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, char *codec_name, char *fmtp, uint32_t rate, int ms, int channels, uint32_t flags, - const switch_codec_settings_t *codec_settings, switch_memory_pool_t * pool) + const switch_codec_settings_t *codec_settings, switch_memory_pool_t *pool) { const switch_codec_interface_t *codec_interface; const switch_codec_implementation_t *iptr, *implementation = NULL; @@ -151,7 +151,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, ch return SWITCH_STATUS_SUCCESS; } else { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not at the desired implementation. %dhz %dms\n", codec_name, rate, ms); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not at the desired implementation. %dhz %dms\n", codec_name, rate, + ms); } return SWITCH_STATUS_NOTIMPL; @@ -180,7 +181,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_encode(switch_codec_t *codec, } - return codec->implementation->encode(codec, other_codec, decoded_data, decoded_data_len, decoded_rate, encoded_data, encoded_data_len, encoded_rate, flag); + return codec->implementation->encode(codec, other_codec, decoded_data, decoded_data_len, decoded_rate, encoded_data, encoded_data_len, encoded_rate, + flag); } @@ -209,7 +211,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec, } - return codec->implementation->decode(codec, other_codec, encoded_data, encoded_data_len, encoded_rate, decoded_data, decoded_data_len, decoded_rate, flag); + return codec->implementation->decode(codec, other_codec, encoded_data, encoded_data_len, encoded_rate, decoded_data, decoded_data_len, decoded_rate, + flag); } diff --git a/src/switch_core_db.c b/src/switch_core_db.c index 7cc3b45e26..587928aee4 100644 --- a/src/switch_core_db.c +++ b/src/switch_core_db.c @@ -47,12 +47,12 @@ static void db_pick_path(char *dbname, char *buf, switch_size_t size) } -SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t ** ppDb) +SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb) { return sqlite3_open(filename, ppDb); } -SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t * db) +SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db) { return sqlite3_close(db); } @@ -72,12 +72,12 @@ SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt) return sqlite3_column_count(pStmt); } -SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t * db) +SWITCH_DECLARE(const char *) switch_core_db_errmsg(switch_core_db_t *db) { return sqlite3_errmsg(db); } -SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t * db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg) +SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg) { return sqlite3_exec(db, sql, callback, data, errmsg); } @@ -87,7 +87,7 @@ SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt) return sqlite3_finalize(pStmt); } -SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t * db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail) +SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail) { return sqlite3_prepare(db, zSql, nBytes, ppStmt, pzTail); } @@ -122,12 +122,12 @@ SWITCH_DECLARE(int) switch_core_db_bind_double(switch_core_db_stmt_t *pStmt, int return sqlite3_bind_double(pStmt, i, dValue); } -SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t * db) +SWITCH_DECLARE(int64_t) switch_core_db_last_insert_rowid(switch_core_db_t *db) { return sqlite3_last_insert_rowid(db); } -SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t * db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg) +SWITCH_DECLARE(int) switch_core_db_get_table(switch_core_db_t *db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg) { return sqlite3_get_table(db, sql, resultp, nrow, ncolumn, errmsg); } @@ -167,7 +167,7 @@ SWITCH_DECLARE(switch_core_db_t *) switch_core_db_open_file(char *filename) } -SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t * db, char *test_sql, char *reactive_sql) +SWITCH_DECLARE(void) switch_core_db_test_reactive(switch_core_db_t *db, char *test_sql, char *reactive_sql) { char *errmsg; diff --git a/src/switch_core_directory.c b/src/switch_core_directory.c index 25c69f6f44..e61dce12c9 100644 --- a/src/switch_core_directory.c +++ b/src/switch_core_directory.c @@ -35,7 +35,7 @@ #include "private/switch_core.h" SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh, - char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t * pool) + char *module_name, char *source, char *dsn, char *passwd, switch_memory_pool_t *pool) { switch_status_t status; @@ -78,7 +78,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_han SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh, char *module_name, - char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t * pool) + char *voice_name, unsigned int rate, switch_speech_flag_t *flags, switch_memory_pool_t *pool) { switch_status_t status; diff --git a/src/switch_core_file.c b/src/switch_core_file.c index 807fb7482c..6141bc20ad 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -35,7 +35,7 @@ #include "private/switch_core.h" SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh, - char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t * pool) + char *file_path, uint8_t channels, uint32_t rate, unsigned int flags, switch_memory_pool_t *pool) { char *ext; switch_status_t status; diff --git a/src/switch_core_hash.c b/src/switch_core_hash.c index be67e7db27..e2ceaa34e0 100644 --- a/src/switch_core_hash.c +++ b/src/switch_core_hash.c @@ -34,7 +34,7 @@ #include #include "private/switch_core.h" -SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t ** hash, switch_memory_pool_t *pool) { assert(pool != NULL); diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 97e1623904..e71a21fc2b 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -55,7 +55,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi } if (session->endpoint_interface->io_routines->read_frame) { - if ((status = session->endpoint_interface->io_routines->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) { + if ((status = + session->endpoint_interface->io_routines->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) { for (ptr = session->event_hooks.read_frame; ptr; ptr = ptr->next) { if ((status = ptr->read_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) != SWITCH_STATUS_SUCCESS) { break; @@ -246,7 +247,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi status = SWITCH_STATUS_SUCCESS; break; default: - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n", session->read_codec->codec_interface->interface_name); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n", + session->read_codec->codec_interface->interface_name); *frame = NULL; status = SWITCH_STATUS_GENERR; break; @@ -500,7 +502,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess status = SWITCH_STATUS_SUCCESS; break; default: - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n", session->read_codec->codec_interface->interface_name); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec %s encoder error!\n", + session->read_codec->codec_interface->interface_name); write_frame = NULL; return status; } @@ -580,7 +583,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess if (session->read_resampler) { short *data = write_frame->data; - session->read_resampler->from_len = switch_short_to_float(data, session->read_resampler->from, (int) write_frame->datalen / 2); + session->read_resampler->from_len = + switch_short_to_float(data, session->read_resampler->from, (int) write_frame->datalen / 2); session->read_resampler->to_len = (uint32_t) switch_resample_process(session->read_resampler, session->read_resampler->from, session->read_resampler->from_len, @@ -628,7 +632,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_ switch_io_event_hook_kill_channel_t *ptr; switch_status_t status = SWITCH_STATUS_FALSE; - switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_INFO, "Kill %s [%s]\n", switch_channel_get_name(session->channel), SIG_NAMES[sig]); + switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_INFO, "Kill %s [%s]\n", switch_channel_get_name(session->channel), + SIG_NAMES[sig]); if (session->endpoint_interface->io_routines->kill_channel) { if ((status = session->endpoint_interface->io_routines->kill_channel(session, sig)) == SWITCH_STATUS_SUCCESS) { diff --git a/src/switch_core_memory.c b/src/switch_core_memory.c index 37fe9ca797..a773a15044 100644 --- a/src/switch_core_memory.c +++ b/src/switch_core_memory.c @@ -118,7 +118,7 @@ SWITCH_DECLARE(char *) switch_core_session_sprintf(switch_core_session_t *sessio return result; } -SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t * pool, const char *fmt, ...) +SWITCH_DECLARE(char *) switch_core_sprintf(switch_memory_pool_t *pool, const char *fmt, ...) { va_list ap; char *result = NULL; @@ -157,7 +157,7 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session_t *session } -SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const char *todup) +SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t *pool, const char *todup) { char *duped = NULL; switch_size_t len; @@ -179,7 +179,7 @@ SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t * pool, const cha return duped; } -SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t ** pool) +SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool) { if ((apr_pool_create(pool, NULL)) != SWITCH_STATUS_SUCCESS) { @@ -189,14 +189,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t ** pool) +SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool) { apr_pool_destroy(*pool); return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t * pool, switch_size_t memory) +SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size_t memory) { void *ptr = NULL; assert(pool != NULL); diff --git a/src/switch_core_rwlock.c b/src/switch_core_rwlock.c index 7970f5b338..62128b1e19 100644 --- a/src/switch_core_rwlock.c +++ b/src/switch_core_rwlock.c @@ -51,7 +51,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_sessio } else { status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock); #ifdef SWITCH_DEBUG_RWLOCKS - switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read lock AQUIRED\n", switch_channel_get_name(session->channel)); + switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read lock AQUIRED\n", + switch_channel_get_name(session->channel)); #endif } } @@ -74,7 +75,8 @@ SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *sessi #ifdef SWITCH_DEBUG_RWLOCKS SWITCH_DECLARE(void) switch_core_session_perform_rwunlock(switch_core_session_t *session, const char *file, const char *func, int line) { - switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read/Write lock CLEARED\n", switch_channel_get_name(session->channel)); + switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, SWITCH_LOG_ERROR, "%s Read/Write lock CLEARED\n", + switch_channel_get_name(session->channel)); #else SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session) { diff --git a/src/switch_core_session.c b/src/switch_core_session.c index c2dd9c09bd..88a8aeb765 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -177,7 +177,7 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t * SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session, char *endpoint_name, switch_caller_profile_t *caller_profile, - switch_core_session_t **new_session, switch_memory_pool_t ** pool) + switch_core_session_t **new_session, switch_memory_pool_t **pool) { switch_io_event_hook_outgoing_channel_t *ptr; switch_status_t status = SWITCH_STATUS_FALSE; @@ -773,7 +773,7 @@ SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session_t *se SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t - *endpoint_interface, switch_memory_pool_t ** pool) + *endpoint_interface, switch_memory_pool_t **pool) { switch_memory_pool_t *usepool; switch_core_session_t *session; @@ -858,7 +858,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void) return runtime.session_count; } -SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t ** pool) +SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t **pool) { const switch_endpoint_interface_t *endpoint_interface; @@ -900,7 +900,7 @@ SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new_limit) } -SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t * pool) +SWITCH_DECLARE(void) switch_core_session_init(switch_memory_pool_t *pool) { memset(&runtime, 0, sizeof(runtime)); runtime.session_limit = 1000; diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 8cab77e214..e3b154e839 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -41,7 +41,7 @@ static struct { switch_memory_pool_t *memory_pool; } runtime; -static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t * db, char *sql, uint32_t retries) +static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t *db, char *sql, uint32_t retries) { char *errmsg; switch_status_t status = SWITCH_STATUS_FALSE; @@ -113,7 +113,7 @@ static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t return status; } -SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t * db, char *sql, uint32_t retries) +SWITCH_DECLARE(switch_status_t) switch_core_db_persistant_execute(switch_core_db_t *db, char *sql, uint32_t retries) { char *errmsg; switch_status_t status = SWITCH_STATUS_FALSE; @@ -340,7 +340,7 @@ static void core_event_handler(switch_event_t *event) } -SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t * pool) +SWITCH_DECLARE(void) switch_core_sqldb_start(switch_memory_pool_t *pool) { switch_thread_t *thread; switch_threadattr_t *thd_attr;; diff --git a/src/switch_core_state_machine.c b/src/switch_core_state_machine.c index fb59865df4..3d9452fb36 100644 --- a/src/switch_core_state_machine.c +++ b/src/switch_core_state_machine.c @@ -145,7 +145,8 @@ static void switch_core_standard_on_execute(switch_core_session_t *session) if ((expanded = switch_channel_expand_variables(session->channel, extension->current_application->application_data)) != extension->current_application->application_data) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Expanded String %s(%s)\n", extension->current_application->application_name, expanded); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Expanded String %s(%s)\n", extension->current_application->application_name, + expanded); } if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) { @@ -343,7 +344,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) { if (!application_state_handler || !application_state_handler->on_init || (application_state_handler->on_init && - application_state_handler->on_init(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) { + application_state_handler->on_init(session) == SWITCH_STATUS_SUCCESS + && midstate == switch_channel_get_state(session->channel))) { proceed++; continue; } else { @@ -377,7 +379,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) { if (!application_state_handler || !application_state_handler->on_ring || (application_state_handler->on_ring && - application_state_handler->on_ring(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) { + application_state_handler->on_ring(session) == SWITCH_STATUS_SUCCESS + && midstate == switch_channel_get_state(session->channel))) { proceed++; continue; } else { @@ -429,7 +432,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State LOOPBACK\n", switch_channel_get_name(session->channel)); if (!driver_state_handler->on_loopback || (driver_state_handler->on_loopback - && driver_state_handler->on_loopback(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) { + && driver_state_handler->on_loopback(session) == SWITCH_STATUS_SUCCESS + && midstate == switch_channel_get_state(session->channel))) { while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) { if (!application_state_handler || !application_state_handler->on_loopback || (application_state_handler->on_loopback @@ -464,7 +468,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State TRANSMIT\n", switch_channel_get_name(session->channel)); if (!driver_state_handler->on_transmit || (driver_state_handler->on_transmit - && driver_state_handler->on_transmit(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) { + && driver_state_handler->on_transmit(session) == SWITCH_STATUS_SUCCESS + && midstate == switch_channel_get_state(session->channel))) { while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) { if (!application_state_handler || !application_state_handler->on_transmit @@ -518,7 +523,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) while (proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) { if (!application_state_handler || !application_state_handler->on_hold || (application_state_handler->on_hold && - application_state_handler->on_hold(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) { + application_state_handler->on_hold(session) == SWITCH_STATUS_SUCCESS + && midstate == switch_channel_get_state(session->channel))) { proceed++; continue; } else { @@ -535,7 +541,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State HIBERNATE\n", switch_channel_get_name(session->channel)); if (!driver_state_handler->on_hibernate || (driver_state_handler->on_hibernate - && driver_state_handler->on_hibernate(session) == SWITCH_STATUS_SUCCESS && midstate == switch_channel_get_state(session->channel))) { + && driver_state_handler->on_hibernate(session) == SWITCH_STATUS_SUCCESS + && midstate == switch_channel_get_state(session->channel))) { while ((application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) { if (!application_state_handler || !application_state_handler->on_hibernate diff --git a/src/switch_core_timer.c b/src/switch_core_timer.c index 621d55d718..b1fa29eed7 100644 --- a/src/switch_core_timer.c +++ b/src/switch_core_timer.c @@ -34,7 +34,7 @@ #include #include "private/switch_core.h" -SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool) { switch_timer_interface_t *timer_interface; switch_status_t status; diff --git a/src/switch_event.c b/src/switch_event.c index a509941341..eef532181f 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -390,7 +390,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void) return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool) { switch_thread_t *thread; switch_threadattr_t *thd_attr;; @@ -865,7 +865,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data) +SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, + void *user_data) { switch_event_node_t *event_node; switch_event_subclass_t *subclass = NULL; diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 0421b8eeb8..9d30ecc5bc 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -577,7 +577,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_ msg.from = __FILE__; switch_core_session_receive_message(session, &msg); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Transfer %s to %s[%s@%s]\n", switch_channel_get_name(channel), dialplan, extension, context); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Transfer %s to %s[%s@%s]\n", switch_channel_get_name(channel), dialplan, extension, + context); return SWITCH_STATUS_SUCCESS; } @@ -634,7 +635,7 @@ struct switch_ivr_digit_stream { switch_time_t last_digit_time; }; -SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t * pool, switch_ivr_digit_stream_parser_t ** parser) +SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t *pool, switch_ivr_digit_stream_parser_t ** parser) { switch_status_t status = SWITCH_STATUS_FALSE; diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 24d4b738ff..0acf0f40f0 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -512,7 +512,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t * if (switch_core_asr_open(ah, mod_name, "L16", - read_codec->implementation->samples_per_second, dest, &flags, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { + read_codec->implementation->samples_per_second, dest, &flags, + switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { if (switch_core_asr_load_grammar(ah, grammar, path) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Error loading Grammar\n"); diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 3ca41532a5..227ae28a14 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -419,7 +419,8 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session) switch_channel_set_variable(channel, SWITCH_BRIDGE_VARIABLE, NULL); switch_channel_set_variable(other_channel, SWITCH_BRIDGE_VARIABLE, NULL); - if (switch_channel_get_state(other_channel) < CS_HANGUP && switch_true(switch_channel_get_variable(other_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) { + if (switch_channel_get_state(other_channel) < CS_HANGUP + && switch_true(switch_channel_get_variable(other_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) { switch_channel_hangup(other_channel, switch_channel_get_cause(channel)); } else { switch_channel_set_state(other_channel, CS_EXECUTE); @@ -508,7 +509,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t * SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session, switch_core_session_t *peer_session, - switch_input_callback_function_t input_callback, void *session_data, void *peer_session_data) + switch_input_callback_function_t input_callback, void *session_data, + void *peer_session_data) { switch_core_thread_session_t *this_audio_thread, *other_audio_thread; switch_channel_t *caller_channel, *peer_channel; @@ -635,7 +637,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses done: - if (switch_channel_get_state(caller_channel) < CS_HANGUP && switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) { + if (switch_channel_get_state(caller_channel) < CS_HANGUP + && switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) { switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel)); } diff --git a/src/switch_ivr_menu.c b/src/switch_ivr_menu.c index 1ea540c28a..7fd215525d 100644 --- a/src/switch_ivr_menu.c +++ b/src/switch_ivr_menu.c @@ -93,7 +93,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me const char *invalid_sound, const char *exit_sound, const char *tts_engine, - const char *tts_voice, const char *phrase_lang, int timeout, int max_failures, switch_memory_pool_t * pool) + const char *tts_voice, const char *phrase_lang, int timeout, int max_failures, + switch_memory_pool_t *pool) { switch_ivr_menu_t *menu; uint8_t newpool = 0; @@ -488,7 +489,8 @@ static switch_ivr_menu_xml_map_t *switch_ivr_menu_stack_xml_find(switch_ivr_menu return (rc == 0 ? map : NULL); } -static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * xml_ctx, char *name, int action, switch_ivr_menu_action_function_t * function) +static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * xml_ctx, char *name, int action, + switch_ivr_menu_action_function_t * function) { switch_status_t status = SWITCH_STATUS_FALSE; @@ -519,7 +521,7 @@ static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t * return status; } -SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t ** xml_menu_ctx, switch_memory_pool_t *pool) { switch_status_t status = SWITCH_STATUS_FALSE; int autocreated = 0; diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 7b91404926..6cc0899949 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -156,7 +156,7 @@ static void launch_collect_thread(struct key_collect *collect) static uint8_t check_channel_status(switch_channel_t **peer_channels, switch_core_session_t **peer_sessions, - uint32_t len, int32_t *idx, uint32_t * hups, char *file, char *key, uint8_t early_ok, uint8_t *ring_ready) + uint32_t len, int32_t *idx, uint32_t * hups, char *file, char *key, uint8_t early_ok, uint8_t * ring_ready) { uint32_t i; @@ -340,7 +340,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess for (x = 0; x < var_count; x++) { char *inner_var_array[2]; int inner_var_count; - if ((inner_var_count = switch_separate_string(var_array[x], '=', inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) { + if ((inner_var_count = + switch_separate_string(var_array[x], '=', inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) { switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, inner_var_array[0], "%s", inner_var_array[1]); if (caller_channel) { @@ -515,12 +516,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess caller_profiles[i] = switch_caller_profile_new(pool, NULL, NULL, - cid_name_override, cid_num_override, NULL, NULL, NULL, NULL, __FILE__, NULL, chan_data); + cid_name_override, cid_num_override, NULL, NULL, NULL, NULL, __FILE__, NULL, + chan_data); } } - if ((reason = switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], &pool)) != SWITCH_CAUSE_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n", switch_channel_cause2str(reason)); + if ((reason = + switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], &pool)) != SWITCH_CAUSE_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n", + switch_channel_cause2str(reason)); if (pool) { switch_core_destroy_memory_pool(&pool); } diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 91b94c07d4..ba7eb3cc3a 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -90,7 +90,8 @@ static switch_say_method_t get_say_type_by_name(char *name) } -SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, switch_input_args_t *args) +SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *session, char *macro_name, char *data, char *lang, + switch_input_args_t *args) { switch_xml_t cfg, xml = NULL, language, macros, macro, input, action; char *lname = NULL, *mname = NULL, hint_data[1024] = "", enc_hint[1024] = ""; @@ -365,7 +366,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se read_codec->implementation->samples_per_second, read_codec->implementation->microseconds_per_frame / 1000, read_codec->implementation->number_of_channels, - SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { + SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, + switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n"); switch_core_session_set_read_codec(session, &codec); } else { @@ -879,7 +881,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t uint32_t timeout, char *valid_terminators, char *prompt_audio_file, - char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, char *digits_regex) + char *bad_input_audio_file, void *digit_buffer, uint32_t digit_buffer_length, + char *digits_regex) { char terminator; //used to hold terminator recieved from diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index aeb89e100e..dcfb0dbaca 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -820,7 +820,7 @@ SWITCH_DECLARE(switch_management_interface_t *) switch_loadable_module_get_manag return switch_core_hash_find(loadable_modules.management_hash, relative_oid); } -SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t * pool, const switch_codec_implementation_t **array, int arraylen) +SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, const switch_codec_implementation_t **array, int arraylen) { switch_hash_index_t *hi; void *val; diff --git a/src/switch_log.c b/src/switch_log.c index 99147ca1ab..c63604bd54 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -249,7 +249,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char } -SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t * pool) +SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool) { switch_thread_t *thread; switch_threadattr_t *thd_attr;; diff --git a/src/switch_regex.c b/src/switch_regex.c index a72890036d..bce68b7d82 100644 --- a/src/switch_regex.c +++ b/src/switch_regex.c @@ -45,7 +45,7 @@ SWITCH_DECLARE(void) switch_regex_free(void *data) { pcre_free(data); - } SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t ** new_re, int *ovector, uint32_t olen) + } SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen) { const char *error = NULL; int erroffset = 0; @@ -87,7 +87,7 @@ SWITCH_DECLARE(void) switch_regex_free(void *data) } -SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t * re, int match_count, char *data, char *field_data, +SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector) { char index[10] = ""; diff --git a/src/switch_resample.c b/src/switch_resample.c index b04c86ae6c..f56ff3cb34 100644 --- a/src/switch_resample.c +++ b/src/switch_resample.c @@ -53,7 +53,7 @@ SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler, - int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t * pool) + int from_rate, switch_size_t from_size, int to_rate, uint32_t to_size, switch_memory_pool_t *pool) { #ifdef DISABLE_RESAMPLE *new_resampler = NULL; @@ -73,7 +73,8 @@ SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t resampler->factor = (lto_rate / lfrom_rate); resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate, resampler->factor); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate, + resampler->factor); resampler->from_size = from_size; resampler->from = (float *) switch_core_alloc(pool, resampler->from_size); resampler->to_size = to_size; diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 26158ea951..157afcf696 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -252,7 +252,7 @@ static void handle_ice(switch_rtp_t *rtp_session, void *data, switch_size_t len) } -SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t * pool) +SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool) { if (global_init) { return; @@ -357,7 +357,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session switch_payload_t payload, uint32_t samples_per_interval, uint32_t ms_per_packet, - switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool) + switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, + switch_memory_pool_t *pool) { switch_rtp_t *rtp_session = NULL; srtp_policy_t policy; @@ -478,8 +479,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session } if (!switch_strlen_zero(timer_name)) { - if (switch_core_timer_init(&rtp_session->timer, timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool) == SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Starting timer [%s] %d bytes per %dms\n", timer_name, samples_per_interval, ms_per_packet); + if (switch_core_timer_init(&rtp_session->timer, timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool) == + SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Starting timer [%s] %d bytes per %dms\n", timer_name, samples_per_interval, + ms_per_packet); } else { memset(&rtp_session->timer, 0, sizeof(rtp_session->timer)); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error starting timer [%s], async RTP disabled\n", timer_name); @@ -499,7 +502,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(char *rx_host, switch_payload_t payload, uint32_t samples_per_interval, uint32_t ms_per_packet, - switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t * pool) + switch_rtp_flag_t flags, char *crypto_key, char *timer_name, const char **err, switch_memory_pool_t *pool) { switch_rtp_t *rtp_session; @@ -689,10 +692,10 @@ static void do_2833(switch_rtp_t *rtp_session) 4, 0, rtp_session->te, - rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_seq, rtp_session->dtmf_data.out_digit_ssrc, &flags); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, - "Send %s packet for [%c] ts=%d sofar=%u dur=%d seq=%d\n", loops == 1 ? "middle" : "end", - rtp_session->dtmf_data.out_digit, rtp_session->dtmf_data.timestamp_dtmf, + rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_seq, rtp_session->dtmf_data.out_digit_ssrc, + &flags); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Send %s packet for [%c] ts=%d sofar=%u dur=%d seq=%d\n", + loops == 1 ? "middle" : "end", rtp_session->dtmf_data.out_digit, rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_sofar, duration, rtp_session->dtmf_data.out_digit_seq); } @@ -860,7 +863,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ if (!switch_strlen_zero(tx_host) && switch_sockaddr_get_port(rtp_session->from_addr) > 0) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, - "Auto Changing port from %s:%u to %s:%u\n", old_host, old, tx_host, switch_sockaddr_get_port(rtp_session->from_addr)); + "Auto Changing port from %s:%u to %s:%u\n", old_host, old, tx_host, + switch_sockaddr_get_port(rtp_session->from_addr)); switch_rtp_set_remote_address(rtp_session, tx_host, switch_sockaddr_get_port(rtp_session->from_addr), &err); } } @@ -1332,7 +1336,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_disable_vad(switch_rtp_t *rtp_session return SWITCH_STATUS_SUCCESS; } -SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags) +SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, + switch_vad_flag_t flags) { if (!switch_rtp_ready(rtp_session)) { diff --git a/src/switch_stun.c b/src/switch_stun.c index 01f1d5ed49..1aba2ec63b 100644 --- a/src/switch_stun.c +++ b/src/switch_stun.c @@ -113,7 +113,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se -SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t *buf, uint32_t len) +SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_parse(uint8_t * buf, uint32_t len) { switch_stun_packet_t *packet; switch_stun_packet_attribute_t *attr; @@ -183,7 +183,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_get_mapped_address(switch_s char *p = ipstr; ip = (switch_stun_ip_t *) attribute->value; - i = (uint8_t *) &ip->address; + i = (uint8_t *) & ip->address; *ipstr = 0; for (x = 0; x < 4; x++) { sprintf(p, "%u%s", i[x], x == 3 ? "" : "."); @@ -201,7 +201,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac return memcpy(username, attribute->value, cpylen); } -SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t *buf) +SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_stun_message_t type, char *id, uint8_t * buf) { switch_stun_packet_header_t *header; @@ -226,14 +226,14 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_s uint8_t *i, x; char *p = ipstr; - attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) &packet->first_attribute + ntohs(packet->header.length)); + attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) & packet->first_attribute + ntohs(packet->header.length)); attribute->type = htons(SWITCH_STUN_ATTR_MAPPED_ADDRESS); attribute->length = htons(8); ip = (switch_stun_ip_t *) attribute->value; ip->port = htons(port); ip->family = 1; - i = (uint8_t *) &ip->address; + i = (uint8_t *) & ip->address; for (x = 0; x < 4; x++) { i[x] = (uint8_t) atoi(p); @@ -255,7 +255,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_pa if (ulen % 4 != 0) { return 0; } - attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) &packet->first_attribute + ntohs(packet->header.length)); + attribute = (switch_stun_packet_attribute_t *) ((uint8_t *) & packet->first_attribute + ntohs(packet->header.length)); attribute->type = htons(SWITCH_STUN_ATTR_USERNAME); attribute->length = htons(ulen); if (username) { @@ -269,7 +269,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_pa } SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip, - switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t * pool) + switch_port_t *port, char *stunip, switch_port_t stunport, char **err, switch_memory_pool_t *pool) { switch_sockaddr_t *local_addr = NULL, *remote_addr = NULL, *from_addr = NULL; switch_socket_t *sock = NULL; diff --git a/src/switch_swig.c b/src/switch_swig.c index ee62ca54a9..9d82c836c1 100644 --- a/src/switch_swig.c +++ b/src/switch_swig.c @@ -198,7 +198,8 @@ int fs_switch_ivr_collect_digits_callback(switch_core_session_t *session, switch } int fs_switch_ivr_collect_digits_count(switch_core_session_t *session, - char *buf, unsigned int buflen, unsigned int maxdigits, const char *terminators, char *terminator, unsigned int timeout) + char *buf, unsigned int buflen, unsigned int maxdigits, const char *terminators, char *terminator, + unsigned int timeout) { switch_status_t status; diff --git a/src/switch_utils.c b/src/switch_utils.c index 1b6612690b..58daad98ac 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -284,7 +284,7 @@ SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key) return '\0'; } -SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t * pool, char *in, char *delim, char esc) +SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in, char *delim, char esc) { char *data, *p, *d; int count = 1, i = 0; diff --git a/src/switch_xml.c b/src/switch_xml.c index fe3a3f64c2..013f578e34 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -1081,7 +1081,8 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file) SWITCH_DECLARE(switch_status_t) switch_xml_locate(const char *section, const char *tag_name, - const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, const char *params) + const char *key_name, const char *key_value, switch_xml_t * root, switch_xml_t * node, + const char *params) { switch_xml_t conf = NULL; switch_xml_t tag = NULL; @@ -1209,7 +1210,7 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **e } -SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t * pool, const char **err) +SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t *pool, const char **err) { switch_xml_t xml; XML_MEMORY_POOL = pool;