diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/_private.h | 19 | ||||
-rw-r--r-- | include/asterisk/acl.h | 18 | ||||
-rw-r--r-- | include/asterisk/autoconfig.h.in | 3 | ||||
-rw-r--r-- | include/asterisk/ccss.h | 11 | ||||
-rw-r--r-- | include/asterisk/cdr.h | 6 | ||||
-rw-r--r-- | include/asterisk/channel.h | 54 | ||||
-rw-r--r-- | include/asterisk/config.h | 10 | ||||
-rw-r--r-- | include/asterisk/devicestate.h | 36 | ||||
-rw-r--r-- | include/asterisk/dsp.h | 12 | ||||
-rw-r--r-- | include/asterisk/enum.h | 3 | ||||
-rw-r--r-- | include/asterisk/features_config.h | 6 | ||||
-rw-r--r-- | include/asterisk/logger.h | 11 | ||||
-rw-r--r-- | include/asterisk/manager.h | 6 | ||||
-rw-r--r-- | include/asterisk/module.h | 15 | ||||
-rw-r--r-- | include/asterisk/options.h | 13 | ||||
-rw-r--r-- | include/asterisk/rtp_engine.h | 2 | ||||
-rw-r--r-- | include/asterisk/sounds_index.h | 8 | ||||
-rw-r--r-- | include/asterisk/stringfields.h | 44 | ||||
-rw-r--r-- | include/asterisk/udptl.h | 7 |
19 files changed, 38 insertions, 246 deletions
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h index b9f552dd1..431f96108 100644 --- a/include/asterisk/_private.h +++ b/include/asterisk/_private.h @@ -33,26 +33,17 @@ int astdb_init(void); /*!< Provided by db.c */ int ast_channels_init(void); /*!< Provided by channel.c */ void ast_builtins_init(void); /*!< Provided by cli.c */ int ast_cli_perms_init(int reload); /*!< Provided by cli.c */ -int dnsmgr_init(void); /*!< Provided by dnsmgr.c */ void dnsmgr_start_refresh(void); /*!< Provided by dnsmgr.c */ -int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */ int ast_dns_system_resolver_init(void); /*!< Provided by dns_system_resolver.c */ void threadstorage_init(void); /*!< Provided by threadstorage.c */ int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */ int astobj2_init(void); /*!< Provided by astobj2.c */ int ast_named_locks_init(void); /*!< Provided by named_locks.c */ int ast_file_init(void); /*!< Provided by file.c */ -int ast_features_init(void); /*!< Provided by features.c */ void ast_autoservice_init(void); /*!< Provided by autoservice.c */ -int ast_http_init(void); /*!< Provided by http.c */ -int ast_http_reload(void); /*!< Provided by http.c */ int ast_tps_init(void); /*!< Provided by taskprocessor.c */ int ast_timing_init(void); /*!< Provided by timing.c */ -int ast_indications_init(void); /*!< Provided by indications.c */ -int ast_indications_reload(void);/*!< Provided by indications.c */ void ast_stun_init(void); /*!< Provided by stun.c */ -int ast_cel_engine_init(void); /*!< Provided by cel.c */ -int ast_cel_engine_reload(void); /*!< Provided by cel.c */ int ast_ssl_init(void); /*!< Provided by ssl.c */ int ast_pj_init(void); /*!< Provided by libasteriskpj.c */ int ast_test_init(void); /*!< Provided by test.c */ @@ -97,13 +88,6 @@ void ast_process_pending_reloads(void); */ int ast_xmldoc_load_documentation(void); -/*! - * \brief Reload genericplc configuration value from codecs.conf - * - * Implementation is in main/channel.c - */ -int ast_plc_reload(void); - /*! \brief initializes the rtp engine arrays */ int ast_rtp_engine_init(void); @@ -113,9 +97,6 @@ int ast_rtp_engine_init(void); */ int ast_parking_stasis_init(void); -/*! \brief initialize the sounds index */ -int ast_sounds_index_init(void); - /*! * \brief Endpoint support initialization. * \return 0 on success. diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h index bda1c7606..09adc527d 100644 --- a/include/asterisk/acl.h +++ b/include/asterisk/acl.h @@ -382,24 +382,6 @@ const char *ast_tos2str(unsigned int tos); struct ast_ha *ast_named_acl_find(const char *name, int *is_realtime, int *is_undefined); /*! - * \brief Initialize and configure the named ACL system. - * - * \details - * This function will prepare the named ACL system for use. - * For this reason, it needs to be called before other things that use ACLs are initialized. - */ -int ast_named_acl_init(void); - -/*! - * \brief reload/reconfigure the named ACL system. - * - * \details - * This function is designed to trigger an event upon a successful reload that may update - * ACL consumers. - */ -int ast_named_acl_reload(void); - -/*! * \brief a \ref stasis_message_type for changes against a named ACL or the set of all named ACLs * \since 12 * diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index 6d747ae5a..5e9ba6011 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -483,9 +483,6 @@ than `double'. */ #undef HAVE_LONG_DOUBLE_WIDER -/* Define to 1 if you have the libtool library. */ -#undef HAVE_LTDL - /* Define to 1 if you have the Lua library. */ #undef HAVE_LUA diff --git a/include/asterisk/ccss.h b/include/asterisk/ccss.h index fb17500b6..c006c7639 100644 --- a/include/asterisk/ccss.h +++ b/include/asterisk/ccss.h @@ -1618,15 +1618,4 @@ typedef void (*ast_cc_callback_fn)(struct ast_channel *chan, struct ast_cc_confi */ int ast_cc_callback(struct ast_channel *inbound, const char * const tech, const char * const dest, ast_cc_callback_fn callback); -/*! - * \since 1.8 - * \brief Initialize CCSS - * - * Performs startup routines necessary for CC operation. - * - * \retval 0 Success - * \retval nonzero Failure - */ -int ast_cc_init(void); - #endif /* _ASTERISK_CCSS_H */ diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h index e10da8223..c6b241315 100644 --- a/include/asterisk/cdr.h +++ b/include/asterisk/cdr.h @@ -581,12 +581,6 @@ const char *ast_cdr_disp2str(int disposition); */ void ast_cdr_setuserfield(const char *channel_name, const char *userfield); -/*! \brief Reload the configuration file cdr.conf and start/stop CDR scheduling thread */ -int ast_cdr_engine_reload(void); - -/*! \brief Load the configuration file cdr.conf and possibly start the CDR scheduling thread */ -int ast_cdr_engine_init(void); - /*! Submit any remaining CDRs and prepare for shutdown */ void ast_cdr_engine_term(void); diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 8cb03800e..16f9aa8ae 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1144,22 +1144,6 @@ enum ama_flags { * take a channel argument. */ -/*! - * \brief Create a channel data store object - * \deprecated You should use the ast_datastore_alloc() generic function instead. - * \version 1.6.1 deprecated - */ -struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid) - __attribute__((deprecated)); - -/*! - * \brief Free a channel data store object - * \deprecated You should use the ast_datastore_free() generic function instead. - * \version 1.6.1 deprecated - */ -int ast_channel_datastore_free(struct ast_datastore *datastore) - __attribute__((deprecated)); - /*! \brief Inherit datastores from a parent to a child. */ int ast_channel_datastore_inherit(struct ast_channel *from, struct ast_channel *to); @@ -1710,21 +1694,6 @@ void ast_channel_softhangup_withcause_locked(struct ast_channel *chan, int cause /*! * \brief Compare a offset with the settings of when to hang a channel up - * \param chan channel on which to check for hang up - * \param offset offset in seconds from current time - * \return 1, 0, or -1 - * \details - * This function compares a offset from current time with the absolute time - * out on a channel (when to hang up). If the absolute time out on a channel - * is earlier than current time plus the offset, it returns 1, if the two - * time values are equal, it return 0, otherwise, it return -1. - * \sa ast_channel_cmpwhentohangup_tv() - * \version 1.6.1 deprecated function (only had seconds precision) - */ -int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated)); - -/*! - * \brief Compare a offset with the settings of when to hang a channel up * \param chan channel on which to check for hangup * \param offset offset in seconds and microseconds from current time * \return 1, 0, or -1 @@ -1740,23 +1709,6 @@ int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offs * \brief Set when to hang a channel up * * \param chan channel on which to check for hang up - * \param offset offset in seconds relative to the current time of when to hang up - * - * \details - * This function sets the absolute time out on a channel (when to hang up). - * - * \pre chan is locked - * - * \return Nothing - * \sa ast_channel_setwhentohangup_tv() - * \version 1.6.1 deprecated function (only had seconds precision) - */ -void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated)); - -/*! - * \brief Set when to hang a channel up - * - * \param chan channel on which to check for hang up * \param offset offset in seconds and useconds relative to the current time of when to hang up * * This function sets the absolute time out on a channel (when to hang up). @@ -2736,12 +2688,6 @@ int ast_namedgroups_intersect(struct ast_namedgroups *a, struct ast_namedgroups /*! \brief Print named call groups and named pickup groups */ char *ast_print_namedgroups(struct ast_str **buf, struct ast_namedgroups *groups); -/*! - * \brief Convert enum channelreloadreason to text string for manager event - * \param reason The reason for reload (manager, cli, start etc) - */ -const char *channelreloadreason2txt(enum channelreloadreason reason); - /*! \brief return an ast_variable list of channeltypes */ struct ast_variable *ast_channeltype_list(void); diff --git a/include/asterisk/config.h b/include/asterisk/config.h index 891284039..9908b905b 100644 --- a/include/asterisk/config.h +++ b/include/asterisk/config.h @@ -784,15 +784,6 @@ int ast_realtime_append_mapping(const char *name, const char *driver, const char */ int register_config_cli(void); -/*! - * \brief Exposed re-initialization method for core process - * - * \details - * This method is intended for use only with the core re-initialization and is - * not designed to be called from any user applications. - */ -int read_config_maps(void); - /*! \brief Create a new base configuration structure */ struct ast_config *ast_config_new(void); @@ -994,7 +985,6 @@ int ast_config_text_file_save2(const char *filename, const struct ast_config *cf * \return 0 on success or -1 on failure. */ int ast_config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator); -int config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator) __attribute__((deprecated)); struct ast_config *ast_config_internal_load(const char *configfile, struct ast_config *cfg, struct ast_flags flags, const char *suggested_incl_file, const char *who_asked); /*! diff --git a/include/asterisk/devicestate.h b/include/asterisk/devicestate.h index 4f9aa739b..5b2f04de4 100644 --- a/include/asterisk/devicestate.h +++ b/include/asterisk/devicestate.h @@ -86,7 +86,6 @@ enum ast_device_state ast_state_chan2dev(enum ast_channel_state chanstate); * * \param devstate Current device state */ -const char *devstate2str(enum ast_device_state devstate) attribute_pure __attribute__((deprecated)); const char *ast_devstate2str(enum ast_device_state devstate) attribute_pure; /*! @@ -167,41 +166,6 @@ int ast_devstate_changed(enum ast_device_state state, enum ast_devstate_cache ca int ast_devstate_changed_literal(enum ast_device_state state, enum ast_devstate_cache cachable, const char *device); /*! - * \brief Tells Asterisk the State for Device is changed. - * (Accept change notification, add it to change queue.) - * - * \param fmt device name like a dial string with format parameters - * - * Asterisk polls the new extension states and calls the registered - * callbacks for the changed extensions - * - * \retval 0 on success - * \retval -1 on failure - * - * \note This is deprecated in favor of ast_devstate_changed() - * \version 1.6.1 deprecated - */ -int ast_device_state_changed(const char *fmt, ...) - __attribute__((deprecated,format(printf, 1, 2))); - -/*! - * \brief Tells Asterisk the State for Device is changed - * - * \param device device name like a dial string - * - * Asterisk polls the new extension states and calls the registered - * callbacks for the changed extensions - * - * \retval 0 on success - * \retval -1 on failure - * - * \note This is deprecated in favor of ast_devstate_changed_literal() - * \version 1.6.1 deprecated - */ -int ast_device_state_changed_literal(const char *device) - __attribute__((deprecated)); - -/*! * \brief Add device state provider * * \param label to use in hint, like label:object diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h index d092e6b4c..769d3b981 100644 --- a/include/asterisk/dsp.h +++ b/include/asterisk/dsp.h @@ -193,16 +193,4 @@ int ast_dsp_get_tcount(struct ast_dsp *dsp); */ int ast_dsp_get_threshold_from_settings(enum threshold which); -/*! - * \brief Reloads dsp settings from dsp.conf - * \since 1.6.1 - */ -int ast_dsp_reload(void); - -/*! - * \brief Load dsp settings from dsp.conf - * \since 1.6.1 - */ -int ast_dsp_init(void); - #endif /* _ASTERISK_DSP_H */ diff --git a/include/asterisk/enum.h b/include/asterisk/enum.h index 877c0c3cf..2ce85ccb3 100644 --- a/include/asterisk/enum.h +++ b/include/asterisk/enum.h @@ -97,7 +97,4 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *location, i */ int ast_get_txt(struct ast_channel *chan, const char *number, char *txt, int maxtxt, char *suffix); -int ast_enum_init(void); -int ast_enum_reload(void); - #endif /* _ASTERISK_ENUM_H */ diff --git a/include/asterisk/features_config.h b/include/asterisk/features_config.h index 1bce50bba..cd1bbbcea 100644 --- a/include/asterisk/features_config.h +++ b/include/asterisk/features_config.h @@ -265,10 +265,4 @@ struct ast_applicationmap_item { */ struct ao2_container *ast_get_chan_applicationmap(struct ast_channel *chan); -void ast_features_config_shutdown(void); - -int ast_features_config_reload(void); - -int ast_features_config_init(void); - #endif /* _FEATURES_CONFIG_H */ diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h index 8b1e5fe01..56dd85985 100644 --- a/include/asterisk/logger.h +++ b/include/asterisk/logger.h @@ -133,9 +133,6 @@ int ast_logger_remove_channel(const char *log_channel); */ void ast_log_backtrace(void); -/*! \brief Reload logger without rotating log files */ -int logger_reload(void); - /*! \brief Reload logger while rotating log files */ int ast_logger_rotate(void); @@ -310,14 +307,6 @@ void ast_console_toggle_loglevel(int fd, int level, int state); unsigned int ast_debug_get_by_module(const char *module); /*! - * \brief Get the verbose level for a module - * \param module the name of module - * \return the verbose level - * \version 11.0.0 deprecated - */ -unsigned int ast_verbose_get_by_module(const char *module) __attribute__((deprecated)); - -/*! * \brief Register a new logger level * \param name The name of the level to be registered * \retval -1 if an error occurs diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h index 35dc22763..97d4b9c29 100644 --- a/include/asterisk/manager.h +++ b/include/asterisk/manager.h @@ -356,12 +356,6 @@ void __attribute__((format(printf, 2, 3))) astman_append(struct mansession *s, c /*! \brief Determinie if a manager session ident is authenticated */ int astman_is_authed(uint32_t ident); -/*! \brief Called by Asterisk initialization */ -int init_manager(void); - -/*! \brief Called by Asterisk module functions and the CLI command */ -int reload_manager(void); - /*! * \brief Add a datastore to a session * diff --git a/include/asterisk/module.h b/include/asterisk/module.h index ebd41c06d..faa4f7f67 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -292,13 +292,14 @@ enum ast_module_load_priority { AST_MODPRI_REALTIME_DEPEND = 10, /*!< Dependency for a realtime driver */ AST_MODPRI_REALTIME_DEPEND2 = 20, /*!< Second level dependency for a realtime driver (func_curl needs res_curl, but is needed by res_config_curl) */ AST_MODPRI_REALTIME_DRIVER = 30, /*!< A realtime driver, which provides configuration services for other modules */ - AST_MODPRI_TIMING = 40, /*!< Dependency for a channel (MOH needs timing interfaces to be fully loaded) */ - AST_MODPRI_CHANNEL_DEPEND = 50, /*!< Channel driver dependency (may depend upon realtime, e.g. MOH) */ - AST_MODPRI_CHANNEL_DRIVER = 60, /*!< Channel drivers (provide devicestate) */ - AST_MODPRI_APP_DEPEND = 70, /*!< Dependency for an application */ - AST_MODPRI_DEVSTATE_PROVIDER = 80, /*!< Applications and other modules that _provide_ devicestate (e.g. meetme) */ - AST_MODPRI_DEVSTATE_PLUGIN = 90, /*!< Plugin for a module that provides devstate (e.g. res_calendar_*) */ - AST_MODPRI_CDR_DRIVER = 100, /*!< CDR or CEL backend */ + AST_MODPRI_CORE = 40, /*!< A core module originally meant to start between preload and load. */ + AST_MODPRI_TIMING = 50, /*!< Dependency for a channel (MOH needs timing interfaces to be fully loaded) */ + AST_MODPRI_CHANNEL_DEPEND = 60, /*!< Channel driver dependency (may depend upon realtime, e.g. MOH) */ + AST_MODPRI_CHANNEL_DRIVER = 70, /*!< Channel drivers (provide devicestate) */ + AST_MODPRI_APP_DEPEND = 80, /*!< Dependency for an application */ + AST_MODPRI_DEVSTATE_PROVIDER = 90, /*!< Applications and other modules that _provide_ devicestate (e.g. meetme) */ + AST_MODPRI_DEVSTATE_PLUGIN = 100, /*!< Plugin for a module that provides devstate (e.g. res_calendar_*) */ + AST_MODPRI_CDR_DRIVER = 110, /*!< CDR or CEL backend */ AST_MODPRI_DEFAULT = 128, /*!< Modules not otherwise defined (such as most apps) will load here */ AST_MODPRI_DEVSTATE_CONSUMER = 150, /*!< Certain modules, which consume devstate, need to load after all others (e.g. app_queue) */ }; diff --git a/include/asterisk/options.h b/include/asterisk/options.h index 78f596a88..6c4e55295 100644 --- a/include/asterisk/options.h +++ b/include/asterisk/options.h @@ -74,8 +74,6 @@ enum ast_option_flags { AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17), /*! Suppress some warnings */ AST_OPT_FLAG_DONT_WARN = (1 << 18), - /*! End CDRs before the 'h' extension */ - AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN = (1 << 19), /*! Reference Debugging */ AST_OPT_FLAG_REF_DEBUG = (1 << 20), /*! Always fork, even if verbose or debug settings are non-zero */ @@ -84,12 +82,8 @@ enum ast_option_flags { AST_OPT_FLAG_MUTE = (1 << 22), /*! There is a per-module debug setting */ AST_OPT_FLAG_DEBUG_MODULE = (1 << 23), - /*! There is a per-module verbose setting */ - AST_OPT_FLAG_VERBOSE_MODULE = (1 << 24), /*! Terminal colors should be adjusted for a light-colored background */ AST_OPT_FLAG_LIGHT_BACKGROUND = (1 << 25), - /*! Count Initiated seconds in CDR's */ - AST_OPT_FLAG_INITIATED_SECONDS = (1 << 26), /*! Force black background */ AST_OPT_FLAG_FORCE_BLACK_BACKGROUND = (1 << 27), /*! Hide remote console connect messages on console */ @@ -98,6 +92,8 @@ enum ast_option_flags { AST_OPT_FLAG_LOCK_CONFIG_DIR = (1 << 29), /*! Generic PLC */ AST_OPT_FLAG_GENERIC_PLC = (1 << 30), + /*! Generic PLC onm equal codecs */ + AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS = (1 << 31), }; /*! These are the options that set by default when Asterisk starts */ @@ -123,17 +119,16 @@ enum ast_option_flags { #define ast_opt_reconnect ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT) #define ast_opt_transmit_silence ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) #define ast_opt_dont_warn ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN) -#define ast_opt_end_cdr_before_h_exten ast_test_flag(&ast_options, AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN) #define ast_opt_always_fork ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK) #define ast_opt_mute ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE) #define ast_opt_dbg_module ast_test_flag(&ast_options, AST_OPT_FLAG_DEBUG_MODULE) -#define ast_opt_verb_module ast_test_flag(&ast_options, AST_OPT_FLAG_VERBOSE_MODULE) #define ast_opt_light_background ast_test_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND) #define ast_opt_force_black_background ast_test_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND) #define ast_opt_hide_connect ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_CONSOLE_CONNECT) #define ast_opt_lock_confdir ast_test_flag(&ast_options, AST_OPT_FLAG_LOCK_CONFIG_DIR) #define ast_opt_generic_plc ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC) #define ast_opt_ref_debug ast_test_flag(&ast_options, AST_OPT_FLAG_REF_DEBUG) +#define ast_opt_generic_plc_on_equal_codecs ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS) /*! Maximum log level defined by PJPROJECT. */ #define MAX_PJ_LOG_MAX_LEVEL 6 @@ -199,8 +194,6 @@ extern struct timeval ast_lastreloadtime; extern pid_t ast_mainpid; extern char record_cache_dir[AST_CACHE_DIR_LEN]; -extern char dahdi_chan_name[AST_CHANNEL_NAME]; -extern int dahdi_chan_name_len; extern int ast_language_is_prefix; diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 3812cb159..4e32d6b32 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -126,6 +126,8 @@ enum ast_rtp_property { AST_RTP_PROPERTY_RETRANS_RECV, /*! Enable packet retransmission for sent packets */ AST_RTP_PROPERTY_RETRANS_SEND, + /*! Enable REMB sending and receiving passthrough support */ + AST_RTP_PROPERTY_REMB, /*! * \brief Maximum number of RTP properties supported diff --git a/include/asterisk/sounds_index.h b/include/asterisk/sounds_index.h index d7eb05332..bbd3965f4 100644 --- a/include/asterisk/sounds_index.h +++ b/include/asterisk/sounds_index.h @@ -33,14 +33,6 @@ extern "C" { struct ast_media_index; /*! - * \brief Reload the sounds index - * - * \retval zero on success - * \retval non-zero on failure - */ -int ast_sounds_reindex(void); - -/*! * \brief Get the sounds index * * \retval sounds index (must be ao2_cleanup()'ed) diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h index e1ff2fc1d..ce978901b 100644 --- a/include/asterisk/stringfields.h +++ b/include/asterisk/stringfields.h @@ -228,11 +228,6 @@ struct ast_string_field_mgr { ast_string_field last_alloc; /*!< the last field allocated */ struct ast_string_field_pool *embedded_pool; /*!< pointer to the embedded pool, if any */ struct ast_string_field_vector string_fields; /*!< field vector for compare and copy */ - /* v-- MALLOC_DEBUG information */ - const char *owner_file; /*!< filename of owner */ - const char *owner_func; /*!< function name of owner */ - int owner_line; /*!< line number of owner */ - /* ^-- MALLOC_DEBUG information */ }; /*! @@ -266,7 +261,8 @@ int __ast_string_field_ptr_grow(struct ast_string_field_mgr *mgr, an additional pool will be allocated. */ ast_string_field __ast_string_field_alloc_space(struct ast_string_field_mgr *mgr, - struct ast_string_field_pool **pool_head, size_t needed); + struct ast_string_field_pool **pool_head, size_t needed, + const char *file, int lineno, const char *func); /*! \internal @@ -277,9 +273,9 @@ ast_string_field __ast_string_field_alloc_space(struct ast_string_field_mgr *mgr \param format printf-style format string \return nothing */ -void __ast_string_field_ptr_build(struct ast_string_field_mgr *mgr, - struct ast_string_field_pool **pool_head, - ast_string_field *ptr, const char *format, ...) __attribute__((format(printf, 4, 5))); +void __ast_string_field_ptr_build(const char *file, int lineno, const char *func, + struct ast_string_field_mgr *mgr, struct ast_string_field_pool **pool_head, + ast_string_field *ptr, const char *format, ...) __attribute__((format(printf, 7, 8))); /*! \internal @@ -292,8 +288,9 @@ void __ast_string_field_ptr_build(struct ast_string_field_mgr *mgr, \return nothing */ void __ast_string_field_ptr_build_va(struct ast_string_field_mgr *mgr, - struct ast_string_field_pool **pool_head, - ast_string_field *ptr, const char *format, va_list ap) __attribute__((format(printf, 4, 0))); + struct ast_string_field_pool **pool_head, + ast_string_field *ptr, const char *format, va_list ap, + const char *file, int lineno, const char *func) __attribute__((format(printf, 4, 0))); /*! \brief Declare a string field @@ -479,7 +476,7 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, __res__; \ }) -#define ast_string_field_ptr_set_by_fields(field_mgr_pool, field_mgr, ptr, data) \ +#define __ast_string_field_ptr_set_by_fields(field_mgr_pool, field_mgr, ptr, data, file, lineno, func) \ ({ \ int __res__ = 0; \ const char *__d__ = (data); \ @@ -491,7 +488,7 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, *__p__ = __ast_string_field_empty; \ } else if ((__dlen__ <= AST_STRING_FIELD_ALLOCATION(*__p__)) || \ (!__ast_string_field_ptr_grow(&field_mgr, &field_mgr_pool, __dlen__, __p__)) || \ - (target = __ast_string_field_alloc_space(&field_mgr, &field_mgr_pool, __dlen__))) { \ + (target = __ast_string_field_alloc_space(&field_mgr, &field_mgr_pool, __dlen__, file, lineno, func))) { \ if (target != *__p__) { \ __ast_string_field_release_active(field_mgr_pool, *__p__); \ *__p__ = target; \ @@ -503,6 +500,9 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, __res__; \ }) +#define ast_string_field_ptr_set_by_fields(field_mgr_pool, field_mgr, ptr, data) \ + __ast_string_field_ptr_set_by_fields(field_mgr_pool, field_mgr, ptr, data, __FILE__, __LINE__, __PRETTY_FUNCTION__) + /*! \brief Set a field to a simple string value \param x Pointer to a structure containing fields @@ -532,7 +532,8 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, ({ \ int __res__ = -1; \ if (((void *)(x)) != NULL) { \ - __ast_string_field_ptr_build(&(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) ptr, fmt, args); \ + __ast_string_field_ptr_build(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ + &(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) ptr, fmt, args); \ __res__ = 0; \ } \ __res__; \ @@ -550,7 +551,8 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, ({ \ int __res__ = -1; \ if (((void *)(x)) != NULL) { \ - __ast_string_field_ptr_build(&(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) &(x)->field, fmt, args); \ + __ast_string_field_ptr_build(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ + &(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) &(x)->field, fmt, args); \ __res__ = 0; \ } \ __res__; \ @@ -568,7 +570,8 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, ({ \ int __res__ = -1; \ if (((void *)(x)) != NULL) { \ - __ast_string_field_ptr_build_va(&(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) ptr, fmt, args); \ + __ast_string_field_ptr_build_va(&(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) ptr, fmt, args, \ + __FILE__, __LINE__, __PRETTY_FUNCTION__); \ __res__ = 0; \ } \ __res__; \ @@ -586,7 +589,8 @@ void __ast_string_field_release_active(struct ast_string_field_pool *pool_head, ({ \ int __res__ = -1; \ if (((void *)(x)) != NULL) { \ - __ast_string_field_ptr_build_va(&(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) &(x)->field, fmt, args); \ + __ast_string_field_ptr_build_va(&(x)->__field_mgr, &(x)->__field_mgr_pool, (ast_string_field *) &(x)->field, fmt, args, \ + __FILE__, __LINE__, __PRETTY_FUNCTION__); \ __res__ = 0; \ } \ __res__; \ @@ -626,12 +630,14 @@ int __ast_string_fields_cmp(struct ast_string_field_vector *left, struct ast_str if (((void *)(copy)) != NULL && ((void *)(orig)) != NULL) { \ __res__ = __ast_string_fields_copy(((copy)->__field_mgr_pool), \ (struct ast_string_field_mgr *)&((copy)->__field_mgr), \ - (struct ast_string_field_mgr *)&((orig)->__field_mgr)); \ + (struct ast_string_field_mgr *)&((orig)->__field_mgr), \ + __FILE__, __LINE__, __PRETTY_FUNCTION__); \ } \ __res__; \ }) int __ast_string_fields_copy(struct ast_string_field_pool *copy_pool, - struct ast_string_field_mgr *copy_mgr, struct ast_string_field_mgr *orig_mgr); + struct ast_string_field_mgr *copy_mgr, struct ast_string_field_mgr *orig_mgr, + const char *file, int lineno, const char *func); #endif /* _ASTERISK_STRINGFIELDS_H */ diff --git a/include/asterisk/udptl.h b/include/asterisk/udptl.h index 7137ff936..0d79d6f66 100644 --- a/include/asterisk/udptl.h +++ b/include/asterisk/udptl.h @@ -126,13 +126,6 @@ void ast_udptl_setnat(struct ast_udptl *udptl, int nat); void ast_udptl_stop(struct ast_udptl *udptl); -void ast_udptl_init(void); - -/*! - * \version 1.6.1 return changed to int - */ -int ast_udptl_reload(void); - #if defined(__cplusplus) || defined(c_plusplus) } #endif |