astobj2.h File Reference

#include "asterisk/compat.h"
#include "asterisk/lock.h"

Include dependency graph for astobj2.h:

Go to the source code of this file.

Data Structures

struct  ao2_global_obj
struct  ao2_iterator
 When we need to walk through a container, we use an ao2_iterator to keep track of the current position. More...
#define ao2_alloc(data_size, destructor_fn)   __ao2_alloc((data_size), (destructor_fn), AO2_ALLOC_OPT_LOCK_MUTEX)
#define ao2_alloc_options(data_size, destructor_fn, options)   __ao2_alloc((data_size), (destructor_fn), (options))
#define ao2_t_alloc(data_size, destructor_fn, debug_msg)   __ao2_alloc((data_size), (destructor_fn), AO2_ALLOC_OPT_LOCK_MUTEX)
#define ao2_t_alloc_options(data_size, destructor_fn, options, debug_msg)   __ao2_alloc((data_size), (destructor_fn), (options))
 Allocate and initialize an object.
void * __ao2_alloc (size_t data_size, ao2_destructor_fn destructor_fn, unsigned int options) attribute_warn_unused_result
void * __ao2_alloc_debug (size_t data_size, ao2_destructor_fn destructor_fn, unsigned int options, const char *tag, const char *file, int line, const char *func, int ref_debug) attribute_warn_unused_result
#define ao2_bump(obj)   ao2_t_bump((obj), "")
#define ao2_ref(o, delta)   __ao2_ref((o), (delta))
#define ao2_replace(dst, src)   ao2_t_replace((dst), (src), "")
#define ao2_t_bump(obj, tag)
 Bump refcount on an AO2 object by one, returning the object.
#define ao2_t_ref(o, delta, tag)   __ao2_ref((o), (delta))
 Reference/unreference an object and return the old refcount.
#define ao2_t_replace(dst, src, tag)
 Replace one object reference with another cleaning up the original.
int __ao2_ref (void *o, int delta)
int __ao2_ref_debug (void *o, int delta, const char *tag, const char *file, int line, const char *func)
unsigned int ao2_options_get (void *obj)
 Retrieve the ao2 options used to create the object.
#define ao2_callback(c, flags, cb_fn, arg)   __ao2_callback((c), (flags), (cb_fn), (arg))
#define ao2_t_callback(c, flags, cb_fn, arg, tag)   __ao2_callback((c), (flags), (cb_fn), (arg))
 ao2_callback() is a generic function that applies cb_fn() to all objects in a container, as described below.
void * __ao2_callback (struct ao2_container *c, enum search_flags flags, ao2_callback_fn *cb_fn, void *arg)
void * __ao2_callback_debug (struct ao2_container *c, enum search_flags flags, ao2_callback_fn *cb_fn, void *arg, const char *tag, const char *file, int line, const char *func)

Object Containers

Here start declarations of containers.

#define ao2_container_alloc(n_buckets, hash_fn, cmp_fn)   ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_MUTEX, (n_buckets), (hash_fn), (cmp_fn))
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)   __ao2_container_alloc_hash((ao2_options), (container_options), (n_buckets), (hash_fn), (sort_fn), (cmp_fn))
#define ao2_container_alloc_list(ao2_options, container_options, sort_fn, cmp_fn)   __ao2_container_alloc_list((ao2_options), (container_options), (sort_fn), (cmp_fn))
#define ao2_container_alloc_options(options, n_buckets, hash_fn, cmp_fn)   ao2_container_alloc_hash((options), 0, (n_buckets), (hash_fn), NULL, (cmp_fn))
#define ao2_container_alloc_rbtree(ao2_options, container_options, sort_fn, cmp_fn)   __ao2_container_alloc_rbtree((ao2_options), (container_options), (sort_fn), (cmp_fn))
#define ao2_container_clone(orig, flags)   __ao2_container_clone(orig, flags)
#define ao2_t_container_alloc(n_buckets, hash_fn, cmp_fn, tag)   ao2_t_container_alloc_options(AO2_ALLOC_OPT_LOCK_MUTEX, (n_buckets), (hash_fn), (cmp_fn), (tag))
#define ao2_t_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn, tag)   __ao2_container_alloc_hash((ao2_options), (container_options), (n_buckets), (hash_fn), (sort_fn), (cmp_fn))
 Allocate and initialize a hash container with the desired number of buckets.
#define ao2_t_container_alloc_list(ao2_options, container_options, sort_fn, cmp_fn, tag)   __ao2_container_alloc_list((ao2_options), (container_options), (sort_fn), (cmp_fn))
 Allocate and initialize a list container.
#define ao2_t_container_alloc_options(options, n_buckets, hash_fn, cmp_fn, tag)   ao2_t_container_alloc_hash((options), 0, (n_buckets), (hash_fn), NULL, (cmp_fn), (tag))
 Allocate and initialize a hash container with the desired number of buckets.
#define ao2_t_container_alloc_rbtree(ao2_options, container_options, sort_fn, cmp_fn, tag)   __ao2_container_alloc_rbtree((ao2_options), (container_options), (sort_fn), (cmp_fn))
 Allocate and initialize a red-black tree container.
#define ao2_t_container_clone(orig, flags, tag)   __ao2_container_clone(orig, flags)
typedef void( ao2_prnt_fn )(void *where, const char *fmt,...)
 Print output.
typedef void( ao2_prnt_obj_fn )(void *v_obj, void *where, ao2_prnt_fn *prnt)
 Print object key.
struct ao2_container__ao2_container_alloc_hash (unsigned int ao2_options, unsigned int container_options, unsigned int n_buckets, ao2_hash_fn *hash_fn, ao2_sort_fn *sort_fn, ao2_callback_fn *cmp_fn) attribute_warn_unused_result
struct ao2_container__ao2_container_alloc_hash_debug (unsigned int ao2_options, unsigned int container_options, unsigned int n_buckets, ao2_hash_fn *hash_fn, ao2_sort_fn *sort_fn, ao2_callback_fn *cmp_fn, const char *tag, const char *file, int line, const char *func, int ref_debug) attribute_warn_unused_result
struct ao2_container__ao2_container_alloc_list (unsigned int ao2_options, unsigned int container_options, ao2_sort_fn *sort_fn, ao2_callback_fn *cmp_fn) attribute_warn_unused_result
struct ao2_container__ao2_container_alloc_list_debug (unsigned int ao2_options, unsigned int container_options, ao2_sort_fn *sort_fn, ao2_callback_fn *cmp_fn, const char *tag, const char *file, int line, const char *func, int ref_debug) attribute_warn_unused_result
struct ao2_container__ao2_container_alloc_rbtree (unsigned int ao2_options, unsigned int container_options, ao2_sort_fn *sort_fn, ao2_callback_fn *cmp_fn) attribute_warn_unused_result
struct ao2_container__ao2_container_alloc_rbtree_debug (unsigned int ao2_options, unsigned int container_options, ao2_sort_fn *sort_fn, ao2_callback_fn *cmp_fn, const char *tag, const char *file, int line, const char *func, int ref_debug) attribute_warn_unused_result
struct ao2_container__ao2_container_clone (struct ao2_container *orig, enum search_flags flags) attribute_warn_unused_result
 Create a clone/copy of the given container.
struct ao2_container__ao2_container_clone_debug (struct ao2_container *orig, enum search_flags flags, const char *tag, const char *file, int line, const char *func, int ref_debug) attribute_warn_unused_result
int ao2_container_check (struct ao2_container *self, enum search_flags flags)
 Perform an integrity check on the specified container.
int ao2_container_count (struct ao2_container *c)
 Returns the number of elements in a container.
void ao2_container_dump (struct ao2_container *self, enum search_flags flags, const char *name, void *where, ao2_prnt_fn *prnt, ao2_prnt_obj_fn *prnt_obj)
 Display contents of the specified container.
int ao2_container_dup (struct ao2_container *dest, struct ao2_container *src, enum search_flags flags)
 Copy all object references in the src container into the dest container.
int ao2_container_register (const char *name, struct ao2_container *self, ao2_prnt_obj_fn *prnt_obj)
 Register a container for CLI stats and integrity check.
void ao2_container_stats (struct ao2_container *self, enum search_flags flags, const char *name, void *where, ao2_prnt_fn *prnt)
 Display statistics of the specified container.
void ao2_container_unregister (const char *name)
 Unregister a container for CLI stats and integrity check.

Object Management

Here we have functions to manage objects.

We can use the functions below on any kind of object defined by the user.

#define ao2_link(container, obj)   __ao2_link((container), (obj), 0)
#define ao2_link_flags(container, obj, flags)   __ao2_link((container), (obj), (flags))
#define ao2_t_link(container, obj, tag)   __ao2_link((container), (obj), 0)
 Add an object to a container.
#define ao2_t_link_flags(container, obj, flags, tag)   __ao2_link((container), (obj), (flags))
#define ao2_t_unlink(container, obj, tag)   __ao2_unlink((container), (obj), 0)
 Remove an object from a container.
#define ao2_t_unlink_flags(container, obj, flags, tag)   __ao2_unlink((container), (obj), (flags))
#define ao2_unlink(container, obj)   __ao2_unlink((container), (obj), 0)
#define ao2_unlink_flags(container, obj, flags)   __ao2_unlink((container), (obj), (flags))
int __ao2_link (struct ao2_container *c, void *obj_new, int flags)
int __ao2_link_debug (struct ao2_container *c, void *obj_new, int flags, const char *tag, const char *file, int line, const char *func)
void * __ao2_unlink (struct ao2_container *c, void *obj, int flags)
void * __ao2_unlink_debug (struct ao2_container *c, void *obj, int flags, const char *tag, const char *file, int line, const char *func)

Defines

#define ao2_callback_data(container, flags, cb_fn, arg, data)   __ao2_callback_data((container), (flags), (cb_fn), (arg), (data))
#define ao2_cleanup(obj)   __ao2_cleanup(obj)
#define ao2_find(container, arg, flags)   __ao2_find((container), (arg), (flags))
#define ao2_global_obj_ref(holder)   __ao2_global_obj_ref(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
#define ao2_global_obj_release(holder)   __ao2_global_obj_release(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
#define ao2_global_obj_replace(holder, obj)   __ao2_global_obj_replace(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
#define ao2_global_obj_replace_unref(holder, obj)   __ao2_global_obj_replace_unref(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
#define AO2_GLOBAL_OBJ_STATIC(name)
 Define a global object holder to be used to hold an ao2 object, statically initialized.
#define ao2_iterator_next(iter)   __ao2_iterator_next((iter))
#define ao2_lock(a)   __ao2_lock(a, AO2_LOCK_REQ_MUTEX, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define ao2_rdlock(a)   __ao2_lock(a, AO2_LOCK_REQ_RDLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define ao2_t_callback_data(container, flags, cb_fn, arg, data, tag)   __ao2_callback_data((container), (flags), (cb_fn), (arg), (data))
 ao2_callback_data() is a generic function that applies cb_fn() to all objects in a container. It is functionally identical to ao2_callback() except that instead of taking an ao2_callback_fn *, it takes an ao2_callback_data_fn *, and allows the caller to pass in arbitrary data.
#define ao2_t_cleanup(obj, tag)   __ao2_cleanup((obj))
#define ao2_t_find(container, arg, flags, tag)   __ao2_find((container), (arg), (flags))
#define ao2_t_global_obj_ref(holder, tag)   __ao2_global_obj_ref(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 Get a reference to the object stored in the global holder.
#define ao2_t_global_obj_release(holder, tag)   __ao2_global_obj_release(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 Release the ao2 object held in the global holder.
#define ao2_t_global_obj_replace(holder, obj, tag)   __ao2_global_obj_replace(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 Replace an ao2 object in the global holder.
#define ao2_t_global_obj_replace_unref(holder, obj, tag)   __ao2_global_obj_replace_unref(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)
 Replace an ao2 object in the global holder, throwing away any old object.
#define ao2_t_iterator_next(iter, tag)   __ao2_iterator_next((iter))
#define ao2_trylock(a)   __ao2_trylock(a, AO2_LOCK_REQ_MUTEX, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define ao2_tryrdlock(a)   __ao2_trylock(a, AO2_LOCK_REQ_RDLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define ao2_trywrlock(a)   __ao2_trylock(a, AO2_LOCK_REQ_WRLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define ao2_unlock(a)   __ao2_unlock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define ao2_wrlock(a)   __ao2_lock(a, AO2_LOCK_REQ_WRLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
#define OBJ_KEY   OBJ_SEARCH_KEY
#define OBJ_PARTIAL_KEY   OBJ_SEARCH_PARTIAL_KEY
#define OBJ_POINTER   OBJ_SEARCH_OBJECT

Typedefs

typedef int( ao2_callback_data_fn )(void *obj, void *arg, void *data, int flags)
 Type of a generic callback function.
typedef int( ao2_callback_fn )(void *obj, void *arg, int flags)
 Type of a generic callback function.
typedef void(* ao2_destructor_fn )(void *vdoomed)
 Typedef for an object destructor.
typedef int( ao2_hash_fn )(const void *obj, int flags)
typedef int( ao2_sort_fn )(const void *obj_left, const void *obj_right, int flags)
 Type of generic container sort function.

Enumerations

enum  _cb_results { CMP_MATCH = 0x1, CMP_STOP = 0x2 }
 A callback function will return a combination of CMP_MATCH and CMP_STOP. The latter will terminate the search in a container. More...
enum  ao2_alloc_opts { AO2_ALLOC_OPT_LOCK_MUTEX = (0 << 0), AO2_ALLOC_OPT_LOCK_RWLOCK = (1 << 0), AO2_ALLOC_OPT_LOCK_NOLOCK = (2 << 0), AO2_ALLOC_OPT_LOCK_MASK = (3 << 0) }
 Options available when allocating an ao2 object. More...
enum  ao2_container_opts {
  AO2_CONTAINER_ALLOC_OPT_INSERT_BEGIN = (1 << 0), AO2_CONTAINER_ALLOC_OPT_DUPS_MASK = (3 << 1), AO2_CONTAINER_ALLOC_OPT_DUPS_ALLOW = (0 << 1), AO2_CONTAINER_ALLOC_OPT_DUPS_REJECT = (1 << 1),
  AO2_CONTAINER_ALLOC_OPT_DUPS_OBJ_REJECT = (2 << 1), AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE = (3 << 1)
}
 Options available when allocating an ao2 container object. More...
enum  ao2_iterator_flags { AO2_ITERATOR_DONTLOCK = (1 << 0), AO2_ITERATOR_MALLOCD = (1 << 1), AO2_ITERATOR_UNLINK = (1 << 2), AO2_ITERATOR_DESCENDING = (1 << 3) }
enum  ao2_lock_req { AO2_LOCK_REQ_MUTEX, AO2_LOCK_REQ_RDLOCK, AO2_LOCK_REQ_WRLOCK }
 Which lock to request. More...
enum  search_flags {
  OBJ_UNLINK = (1 << 0), OBJ_NODATA = (1 << 1), OBJ_MULTIPLE = (1 << 2), OBJ_NOLOCK = (1 << 4),
  OBJ_SEARCH_MASK = (0x07 << 5), OBJ_SEARCH_NONE = (0 << 5), OBJ_SEARCH_OBJECT = (1 << 5), OBJ_SEARCH_KEY = (2 << 5),
  OBJ_SEARCH_PARTIAL_KEY = (4 << 5), OBJ_ORDER_MASK = (0x03 << 8), OBJ_ORDER_ASCENDING = (0 << 8), OBJ_ORDER_DESCENDING = (1 << 8),
  OBJ_ORDER_PRE = (2 << 8), OBJ_ORDER_POST = (3 << 8)
}
 Flags passed to ao2_callback_fn(), ao2_hash_fn(), and ao2_sort_fn() to modify behaviour. More...

Functions

void * __ao2_callback_data (struct ao2_container *c, enum search_flags flags, ao2_callback_data_fn *cb_fn, void *arg, void *data)
void * __ao2_callback_data_debug (struct ao2_container *c, enum search_flags flags, ao2_callback_data_fn *cb_fn, void *arg, void *data, const char *tag, const char *file, int line, const char *func)
void __ao2_cleanup (void *obj)
void __ao2_cleanup_debug (void *obj, const char *tag, const char *file, int line, const char *function)
void * __ao2_find (struct ao2_container *c, const void *arg, enum search_flags flags)
void * __ao2_find_debug (struct ao2_container *c, const void *arg, enum search_flags flags, const char *tag, const char *file, int line, const char *func)
void * __ao2_global_obj_ref (struct ao2_global_obj *holder, const char *tag, const char *file, int line, const char *func, const char *name) attribute_warn_unused_result
void __ao2_global_obj_release (struct ao2_global_obj *holder, const char *tag, const char *file, int line, const char *func, const char *name)
void * __ao2_global_obj_replace (struct ao2_global_obj *holder, void *obj, const char *tag, const char *file, int line, const char *func, const char *name) attribute_warn_unused_result
int __ao2_global_obj_replace_unref (struct ao2_global_obj *holder, void *obj, const char *tag, const char *file, int line, const char *func, const char *name)
void * __ao2_iterator_next (struct ao2_iterator *iter) attribute_warn_unused_result
void * __ao2_iterator_next_debug (struct ao2_iterator *iter, const char *tag, const char *file, int line, const char *func) attribute_warn_unused_result
int __ao2_lock (void *a, enum ao2_lock_req lock_how, const char *file, const char *func, int line, const char *var)
 Lock an object.
int __ao2_trylock (void *a, enum ao2_lock_req lock_how, const char *file, const char *func, int line, const char *var)
 Try locking-- (don't block if fail).
int __ao2_unlock (void *a, const char *file, const char *func, int line, const char *var)
 Unlock an object.
void ao2_iterator_cleanup (struct ao2_iterator *iter)
int ao2_iterator_count (struct ao2_iterator *iter)
 Get a count of the iterated container objects.
void ao2_iterator_destroy (struct ao2_iterator *iter)
 Destroy a container iterator.
struct ao2_iterator ao2_iterator_init (struct ao2_container *c, int flags) attribute_warn_unused_result
 Create an iterator for a container.
void ao2_iterator_restart (struct ao2_iterator *iter)
 Restart an iteration.
int ao2_match_by_addr (void *obj, void *arg, int flags)
 A common ao2_callback is one that matches by address.
void * ao2_object_get_lockaddr (void *obj)
 Return the mutex lock address of an object.


Detailed Description

Object Model implementing objects and containers.

Definition in file astobj2.h.


Define Documentation

#define ao2_alloc ( data_size,
destructor_fn   )     __ao2_alloc((data_size), (destructor_fn), AO2_ALLOC_OPT_LOCK_MUTEX)

Examples:
/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 477 of file astobj2.h.

Referenced by __aco_option_register(), __allocate_taskprocessor(), __ast_bucket_scheme_register(), __ast_channel_internal_alloc(), __ast_sorcery_apply_wizard_mapping(), __ast_sorcery_object_field_register(), __ast_sorcery_open(), __ast_sorcery_wizard_register(), __features_config_alloc(), _ast_odbc_request_obj2(), _moh_class_malloc(), aco_option_register_deprecated(), add_calltoken_ignore(), add_column_name(), add_session_media(), agent_pvt_new(), alloc_new_parking_lot(), alloc_notify_task_data(), alloc_smdi_interface(), allocate_subscription(), allocate_subscription_tree(), ao2_dup_event(), app_data_create(), applicationmap_item_alloc(), ast_add_hint(), ast_ari_add_handler(), ast_ari_remove_handler(), ast_ari_websocket_session_create(), ast_attended_transfer_message_create(), ast_blind_transfer_message_create(), ast_bridge_blob_create(), ast_bridge_transfer_blind(), ast_calendar_event_alloc(), ast_cdr_engine_term(), ast_cel_general_config_alloc(), ast_channel_dialed_causes_add(), ast_channel_get_manager_vars(), ast_channel_get_vars(), ast_channel_suppress(), ast_config_hook_register(), ast_dns_resolve_recurring(), ast_endpoint_blob_create(), ast_json_payload_create(), ast_manager_event_blob_create(), ast_media_index_create(), ast_msg_alloc(), ast_multi_channel_blob_create(), ast_multi_object_blob_create(), ast_mwi_blob_create(), ast_mwi_create(), ast_parked_call_payload_create(), ast_parking_register_bridge_features(), ast_phoneprov_provider_register(), ast_register_indication(), ast_res_pjsip_initialize_configuration(), ast_rtp_engine_alloc_payload_type(), ast_rtp_instance_new(), ast_rtp_publish_rtcp_message(), ast_rtp_rtcp_report_alloc(), ast_sip_channel_pvt_alloc(), ast_sip_for_each_contact(), ast_sip_initialize_sorcery_auth(), ast_sip_initialize_sorcery_location(), ast_sip_initialize_sorcery_transport(), ast_sip_publish_client_alloc_datastore(), ast_sip_session_alloc(), ast_sip_session_alloc_datastore(), ast_sip_session_register_sdp_handler(), ast_sip_session_suspend(), ast_sip_subscription_alloc_datastore(), ast_sorcery_global_observer_add(), ast_sorcery_instance_observer_add(), ast_sorcery_object_fields_register(), ast_sorcery_observer_add(), ast_sorcery_wizard_observer_add(), ast_taskprocessor_listener_alloc(), ast_tcptls_client_create(), ast_tcptls_server_root(), AST_TEST_DEFINE(), ast_threadpool_listener_alloc(), ast_tone_zone_alloc(), ast_unreal_alloc(), ast_uri_create_(), ast_websocket_server_add_protocol(), ast_websocket_uri_cb(), ast_xmpp_client_config_alloc(), async_data_alloc(), attended_transfer_properties_alloc(), auth_create(), bridge_alloc(), bridge_basic_personality_alloc(), bridge_channel_internal_alloc(), bridge_manager_create(), bridge_merge_message_create(), bridge_profile_alloc(), bridge_profile_sounds_alloc(), bucket_metadata_alloc(), build_calendar(), build_callno_limits(), build_device(), build_entity_id(), build_mansession(), build_peer(), build_profile(), build_route(), build_user(), cache_test_message_create_full(), caldav_load_calendar(), calendar_query_exec(), cdr_object_alloc(), cdr_prop_write(), cdr_read(), cdr_write(), cel_config_alloc(), chan_list_init(), chan_pjsip_new(), command_create(), conf_alloc(), conf_run(), confbridge_cfg_alloc(), consumer_create(), control_create(), control_list_create(), create_channel_blob_message(), create_esc_entry(), create_queue_member(), create_trunk_ref(), data_filter_alloc(), data_provider_new(), data_result_create(), data_search_alloc(), device_state_subscription_create(), dial_masquerade_datastore_alloc(), dialgroup_write(), endpoint_internal_create(), ewscal_load_calendar(), exchangecal_load_calendar(), exten_state_data_alloc(), exten_state_subscription_alloc(), extension_state_add_destroy(), fax_detect_new(), fax_gateway_new(), fax_session_new(), fax_session_reserve(), featuregroup_alloc(), featuregroup_handler(), forkcdr_exec(), forwards_create(), generate_parked_user(), get_filestream(), global_config_alloc(), hangup_data_alloc(), hepv3_config_alloc(), hepv3_create_capture_info(), hepv3_data_alloc(), ht_new(), ical_load_calendar(), indicate_data_alloc(), info_dtmf_data_alloc(), inprocess_count(), insert_test_duplicates(), insert_test_vector(), jingle_alloc(), jingle_config_alloc(), jingle_endpoint_alloc(), jingle_endpoint_state_create(), join_conference_bridge(), keepalive_transport_state_callback(), kqueue_timer_open(), load_config(), load_module(), load_odbc_config(), media_info_alloc(), media_variant_alloc(), menu_alloc(), module_config_alloc(), msg_data_alloc(), msg_data_create(), mwi_get_notify_data(), mwi_stasis_subscription_alloc(), mwi_subscription_alloc(), named_acl_alloc(), named_acl_config_alloc(), native_rtp_bridge_framehook_attach(), new_iax(), new_invite_alloc(), new_realtime_sqlite3_db(), nocdr_exec(), notify_ami_data_create(), notify_ami_uri_data_create(), notify_cfg_alloc(), notify_cli_data_create(), notify_cli_uri_data_create(), notify_option_alloc(), notify_option_handler(), parking_config_alloc(), parking_lot_cfg_alloc(), pbx_outgoing_attempt(), peercnt_add(), persistent_endpoint_find_or_create(), playback_create(), presence_state_alloc(), proxy_from_config(), pthread_timer_open(), queue_stasis_data_alloc(), realtime_common(), recording_alloc(), recurring_data_alloc(), refer_progress_alloc(), refer_progress_notification_alloc(), resetcdr_exec(), root_handler_create(), rx_task_data_create(), send_start_msg_snapshots(), sendtext_data_create(), serializer_create(), session_create(), session_details_new(), set_fn(), set_size_data_alloc(), shutdown_data_create(), sip_create_publication(), sip_monitor_instance_init(), sip_outbound_publish_state_alloc(), sip_outbound_registration_response_cb(), sip_outbound_registration_state_alloc(), sip_prepare_socket(), sip_tcptls_write(), sip_threadinfo_create(), skel_config_alloc(), skel_game_alloc(), skel_level_alloc(), skel_state_alloc(), sla_build_station(), sla_build_trunk(), sla_create_station_ref(), smdi_read(), sorcery_object_type_alloc(), sorcery_observer_invocation_alloc(), stasis_app_control_record(), stasis_app_recording_options_create(), stasis_config_alloc(), stasis_message_sink_create(), stasis_test_message_create(), subscription_change_alloc(), t38_parameters_task_data_alloc(), task_data_create(), task_pushed_data_alloc(), test_config_alloc(), test_item_alloc(), test_performance(), thread_worker_pair_alloc(), threadpool_alloc(), timerfd_timer_open(), transfer_data_alloc(), transport_apply(), try_calling(), udptl_snapshot_alloc(), user_profile_alloc(), ustmtext(), websocket_client_args_create(), websocket_client_create(), websocket_server_create_impl(), worker_thread_alloc(), xml_translate(), xmpp_client_alloc(), xmpp_client_create_buddy(), xmpp_config_alloc(), and xmpp_pak_presence().

#define ao2_alloc_options ( data_size,
destructor_fn,
options   )     __ao2_alloc((data_size), (destructor_fn), (options))

#define ao2_bump ( obj   )     ao2_t_bump((obj), "")

Examples:
/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 549 of file astobj2.h.

Referenced by __ast_format_cap_append(), __ast_smoother_feed(), __ast_sorcery_apply_wizard_mapping(), _moh_class_malloc(), add_static_payload(), adsi_transmit_message_full(), alloc_notify_task_data(), allocate_subscription_tree(), append_mailbox_mapping(), application_tuple_alloc(), apply_menu_to_user(), ast_cdr_message_router(), ast_cel_set_config(), ast_channel_start_silence_generator(), ast_channel_yank(), ast_dns_query_set_resolve_async(), ast_dns_resolve_async(), ast_dns_resolve_recurring(), ast_dns_resolver_set_data(), ast_format_attribute_set(), ast_format_create_named(), ast_format_get_codec(), ast_format_joint(), ast_format_parse_sdp_fmtp(), ast_frdup(), ast_frisolate(), ast_rtp_codecs_get_payload(), ast_rtp_codecs_get_payload_format(), ast_rtp_codecs_payloads_copy(), ast_rtp_codecs_payloads_set_m_type(), ast_rtp_codecs_payloads_set_rtpmap_type_rate(), ast_rtp_new(), ast_sip_create_response(), ast_sip_for_each_contact(), ast_sip_publish_client_send(), ast_sip_session_alloc(), ast_sip_session_create_outgoing(), ast_sip_subscription_get_endpoint(), ast_slinfactory_init(), ast_slinfactory_init_with_format(), ast_speech_new(), AST_TEST_DEFINE(), asterisk_start_devicestate_publishing(), asterisk_start_mwi_publishing(), auth_observer(), background_detect_exec(), bridge_channel_internal_join(), bridge_stasis_queue_join_action(), cache_entry_create(), cache_put(), cache_test_aggregate_calc_fn(), cache_udpate(), cancel_and_unpublish(), chan_pjsip_answer(), chan_pjsip_indicate(), channel_do_masquerade(), chanspy_exec(), command_prestart_get_container(), conf_set_menu_to_user(), control_create(), create_jb(), create_out_of_dialog_request(), dahdi_translate(), dahdiscan_exec(), device_state_aggregate_calc(), dictate_exec(), dispatch_message(), distributor(), dns_query_recurring_resolution_callback(), do_waiting(), eagi_exec(), exten_state_subscription_alloc(), extenspy_exec(), generic_fax_exec(), get_filestream(), get_or_create_subscription(), get_subscription(), handle_msg_cb(), handle_recordfile(), ices_exec(), isAnsweringMachine(), linear_alloc(), measurenoise(), moh_alloc(), moh_files_write_format_change(), moh_parse_options(), mp3_exec(), mwi_subscription_alloc(), naptr_resolve(), NBScat_exec(), oss_read(), play_uri(), playtones_alloc(), qualify_contact(), qualify_data_alloc(), record_exec(), recurring_resolve(), resamp_new(), route_table_add(), schedule_notification(), schedule_publish_refresh(), send_request_cb(), send_request_data_alloc(), send_start_msg_snapshots(), send_waveform_to_channel(), set_next_mime_type(), set_read_to_slin(), sip_outbound_publish_callback(), sip_outbound_publish_client_alloc(), sip_outbound_publish_state_alloc(), sip_outbound_publish_synchronize(), sip_outbound_registration_apply(), sip_outbound_registration_perform(), sip_outbound_registration_regc_alloc(), sip_outbound_registration_state_alloc(), sip_publish_client_service_queue(), smdi_msg_retrieve_read(), softmix_translate_helper_entry_alloc(), speech_background(), srv_resolve(), stasis_app_control_play_uri(), stasis_app_control_record(), stasis_app_exec(), stasis_app_get_all(), stasis_cache_get_by_eid(), stasis_forward_all(), stasis_message_router_publish_sync(), stasis_unsubscribe(), subscription_persistence_recreate(), test_resolve(), tonepair_alloc(), transmit_audio(), unbound_resolver_resolve(), unbound_resolver_start(), and wrap_hook().

#define ao2_callback ( c,
flags,
cb_fn,
arg   )     __ao2_callback((c), (flags), (cb_fn), (arg))

Definition at line 1706 of file astobj2.h.

Referenced by _ast_odbc_request_obj2(), _sip_show_peers(), acf_jabberstatus_read(), acl_on_rx_msg(), aco_option_find(), admin_exec(), agents_mark(), agents_sweep(), ami_registrations_endpoints(), ami_show_endpoints(), ami_show_outbound_registrations(), ami_show_resource_lists(), ami_sip_qualify(), anonymous_identify(), ari_show_users(), ast_ari_applications_list(), ast_bridge_features_merge(), ast_calendar_clear_events(), ast_calendar_merge_events(), ast_calendar_unregister(), ast_cdr_setuserfield(), ast_cdr_setvar(), ast_channel_dialed_causes_channels(), ast_channel_dialed_causes_clear(), ast_codec_get_by_id(), ast_extension_state_del(), ast_get_chan_applicationmap(), ast_media_get_media(), ast_media_get_variants(), ast_merge_contexts_and_delete(), ast_multi_channel_blob_get_channels(), ast_namedgroups_intersect(), ast_phoneprov_delete_extensions(), ast_sip_cli_traverse_objects(), ast_sip_location_retrieve_aor_contacts(), ast_sip_location_retrieve_first_aor_contact(), ast_sip_publication_remove_datastore(), ast_sip_session_alloc(), ast_sip_session_remove_datastore(), ast_softhangup_all(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_global_observer_remove(), ast_sorcery_instance_observer_remove(), ast_sorcery_is_object_field_registered(), ast_sorcery_load(), ast_sorcery_observer_remove(), ast_sorcery_reload(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_update(), ast_sorcery_wizard_observer_remove(), ast_sounds_reindex(), ast_unregister_indication_country(), asterisk_publication_devicestate_refresh(), asterisk_publication_mwi_refresh(), asterisk_publication_send_refresh(), asterisk_start_devicestate_publishing(), asterisk_start_mwi_publishing(), cache_cleanup(), caldav_destructor(), calendar_is_busy(), calltoken_required(), cc_handle_publish_error(), cdr_engine_shutdown(), cdr_object_get_by_name(), cel_report_event(), channel_admin_exec(), channel_replaced_cb(), channel_stolen_cb(), cleanup(), cli_channel_get_container(), cli_contact_get_container(), cli_display_parking_lot(), cli_display_parking_lot_list(), cli_endpoint_iterate(), cli_get_container(), cli_iterator(), conf_run(), contact_expiration_initialize_existing(), cpg_confchg_cb(), create_mwi_subscriptions(), create_sound_blob(), delete_profiles(), delete_providers(), delete_routes(), delete_users(), destroy_hint(), do_timing(), ewscal_destructor(), exchangecal_destructor(), find_an_endpoint(), format_ami_endpoint_identify(), handle_bridge_leave_message(), handle_bridge_show_specific(), handle_cc_notify(), handle_channel_cache_message(), handle_cli_sound_show(), handle_cli_sounds_show(), handle_feature_show(), handle_negotiated_sdp(), handle_registrations(), handle_response_subscribe(), hash_test_count(), hooks_remove_container(), icalendar_destructor(), ip_identify(), keepalive_transport_thread(), line_identify(), load_config(), load_indications(), load_module(), manager_bridges_list(), mark_all_databases_dirty(), meetme_data_provider_get(), meetme_menu_admin(), meetme_menu_admin_extended(), metermaidstate(), mwi_get_notify_data(), mwi_subscription_shutdown(), nat_on_tx_message(), notify_endpoint(), object_type_loaded_observer(), on_endpoint(), one_protocol(), options_stop(), parking_lot_retrieve_parked_user(), parking_lot_search_context_extension_inuse(), persistent_endpoint_contact_observer(), pjsip_contact_function_read(), print_featuregroups(), process_config(), qualify_and_schedule_all(), qualify_and_schedule_all_cb(), queue_delme_members_decrement_followers(), queue_member_follower_removal(), queued_set_size(), queued_task_pushed(), registrar_validate_contacts(), registration_loaded_observer(), reload(), reload_queues(), reload_single_queue(), remote_send_hold_refresh(), rx_task(), send_mwi_notify(), send_unsolicited_mwi_notify(), set_config_destroy(), set_peercnt_limit(), show_codec(), shrink(), sip_tcp_locate(), sla_destroy(), sla_load_config(), smdi_msg_find(), sorcery_config_retrieve_fields(), sorcery_config_retrieve_multiple(), sorcery_config_retrieve_regex(), sorcery_memory_retrieve_fields(), sorcery_memory_retrieve_multiple(), sorcery_memory_retrieve_regex(), sorcery_object_load(), sorcery_observers_notify_create(), sorcery_observers_notify_delete(), sorcery_observers_notify_loaded(), sorcery_observers_notify_update(), start_poll_thread(), stasis_app_get_all(), stasis_cache_dump_all(), stasis_cache_dump_by_eid(), subscription_persistence_load(), test_ao2_callback_traversal(), unlink_dirty_databases(), unlink_from_msg_q(), unload_module(), unsubscribe(), user_destructor(), username_identify(), xmpp_client_config_post_apply(), xmpp_client_service_discovery_result_hook(), xmpp_config_post_apply(), xmpp_init_event_distribution(), xmpp_pak_presence(), xmpp_roster_hook(), and xmpp_status_exec().

#define ao2_callback_data ( container,
flags,
cb_fn,
arg,
data   )     __ao2_callback_data((container), (flags), (cb_fn), (arg), (data))

#define ao2_cleanup ( obj   )     __ao2_cleanup(obj)

Examples:
/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 1974 of file astobj2.h.

Referenced by __allocate_taskprocessor(), __analog_ss_thread(), __ast_bucket_scheme_register(), __ast_manager_event_multichan(), __ast_play_and_record(), __ast_register_translator(), __ast_sorcery_apply_default(), __ast_sorcery_apply_wizard_mapping(), __ast_sorcery_object_field_register(), __ast_sorcery_object_register(), __ast_sorcery_open(), __ast_sorcery_wizard_register(), __ast_udptl_reload(), __ast_vm_greeter_register(), __ast_vm_register(), __features_config_alloc(), __frame_free(), __sip_alloc(), __sip_destroy(), __test_cel_generate_peer_str(), __unload_module(), _skinny_show_lines(), acf_jabberreceive_read(), acf_jabberstatus_read(), acl_on_rx_msg(), aco_process_ast_config(), aco_process_config(), aco_process_var(), action_agents(), action_blind_transfer(), action_bridge(), action_coreshowchannels(), action_destroy(), action_devicestatelist(), action_originate(), action_presencestatelist(), active_channels_to_str(), add_datastore(), add_format_information_cb(), add_header(), add_item(), add_mwi_datastore(), add_sdp(), add_sdp_streams(), add_session_media(), add_transferer_role(), admin_exec(), adsi_transmit_message_full(), after_bridge_move_channel(), after_bridge_move_channel_fail(), agent_login_exec(), agent_logoff_request(), agent_pvt_destructor(), agent_request_exec(), agents_cfg_destructor(), agents_post_apply_config(), all_dtor(), alloc_new_parking_lot(), alloc_variant(), ami_register(), ami_registrations_endpoints(), ami_show_endpoint(), ami_show_endpoints(), ami_show_outbound_registrations(), ami_sip_qualify(), ami_unregister(), analog_ss_thread(), announce_pvt_destructor(), announce_request(), announce_to_dial(), anonymous_identify(), aoc_event_blob_dtor(), aor_destroy(), app_cleanup(), app_control_dial(), app_create(), app_deactivate(), app_dtor(), app_exec(), app_handle_subscriptions(), app_is_subscribed_bridge_id(), app_is_subscribed_channel_id(), app_is_subscribed_endpoint_id(), app_send(), app_send_command_on_condition(), app_send_end_msg(), app_subscribe(), app_subscribe_bridge(), app_subscribe_channel(), app_subscribe_endpoint(), app_to_json(), app_update(), append_channel_vars(), append_event(), append_expected_event(), applicationmap_handler(), ari_bridges_handle_play(), ari_bridges_play_found(), ari_bridges_play_helper(), ari_bridges_play_new(), ari_channels_handle_originate_with_id(), ari_channels_handle_play(), ari_channels_handle_snoop_channel(), ari_show(), ari_show_user(), ari_show_users(), assign_uuid(), ast_ari_add_handler(), ast_ari_applications_list(), ast_ari_bridges_add_channel(), ast_ari_bridges_create(), ast_ari_bridges_create_with_id(), ast_ari_bridges_destroy(), ast_ari_bridges_get(), ast_ari_bridges_list(), ast_ari_bridges_record(), ast_ari_bridges_remove_channel(), ast_ari_bridges_start_moh(), ast_ari_bridges_stop_moh(), ast_ari_callback(), ast_ari_channels_answer(), ast_ari_channels_continue_in_dialplan(), ast_ari_channels_get(), ast_ari_channels_get_channel_var(), ast_ari_channels_hangup(), ast_ari_channels_hold(), ast_ari_channels_list(), ast_ari_channels_mute(), ast_ari_channels_record(), ast_ari_channels_redirect(), ast_ari_channels_ring(), ast_ari_channels_ring_stop(), ast_ari_channels_send_dtmf(), ast_ari_channels_set_channel_var(), ast_ari_channels_start_moh(), ast_ari_channels_start_silence(), ast_ari_channels_stop_moh(), ast_ari_channels_stop_silence(), ast_ari_channels_unhold(), ast_ari_channels_unmute(), ast_ari_config_validate_user(), ast_ari_endpoints_get(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), ast_ari_events_event_websocket_ws_cb(), ast_ari_invoke(), ast_ari_json_format(), ast_ari_playbacks_control(), ast_ari_playbacks_get(), ast_ari_playbacks_stop(), ast_ari_recordings_copy_stored(), ast_ari_recordings_delete_stored(), ast_ari_recordings_get_live(), ast_ari_recordings_get_stored(), ast_ari_recordings_list_stored(), ast_ari_remove_handler(), ast_ari_sounds_list(), ast_ari_websocket_session_create(), ast_attended_transfer_message_create(), ast_audiohook_destroy(), ast_audiohook_detach_list(), ast_blind_transfer_message_create(), ast_bridge_add_channel(), ast_bridge_blob_create(), ast_bridge_features_cleanup(), ast_bridge_publish_attended_transfer(), ast_bridge_publish_blind_transfer(), ast_bridge_publish_enter(), ast_bridge_publish_leave(), ast_bridge_publish_merge(), ast_bridge_publish_state(), ast_bridge_snapshot_create(), ast_bridge_snapshot_get_latest(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), ast_bucket_alloc(), ast_bucket_file_alloc(), ast_bucket_file_copy(), ast_bucket_file_metadata_set(), ast_bucket_file_metadata_unset(), ast_cdr_clear_property(), ast_cdr_engine_reload(), ast_cdr_engine_term(), ast_cdr_fork(), ast_cdr_get_config(), ast_cdr_getvar(), ast_cdr_is_enabled(), ast_cdr_reset(), ast_cdr_serialize_variables(), ast_cdr_set_config(), ast_cdr_set_property(), ast_cdr_setuserfield(), ast_cdr_setvar(), ast_cel_backend_register(), ast_cel_check_enabled(), ast_cel_engine_init(), ast_cel_fabricate_channel_from_event(), ast_cel_general_config_alloc(), ast_cel_get_config(), ast_cel_publish_event(), ast_cel_set_config(), ast_cel_track_event(), ast_channel_blob_create(), ast_channel_blob_create_from_cache(), ast_channel_get_manager_vars(), ast_channel_get_vars(), ast_channel_make_compatible_helper(), ast_channel_publish_blob(), ast_channel_publish_cached_blob(), ast_channel_publish_dial_internal(), ast_channel_publish_snapshot(), ast_channel_snapshot_create(), ast_channel_snapshot_get_latest(), ast_channel_snapshot_get_latest_by_name(), ast_channel_stop_silence_generator(), ast_channel_suppress(), ast_channel_yank(), ast_complete_channels(), ast_delete_mwi_state_full(), ast_device_state_clear_cache(), ast_do_pickup(), ast_endpoint_blob_create(), ast_endpoint_blob_publish(), ast_endpoint_latest_snapshot(), ast_endpoint_shutdown(), ast_endpoint_snapshot_create(), ast_format_cache_set(), ast_format_cap_get_compatible_format(), ast_format_cap_update_by_allow_disallow(), ast_get_builtin_feature(), ast_get_chan_applicationmap(), ast_get_chan_featuremap_config(), ast_get_chan_features_general_config(), ast_get_chan_features_pickup_config(), ast_get_chan_features_xfer_config(), ast_get_feature(), ast_iax2_new(), ast_jb_destroy(), ast_local_init(), ast_manager_event_blob_create(), ast_manager_publish_event(), ast_media_get_description(), ast_media_get_format_cap(), ast_media_get_media(), ast_media_get_variants(), ast_media_index_create(), ast_module_shutdown(), ast_module_unregister(), ast_monitor_start(), ast_monitor_stop(), ast_msg_var_unref_current(), ast_multi_channel_blob_add_channel(), ast_multi_channel_blob_create(), ast_multi_channel_blob_get_channels(), ast_multi_object_blob_create(), ast_multi_object_blob_single_channel_publish(), ast_mwi_blob_create(), ast_mwi_create(), ast_named_acl_find(), ast_namedgroups_intersect(), ast_parked_call_payload_create(), ast_parking_blind_transfer_park(), ast_parking_is_exten_park(), ast_parking_park_bridge_channel(), ast_parking_park_call(), ast_parking_provider_registered(), ast_parking_register_bridge_features(), ast_parking_unregister_bridge_features(), ast_phoneprov_add_extension(), ast_pickup_call(), ast_publish_channel_state(), ast_publish_device_state_full(), ast_publish_mwi_state_full(), ast_request(), ast_res_pjsip_cleanup_options_handling(), ast_res_pjsip_destroy_configuration(), ast_res_pjsip_init_options_handling(), ast_rtcp_read(), ast_rtcp_write_report(), ast_rtp_codecs_payloads_unset(), ast_rtp_destroy(), ast_rtp_instance_early_bridge(), ast_rtp_instance_early_bridge_make_compatible(), ast_rtp_publish_rtcp_message(), ast_rtp_read(), ast_set_read_format(), ast_set_write_format(), ast_sip_cleanup_auths(), ast_sip_cli_traverse_objects(), ast_sip_create_subscription(), ast_sip_destroy_distributor(), ast_sip_endpoint_alloc(), ast_sip_for_each_aor(), ast_sip_for_each_auth(), ast_sip_for_each_channel(), ast_sip_for_each_channel_snapshot(), ast_sip_for_each_contact(), ast_sip_initialize_system(), ast_sip_location_add_contact(), ast_sip_location_retrieve_contact_from_aor_list(), ast_sip_location_retrieve_first_aor_contact(), ast_sip_publish_client_alloc_datastore(), ast_sip_publish_client_get(), ast_sip_session_alloc(), ast_sip_session_alloc_datastore(), ast_sip_session_create_outgoing(), ast_sip_session_register_sdp_handler(), ast_sip_subscription_alloc_datastore(), ast_sip_unregister_publish_handler(), ast_slinfactory_destroy(), ast_smoother_free(), ast_smoother_reset(), ast_sorcery_alloc(), ast_sorcery_copy(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_diff(), ast_sorcery_is_object_field_registered(), ast_sorcery_load_object(), ast_sorcery_object_fields_register(), ast_sorcery_object_set_copy_handler(), ast_sorcery_object_set_diff_handler(), ast_sorcery_objectset_apply(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_observer_add(), ast_sorcery_observer_remove(), ast_sorcery_reload_object(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_sorcery_wizard_observer_add(), ast_sorcery_wizard_observer_remove(), ast_sounds_reindex(), ast_speech_new(), ast_statsd_log_full(), ast_system_publish_registry(), AST_TEST_DEFINE(), ast_threadpool_create(), ast_threadpool_serializer(), ast_translator_best_choice(), ast_udptl_new_with_bindaddr(), ast_unreal_channel_push_to_bridge(), ast_unreal_destructor(), ast_unreal_new_channels(), ast_unref_namedgroups(), AST_VECTOR(), ast_vm_greeter_is_registered(), ast_vm_greeter_unregister(), ast_vm_is_registered(), ast_vm_unregister(), ast_websocket_unref(), ast_xmpp_client_config_destructor(), ast_xmpp_client_find(), asterisk_devicestate_publisher_state_destroy(), asterisk_mwi_publisher_state_destroy(), asterisk_publication_config_alloc(), asterisk_publication_devicestate_state_change(), asterisk_publication_mwi_state_change(), asterisk_publication_new(), asterisk_start_devicestate_publishing(), asterisk_start_mwi_publishing(), asterisk_stop_devicestate_publishing(), asterisk_stop_mwi_publishing(), attended_transfer_bridge(), attended_transfer_dtor(), attended_transfer_properties_alloc(), attended_transfer_properties_destructor(), attended_transfer_properties_shutdown(), auth_alloc(), auth_observer(), auth_store_cleanup(), authenticate(), authenticate_user(), background_detect_exec(), base_process_party_a(), begin_dial_prerun(), blind_transfer_dtor(), bridge_agent_hold_deferred_create(), bridge_agent_hold_push(), bridge_alloc(), bridge_basic_change_personality(), bridge_basic_destroy(), bridge_blob_dtor(), bridge_builtin_set_limits(), bridge_candidate_add_to_cdr(), bridge_candidate_process(), bridge_channel_attended_transfer(), bridge_channel_control_thread(), bridge_channel_destroy(), bridge_channel_internal_queue_attended_transfer(), bridge_channel_internal_queue_blind_transfer(), bridge_channel_snapshot_pair_cleanup(), bridge_cleanup(), bridge_default_handler(), bridge_exec(), bridge_handle_dtmf(), bridge_merge_message_create(), bridge_merge_message_dtor(), bridge_moh_create(), bridge_move(), bridge_p2p_rtp_write(), bridge_parking_pull(), bridge_parking_push(), bridge_profile_destructor(), bridge_publish_state_from_blob(), bridge_show_specific_print_channel(), bridge_snapshot_dtor(), bridge_snapshot_update(), bridge_stasis_moving(), bridge_stasis_push(), bridge_stasis_push_peek(), bucket_alloc(), bucket_cleanup(), bucket_destroy(), bucket_file_alloc(), bucket_file_destroy(), bucket_file_wizard_retrieve(), bucket_wizard_retrieve(), build_cli_notify(), build_conf(), build_node_children(), build_nonce(), build_resource_tree(), cache_cleanup(), cache_dtor(), cache_dump_all_cb(), cache_dump_by_eid_cb(), cache_entry_create(), cache_entry_dtor(), cache_put(), cache_test_message_create_full(), caching_topic_exec(), cb_events(), cc_publish(), cdr_detach(), cdr_engine_shutdown(), cdr_object_alloc(), cdr_object_check_party_a_answer(), cdr_object_check_party_a_hangup(), cdr_object_dispatch(), cdr_object_dtor(), cdr_object_get_billsec(), cdr_object_set_disposition(), cdr_object_transition_state(), cdr_prop_write(), cdr_read(), cdr_submit_batch(), cdr_toggle_runtime_options(), cdr_write(), cel_channel_state_change(), cel_config_alloc(), cel_config_dtor(), cel_general_config_dtor(), cel_generate_peer_str(), cel_linkedid_ref(), cel_report_event(), cel_track_app(), cel_verify_and_cleanup_cb(), chan_pjsip_add_hold(), chan_pjsip_call(), chan_pjsip_devicestate(), chan_pjsip_digit_end(), chan_pjsip_get_hold(), chan_pjsip_hangup(), chan_pjsip_incoming_request(), chan_pjsip_indicate(), chan_pjsip_new(), chan_pjsip_pvt_dtor(), chan_pjsip_request(), chan_pjsip_session_begin(), chan_pjsip_set_rtp_peer(), chan_pjsip_transfer(), channel_blob_dtor(), channel_do_masquerade(), channel_id_sanitizer(), channel_read_pjsip(), channel_replaced_cb(), channel_role_snapshot_dtor(), channel_snapshot_dtor(), channel_snapshot_update(), channel_stolen_cb(), chanspy_exec(), check_cache_aggregate(), check_events(), check_new_cdr_needed(), check_retire_linkedid(), check_translation_path(), cli_aor_get_container(), cli_aor_print_body(), cli_aor_print_header(), cli_channel_get_container(), cli_channel_retrieve_by_id(), cli_complete_endpoint(), cli_complete_notify(), cli_complete_registration(), cli_contact_get_container(), cli_contact_print_body(), cli_display_named_acl(), cli_display_named_acl_list(), cli_display_parking_lot(), cli_endpoint_get_container(), cli_endpoint_print_body(), cli_endpoint_print_child_body(), cli_endpoint_print_child_header(), cli_get_container(), cli_iterator(), cli_notify(), cli_qualify(), cli_register(), cli_show_channel(), cli_show_channels(), cli_unregister(), codec_choose_from_prefs(), codec_shutdown(), command_prestart_queue_command(), command_queue_prestart_destroy(), complete_ari_user(), complete_bridge_profile_name(), complete_bridge_stasis(), complete_confbridge_participant(), complete_menu_name(), complete_user_profile_name(), conf_alloc(), conf_announce_channel_push(), conf_destructor(), conf_find_bridge_profile(), conf_find_user_profile(), conf_handle_talker_cb(), conf_run(), conf_set_menu_to_user(), confbridge_cfg_destructor(), config_shutdown(), configure_parking_extensions(), consumer_create(), consumer_dtor(), consumer_exec(), consumer_exec_sync(), consumer_finalize(), contact_alloc(), contact_expiration_destroy(), contact_expiration_observer_deleted(), contact_expiration_observer_updated(), container_to_json_array(), control_create(), control_dispatch_all(), control_dtor(), control_list_create(), control_list_dtor(), control_prestart_dispatch_all(), control_recording(), control_unlink(), create_bridge_snapshot_message(), create_channel_blob_message(), create_channel_snapshot_message(), create_dynamic_lot_full(), create_endpoint_snapshot_message(), create_mwi_subscriptions(), create_mwi_subscriptions_for_endpoint(), create_out_of_dialog_request(), create_outgoing_sdp_stream(), create_sound_blob(), dahdiscan_exec(), delete_old_messages(), delete_users(), destroy(), destroy_bridge(), destroy_dahdi_pvt(), destroy_escs(), destroy_fast_originate_helper(), destroy_faxdetect(), destroy_gateway(), destroy_parked_user(), destroy_subscriptions(), device_state_aggregate_calc(), device_state_cb(), device_state_info_dt(), devstate_cached(), devstate_cleanup(), dial_state_process_bridge_enter(), dial_status_to_disposition(), dial_trunk(), dictate_exec(), digest_check_auth(), digest_lookup(), digest_requires_authentication(), direct_media_mitigate_glare(), dispatch_exec_async(), dispatch_exec_sync(), dispatch_message(), distribute(), dns_query_active_destroy(), dns_query_destroy(), dns_query_recurring_destroy(), do_waiting(), domain_alias_alloc(), endpoint_blob_dtor(), endpoint_cleanup(), endpoint_default(), endpoint_destructor(), endpoint_dtor(), endpoint_internal_create(), endpoint_publish_snapshot(), endpoint_receives_unsolicited_mwi_for_mailbox(), endpoints_stasis_cleanup(), exten_state_data_alloc(), exten_state_data_destructor(), exten_state_subscription_destructor(), extensionstate_update(), extenspy_exec(), fake_ami(), fax_detect_framehook(), fax_gateway_framehook(), feature_automixmonitor(), feature_automonitor(), feature_ds_destroy(), featuregroup_alloc(), featuregroup_destructor(), featuregroup_handler(), featuregroup_item_destructor(), features_config_destructor(), filestream_destructor(), finalized_state_process_party_a(), find_aor(), find_bridge(), find_channel_control(), find_control(), find_variant(), fixup_callback(), forkcdr_exec(), format_ami_aor_handler(), format_ami_endpoint_identify(), format_ami_endpoint_transport(), format_cache_shutdown(), format_cap_framed_destroy(), format_contact_status(), format_destroy(), format_shutdown(), forward_dtor(), forwards_create(), forwards_create_bridge(), forwards_create_channel(), forwards_create_endpoint(), free_outgoing(), func_confbridge_data_destructor(), func_confbridge_helper(), generate_initial_notify(), generate_or_link_lots_to_configs(), generate_status(), generic_fax_exec(), generic_monitor_devstate_cb(), generic_monitor_devstate_tp_cb(), generic_mute_unmute_helper(), get_account_id(), get_cached_mwi(), get_destination(), get_exten_state_sub(), get_feature_chan_ds(), get_feature_ds(), get_languages(), get_message_count(), get_outbound_endpoint(), get_publishes_and_update_state(), get_state(), get_transfer_parties(), get_transferee(), get_write_timeout(), global_alloc(), global_config_alloc(), global_config_destructor(), grab_transfer(), handle_attended_transfer(), handle_blind_transfer(), handle_bridge_enter_message(), handle_bridge_leave_message(), handle_bridge_pairings(), handle_bridge_show_all(), handle_bridge_show_specific(), handle_call_outgoing(), handle_chanlist(), handle_channel_cache_message(), handle_channelstatus(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menu(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_debug(), handle_cli_show_config(), handle_cli_sound_show(), handle_cli_sounds_show(), handle_cli_status(), handle_cli_submit(), handle_client_registration(), handle_client_state_destruction(), handle_dial_message(), handle_feature_show(), handle_hangup(), handle_incoming_sdp(), handle_invite_replaces(), handle_negotiated_sdp_session_media(), handle_new_invite_request(), handle_parked_call_message(), handle_parking_bridge_enter_message(), handle_recordfile(), handle_registration_response(), handle_registrations(), handle_request_invite(), handle_request_subscribe(), handle_security_event(), handle_show_named_acl_cmd(), handle_show_translation_table(), handle_showchan(), handle_skel_show_config(), handle_skel_show_levels(), handle_soft_key_event_message(), handle_standard_bridge_enter_message(), handle_stimulus_message(), hangup(), has_destination_cb(), has_voicemail(), hep_queue_cb(), hepv3_config_post_apply(), hepv3_send_packet(), hold(), httpd_helper_thread(), iax2_codec_pref_string(), iax2_parse_allow_disallow(), ices_exec(), incoming_request(), internal_feature_read(), internal_feature_write(), internal_featuremap_write(), internal_stasis_subscribe(), internal_type_destroy(), interval_wrapper_pvt_dtor(), ip_identify(), ip_identify_alloc(), is_enabled(), is_subscribed_device_state(), isAnsweringMachine(), jb_framedata_destroy(), jingle_config_destructor(), jingle_endpoint_destructor(), jingle_endpoint_state_find_or_create(), jingle_request(), jingle_session_destructor(), key_main_page(), line_identify(), linear_alloc(), linear_release(), load_config(), load_endpoint(), load_module(), local_ast_moh_cleanup(), local_attended_transfer(), local_call(), local_channel_optimization_blob(), local_optimization_finished_cb(), local_optimization_started_cb(), local_pvt_destructor(), local_shutdown(), manager_bridge_info(), manager_bridge_kick(), manager_bridges_list(), manager_default_msg_cb(), manager_jabber_send(), manager_park(), manager_park_bridged(), manager_park_unbridged(), manager_parking_status_all_lots(), manager_parking_status_single_lot(), manager_shutdown(), measurenoise(), media_index_dtor(), media_info_alloc(), media_info_destroy(), media_request_helper(), media_variant_alloc(), media_variant_destroy(), meetme_stasis_generate_msg(), menu_hook_destroy(), menu_template_handler(), message_received_handler(), message_subscription_dtor(), messaging_app_subscribe_endpoint(), messaging_app_unsubscribe_endpoint(), metermaidstate(), mgcp_ss(), mkif(), moh_alloc(), moh_class_destructor(), moh_files_alloc(), moh_files_release(), moh_post_start(), moh_post_stop(), moh_release(), mp3_exec(), msg_send(), multi_channel_blob_dtor(), multi_object_blob_dtor(), multicast_rtp_request(), mwi_blob_dtor(), mwi_event_cb(), mwi_get_notify_data(), mwi_new_subscribe(), mwi_on_aor(), mwi_state_create_message(), mwi_state_dtor(), mwi_subscribe_single(), mwi_subscription_alloc(), mwi_subscription_destructor(), mwi_subscription_established(), mwi_subscription_shutdown(), mwi_to_ami(), named_acl_config_destructor(), namedgroup_match(), nat_on_rx_message(), nat_on_tx_message(), native_rtp_bridge_compatible(), native_rtp_bridge_framehook_attach(), native_rtp_bridge_framehook_detach(), native_rtp_bridge_start(), native_rtp_bridge_stop(), native_rtp_framehook(), NBScat_exec(), new_invite(), new_invite_destroy(), nocdr_exec(), notify_ami_data_destroy(), notify_cfg_alloc(), notify_cfg_destroy(), notify_cli_data_destroy(), notify_cli_uri_data_destroy(), notify_endpoint(), notify_new_message(), notify_option_alloc(), notify_option_destroy(), notify_option_handler(), notify_task(), notify_task_data_destructor(), notify_uri(), object_type_loaded_observer(), one_dtor(), ooh323_delete_peer(), ooh323_destroy(), ooh323_new(), options_on_rx_request(), origin_allowed(), originate_exec(), outbound_auth(), outgoing_request(), pack_channel_into_message(), park_and_announce_app_exec(), park_app_exec(), park_common_setup(), parked_call_app_exec(), parked_call_payload_destructor(), parked_call_payload_from_failure(), parked_call_payload_from_parked_user(), parker_parked_call_message_response(), parker_update_cb(), parking_blind_transfer_park(), parking_config_alloc(), parking_config_destructor(), parking_dynamic_lots_enabled(), parking_lot_build_or_update(), parking_lot_cfg_alloc(), parking_lot_destructor(), parking_lot_retrieve_parked_user(), parking_lot_search_context_extension_inuse(), parking_park_bridge_channel(), parking_park_call(), parking_stasis_cleanup(), path_outgoing_request(), path_outgoing_response(), pbx_outgoing_attempt(), pbx_outgoing_exec(), persistent_endpoint_find_or_create(), persistent_endpoint_update_state(), personality_destructor(), phase_e_handler(), phone_check_exception(), phone_digit_end(), phone_hangup(), phone_indicate(), phone_new(), phoneprov_alloc(), pjsip_acf_dial_contacts_read(), pjsip_aor_function_read(), pjsip_contact_function_read(), pjsip_endpoint_function_read(), play_on_channel(), play_on_channel_in_bridge(), play_sound(), play_uri(), playback_create(), playback_publish(), playtones_release(), post_cdr(), prepare_bridge_media_channel(), prepare_bridge_moh_channel(), presence_state_alloc(), presence_state_cached(), presence_state_cb(), presence_state_engine_cleanup(), presence_state_event(), process_category(), process_config(), process_description_file(), process_sdp(), publication_destroy_fn(), publish_acl_change(), publish_app_cdr_message(), publish_cache_clear(), publish_chanspy_message(), publish_expire(), publish_expire_callback(), publish_format_update(), publish_local_bridge_message(), publish_parked_call(), publish_parked_call_failure(), publish_reload_message(), publish_request_initial(), publish_transfer_fail(), publish_transfer_success(), publish_transfer_threeway(), pubsub_on_evsub_state(), pubsub_on_rx_publish_request(), pubsub_on_rx_subscribe_request(), push_notify(), push_notify_uri(), qualify_contact(), qualify_contact_cb(), qualify_data_destroy(), queue_bridge_cb(), queue_channel_cb(), queue_publish_member_blob(), queue_publish_multi_channel_blob(), queue_publish_multi_channel_snapshot_blob(), queue_stasis_data_alloc(), queue_stasis_data_destructor(), queued_set_size(), read_header(), realtime_exec(), rec_request(), recall_pull(), recalling_enter(), receivefax_exec(), record_exec(), recording_alloc(), recording_dtor(), recording_publish(), refer_attended_destroy(), refer_blind_callback(), refer_incoming_attended_request(), refer_incoming_invite_request(), refer_incoming_refer_request(), refer_progress_alloc(), refer_progress_bridge(), refer_progress_destroy(), refer_progress_framehook(), refer_progress_framehook_destroy(), refer_progress_notification_destroy(), refer_progress_notify(), refer_progress_on_evsub_state(), registrar_on_rx_request(), registrar_validate_contacts(), registration_response_destroy(), remove_all_configured_parking_lot_extensions(), remove_auth(), remove_device_states_cb(), remove_header(), replace_channel_destroy(), report_fax_status(), report_receive_fax_status(), report_send_fax_status(), request(), resetcdr_exec(), resource_list_alloc(), retransfer_enter(), retrieve_resource_list(), ringing(), root_handler_create(), router_dispatch(), rtcp_message_payload_dtor(), rtp_engine_mime_type_cleanup(), rtp_engine_shutdown(), rtp_engine_static_RTP_PT_cleanup(), rtp_payload_type_dtor(), run_station(), rx_data_to_ast_msg(), rx_task(), rx_task_data_destroy(), scan_file(), sched_data_destructor(), sdp_requires_deferral(), security_stasis_cleanup(), send_bridge_info_item_cb(), send_call_pickup_stasis_message(), send_conf_stasis(), send_options_response(), send_out_of_dialog_request(), send_request_cb(), send_request_data_destroy(), send_response(), send_start_msg(), send_start_msg_snapshots(), send_subscription_subscribe(), send_subscription_unsubscribe(), send_unsolicited_mwi_notify(), send_waveform_to_channel(), sendfax_exec(), sendtext(), serialize_showchan(), serialized_cleanup(), serialized_pubsub_on_client_refresh(), serialized_pubsub_on_server_timeout(), serialized_send_notify(), serializer_dtor(), serializer_shutdown(), session_cleanup(), session_create(), session_destroy_fn(), session_destructor(), session_end(), session_instance_destructor(), session_media_dtor(), session_outgoing_nat_hook(), session_reinvite_on_rx_request(), session_shutdown(), session_termination_cb(), set_caps(), set_config_flags(), set_format(), set_transfer_variables_all(), setup_bridge_features_dynamic(), show_sound_info_cb(), shutdown_data_create(), shutdown_subscriptions(), single_state_bridge_enter_comparison(), single_state_process_bridge_enter(), single_state_process_dial_begin(), sip_channel_destroy(), sip_destroy_peer(), sip_get_tpselector_from_endpoint(), sip_outbound_publish_alloc(), sip_outbound_publish_apply(), sip_outbound_publish_callback(), sip_outbound_publish_client_alloc(), sip_outbound_publish_client_destroy(), sip_outbound_publish_state_destroy(), sip_outbound_publish_synchronize(), sip_outbound_registration_alloc(), sip_outbound_registration_apply(), sip_outbound_registration_perform(), sip_outbound_registration_regc_alloc(), sip_outbound_registration_response_cb(), sip_outbound_registration_state_alloc(), sip_outbound_registration_state_destroy(), sip_publish_client_service_queue(), skel_config_destructor(), skel_find_or_create_state(), skel_game_destructor(), skel_level_destructor(), skinny_device_alloc(), skinny_line_alloc(), sla_add_trunk_to_station(), sla_build_station(), sla_build_trunk(), sla_check_station_delay(), sla_handle_dial_state_event(), sla_state(), sla_station_exec(), sla_trunk_exec(), smdi_interface_destroy(), smdi_load(), smdi_msg_datastore_destroy(), smdi_msg_retrieve_read(), snapshot_cep_changed(), snoop_hangup(), snoop_stasis_thread(), socket_process_helper(), softmix_bridge_leave(), softmix_translate_helper_free_entry(), sorcery_astdb_retrieve_fields_common(), sorcery_astdb_retrieve_id(), sorcery_astdb_retrieve_regex(), sorcery_cleanup(), sorcery_config_internal_load(), sorcery_config_retrieve_fields(), sorcery_config_retrieve_id(), sorcery_config_retrieve_multiple(), sorcery_config_retrieve_regex(), sorcery_destructor(), sorcery_function_read(), sorcery_internal_wizard_destructor(), sorcery_memory_delete(), sorcery_memory_update(), sorcery_object_load(), sorcery_object_type_destructor(), sorcery_object_wizard_destructor(), sorcery_observer_invocation_destroy(), sorcery_observers_notify_create(), sorcery_observers_notify_delete(), sorcery_observers_notify_loaded(), sorcery_observers_notify_update(), sorcery_realtime_retrieve_multiple(), sorcery_reloadable(), sounds_cleanup(), spandsp_fax_gateway_start(), speech_background(), start_message_blob_dtor(), start_poll_thread(), stasis_app_bridge_moh_channel(), stasis_app_bridge_moh_stop(), stasis_app_bridge_playback_channel_add(), stasis_app_control_get_snapshot(), stasis_app_control_record(), stasis_app_control_snoop(), stasis_app_exec(), stasis_app_get_all(), stasis_app_recording_find_by_name(), stasis_app_recording_options_create(), stasis_app_register(), stasis_app_send(), stasis_app_send_command_async(), stasis_app_stored_recording_find_all(), stasis_app_stored_recording_find_by_name(), stasis_app_subscribe_channel(), stasis_app_to_json(), stasis_app_unregister(), stasis_app_user_event(), stasis_bridging_cleanup(), stasis_cache_create_full(), stasis_cache_get_all(), stasis_cache_get_by_eid(), stasis_cache_update_dtor(), stasis_caching_topic_create(), stasis_caching_topic_dtor(), stasis_caching_unsubscribe(), stasis_caching_unsubscribe_and_join(), stasis_channels_cleanup(), stasis_config_destructor(), stasis_cp_all_create(), stasis_cp_single_create(), stasis_cp_single_unsubscribe(), stasis_declined_config_destructor(), stasis_forward_all(), stasis_forward_cancel(), stasis_init(), stasis_message_dtor(), stasis_message_router_create_internal(), stasis_message_router_publish_sync(), stasis_message_sink_create(), stasis_message_sink_dtor(), stasis_message_type_create(), stasis_message_type_declined(), stasis_system_cleanup(), stasis_test_message_create(), stasis_topic_create(), stasis_topic_pool_create(), stasis_topic_pool_get_topic(), stasis_unsubscribe(), stasis_unsubscribe_and_join(), state_changed(), state_changed_destroy(), statsd_init(), stun_monitor_request(), sub_cleanup(), sub_default_handler(), submit_scheduled_batch(), subscription_change_alloc(), subscription_change_dtor(), subscription_destructor(), subscription_dtor(), subscription_established(), subscription_persistence_recreate(), subscription_shutdown(), subscription_tree_destructor(), supplement_on_rx_request(), supplement_outgoing_response(), suppress_datastore_destroy_cb(), suppress_framehook_destroy_cb(), t38_automatic_reject(), t38_framehook_read(), t38_framehook_write(), t38_interpret_parameters(), t38_parameters_task_data_destroy(), t38_reinvite_response_cb(), t38_state_get_or_alloc(), test_cdr_cleanup_cb(), test_cel_generate_peer_str(), test_cel_generate_peer_str_snapshot(), test_cel_peer_strings_match(), test_config_alloc(), test_config_destructor(), test_item_destructor(), test_performance(), testsuite_notify_feature_success(), threadpool_alloc(), threadpool_destructor(), threadpool_tps_shutdown(), tonepair_release(), topic_pool_dtor(), topic_pool_entry_dtor(), transfer(), transfer_data_destroy(), transfer_pull(), transfer_target_framehook_destroy_cb(), transmit_info_dtmf(), transmit_info_with_vidupdate(), transport_alloc(), transport_apply(), transport_destroy(), try_parking(), two_bridge_attended_transfer(), udptl_config_destructor(), unbound_config_destructor(), unbound_global_config_destructor(), unhold(), unicast_rtp_request(), unistim_send_mwi_to_peer(), unload_module(), unload_observer_delete(), unref_profile(), unref_route(), unref_user(), unregister_channel_tech(), unregister_task(), unsubscribe(), unsubscribe_device_state(), update_create(), update_file_format_info(), update_header(), update_registry(), user_alloc(), username_identify(), verify_default_parking_lot(), verify_default_profiles(), wait_bridge_wrapper_alloc(), wait_wrapper_removal(), websocket_client_destroy(), websocket_server_create_impl(), websocket_server_internal_dtor(), xmpp_action_hook(), xmpp_cli_create_collection(), xmpp_cli_create_leafnode(), xmpp_cli_delete_pubsub_node(), xmpp_cli_list_pubsub_nodes(), xmpp_cli_purge_pubsub_nodes(), xmpp_client_config_post_apply(), xmpp_client_destructor(), xmpp_client_find_or_create(), xmpp_client_reconnect(), xmpp_client_send_message(), xmpp_client_set_group_presence(), xmpp_client_set_presence(), xmpp_client_thread(), xmpp_component_register_get_hook(), xmpp_component_service_discovery_get_hook(), xmpp_component_service_discovery_items_hook(), xmpp_config_destructor(), xmpp_config_post_apply(), xmpp_config_prelink(), xmpp_connect_hook(), xmpp_init_event_distribution(), xmpp_join_exec(), xmpp_leave_exec(), xmpp_log_hook(), xmpp_pak_message(), xmpp_pubsub_build_publish_skeleton(), xmpp_pubsub_handle_error(), xmpp_pubsub_iq_create(), xmpp_pubsub_publish_device_state(), xmpp_pubsub_subscribe(), xmpp_roster_hook(), xmpp_send_cb(), xmpp_send_exec(), xmpp_sendgroup_exec(), xmpp_show_buddies(), xmpp_show_clients(), and xmpp_status_exec().

#define ao2_container_alloc ( n_buckets,
hash_fn,
cmp_fn   )     ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_MUTEX, (n_buckets), (hash_fn), (cmp_fn))

Definition at line 1202 of file astobj2.h.

Referenced by __ast_channel_internal_alloc(), __init_manager(), aco_option_container_alloc(), allocate_subscription(), ast_add_hint(), ast_calendar_event_container_alloc(), ast_cdr_engine_init(), ast_cel_engine_init(), ast_channels_init(), ast_config_hook_register(), ast_config_text_file_save2(), ast_data_init(), ast_endpoint_init(), ast_indications_init(), ast_media_index_create(), ast_msg_alloc(), ast_multi_channel_blob_create(), ast_multi_channel_blob_get_channels(), ast_pbx_init(), ast_res_pjsip_initialize_configuration(), ast_sip_register_publish_handler(), ast_sip_session_alloc(), ast_sorcery_init(), AST_TEST_DEFINE(), ast_tps_init(), ast_xmpp_client_config_alloc(), build_calendar(), build_conf(), build_mansession(), confbridge_cfg_alloc(), create_mwi_subscriptions(), data_filter_alloc(), data_provider_new(), data_result_create(), data_search_alloc(), dialgroup_write(), get_lock(), init_queue(), initialize_escs(), jingle_config_alloc(), jingle_endpoint_state_create(), keepalive_global_loaded(), load_module(), load_objects(), load_odbc_config(), media_info_alloc(), mwi_subscription_alloc(), named_acl_config_alloc(), parking_config_alloc(), realtime_sqlite3_require(), sip_create_publication(), sip_outbound_publish_state_alloc(), skel_config_alloc(), sla_load_config(), sorcery_memory_open(), stasis_topic_pool_create(), test_cel_init_cb(), test_config_alloc(), threadpool_alloc(), ustmtext(), websocket_server_create_impl(), xml_translate(), xmpp_client_alloc(), xmpp_client_create_buddy(), and xmpp_config_alloc().

#define ao2_container_alloc_hash ( ao2_options,
container_options,
n_buckets,
hash_fn,
sort_fn,
cmp_fn   )     __ao2_container_alloc_hash((ao2_options), (container_options), (n_buckets), (hash_fn), (sort_fn), (cmp_fn))

#define ao2_container_alloc_list ( ao2_options,
container_options,
sort_fn,
cmp_fn   )     __ao2_container_alloc_list((ao2_options), (container_options), (sort_fn), (cmp_fn))

#define ao2_container_alloc_options ( options,
n_buckets,
hash_fn,
cmp_fn   )     ao2_container_alloc_hash((options), 0, (n_buckets), (hash_fn), NULL, (cmp_fn))

#define ao2_container_alloc_rbtree ( ao2_options,
container_options,
sort_fn,
cmp_fn   )     __ao2_container_alloc_rbtree((ao2_options), (container_options), (sort_fn), (cmp_fn))

#define ao2_container_clone ( orig,
flags   )     __ao2_container_clone(orig, flags)

Definition at line 1396 of file astobj2.h.

Referenced by ast_bucket_file_copy(), and test_container_clone().

#define ao2_find ( container,
arg,
flags   )     __ao2_find((container), (arg), (flags))

Definition at line 1769 of file astobj2.h.

Referenced by __ast_bucket_scheme_register(), __ast_codec_register(), __ast_format_cache_get(), __ast_format_interface_register(), __ast_sorcery_apply_default(), __ast_sorcery_apply_wizard_mapping(), __ast_sorcery_object_field_register(), __ast_sorcery_object_register(), __ast_sorcery_open(), __ast_sorcery_wizard_register(), __find_callno(), acf_jabberstatus_read(), action_confbridgekick(), action_confbridgelist(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), add_calltoken_ignore(), add_sdp_streams(), admin_exec(), agent_after_bridge_cb(), agent_after_bridge_cb_failed(), agent_alert(), agent_cfg_find(), agent_function_read(), agent_handle_show_specific(), agent_login_exec(), agent_logoff_request(), agent_pvt_devstate_get(), agent_request_exec(), agent_run(), agents_post_apply_config(), alloc_variant(), announce_request(), app_exec(), app_handler(), app_is_subscribed_bridge_id(), app_is_subscribed_channel_id(), app_is_subscribed_endpoint_id(), app_subscribe_bridge(), app_subscribe_channel(), app_subscribe_endpoint(), ari_show_user(), ast_add_hint(), ast_ari_config_validate_user(), ast_bridge_channel_feature_digit(), ast_bridge_find_by_id(), ast_bucket_alloc(), ast_bucket_file_alloc(), ast_bucket_file_metadata_get(), ast_bucket_file_metadata_set(), ast_bucket_file_metadata_unset(), ast_cel_backend_unregister(), ast_change_hint(), ast_channel_dialed_causes_add(), ast_channel_dialed_causes_find(), ast_codec_get(), ast_config_hook_unregister(), ast_endpoint_find_by_id(), ast_extension_state_del(), ast_format_attribute_set(), ast_format_cache_set(), ast_format_create_named(), ast_format_parse_sdp_fmtp(), ast_get_chan_applicationmap(), ast_get_feature(), ast_get_indication_zone(), ast_get_namedgroups(), ast_local_get_peer(), ast_local_setup_bridge(), ast_local_setup_masquerade(), ast_media_get_variants(), ast_merge_contexts_and_delete(), ast_multi_channel_blob_get_channel(), ast_phoneprov_provider_unregister(), ast_remove_hint(), ast_sip_lookup_cli_formatter(), ast_sip_publication_get_datastore(), ast_sip_publish_client_get(), ast_sip_publish_client_get_datastore(), ast_sip_publish_client_remove_datastore(), ast_sip_session_get_datastore(), ast_sip_session_register_sdp_handler(), ast_sip_subscription_get_datastore(), ast_sip_subscription_remove_datastore(), ast_smdi_interface_find(), ast_sorcery_alloc(), ast_sorcery_copy(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_diff(), ast_sorcery_get_object_type(), ast_sorcery_is_object_field_registered(), ast_sorcery_load_object(), ast_sorcery_object_fields_register(), ast_sorcery_object_set_copy_handler(), ast_sorcery_object_set_diff_handler(), ast_sorcery_objectset_apply(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_observer_add(), ast_sorcery_observer_remove(), ast_sorcery_reload_object(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_module_name(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_sorcery_wizard_observer_add(), ast_sorcery_wizard_observer_remove(), ast_sorcery_wizard_unregister(), ast_str_container_remove(), ast_taskprocessor_create_with_listener(), ast_taskprocessor_get(), AST_TEST_DEFINE(), ast_unregister_indication_country(), ast_websocket_server_add_protocol(), ast_websocket_server_remove_protocol(), ast_websocket_uri_cb(), authenticate_request(), authenticate_verify(), bridge_agent_hold_push(), bridge_app_subscribed(), bridge_handle_dtmf(), bridge_profile_find(), bucket_file_wizard_retrieve(), bucket_wizard_retrieve(), build_callno_limits(), build_peer(), build_user(), cache_find(), cel_linkedid_ref(), cel_track_app(), chan_pjsip_add_hold(), chan_pjsip_get_hold(), chan_pjsip_new(), chan_pjsip_remove_hold(), check_featuregroup_item(), check_manager_session_inuse(), check_retire_linkedid(), cli_alias_passthrough(), cli_channel_retrieve_by_id(), cli_contact_retrieve_by_id(), cli_fax_show_session(), cli_retrieve_by_id(), client_buddy_handler(), compare_weight(), complete_confbridge_participant(), complete_indications(), conf_find_bridge_profile(), conf_find_user_profile(), conf_handle_talker_cb(), conf_set_menu_to_user(), contact_expiration_observer_deleted(), contact_expiration_observer_updated(), data_filter_find(), data_provider_find(), data_result_find_child(), data_search_find(), dial_state_process_bridge_enter(), dialgroup_read(), dialgroup_write(), endpoint_internal_create(), endpoint_receives_unsolicited_mwi_for_mailbox(), extension_state_add_destroy(), featuregroup_find(), find_app_by_name(), find_calendar(), find_database(), find_device_state_subscription(), find_event(), find_hint_by_cb_id(), find_member_by_queuename_and_interface(), find_peer(), find_profile(), find_provider(), find_pvt(), find_user(), find_variant(), func_confbridge_info(), generic_lock_unlock_helper(), generic_mute_unmute_helper(), get_dialstatus_blob(), get_esc_entry(), get_global_cfg(), get_state(), get_subscription(), get_system_cfg(), handle_bridge_enter_message(), handle_bridge_leave_message(), handle_bridge_pairings(), handle_channel_cache_message(), handle_cli_confbridge_kick(), handle_cli_confbridge_list(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), handle_cli_iax2_unregister(), handle_cli_indication_show(), handle_dial_message(), handle_incoming_sdp(), handle_msg_cb(), handle_negotiated_sdp_session_media(), handle_parked_call_message(), has_destination_cb(), hash_test_lookup(), hash_test_shrink(), iax2_destroy_helper(), inprocess_count(), insert_test_duplicates(), jingle_action_hook(), jingle_endpoint_find(), jingle_request(), join_conference_bridge(), keepalive_transport_state_callback(), manager_fax_session(), manager_optimize_away(), meetme_menu_admin(), meetmemute(), menu_find(), menu_template_handler(), msg_data_find(), named_acl_find(), named_item_find(), namedgroup_match(), notify_option_find(), parse_tone_zone(), peercnt_add(), peercnt_modify(), peercnt_remove_by_addr(), persistent_endpoint_find_or_create(), phoneprov_callback(), pubsub_on_rx_publish_request(), realtime_common(), realtime_sqlite3_require(), reload_single_member(), remove_bridge_moh(), remove_bridge_playback(), remove_from_queue(), sched_delay_remove(), sdp_requires_deferral(), serializer_find_or_create(), session_media_dtor(), session_outgoing_nat_hook(), set_fn(), single_state_process_bridge_enter(), sip_outbound_publish_apply(), sip_outbound_registration_apply(), sip_poke_peer_s(), skel_find_or_create_state(), skel_level_find(), sla_find_station(), sla_find_trunk(), smdi_load(), smdi_msg_find(), sorcery_config_retrieve_id(), sorcery_memory_delete(), sorcery_memory_retrieve_id(), sorcery_memory_update(), sorcery_reloadable(), stasis_app_bridge_find_by_id(), stasis_app_bridge_moh_channel(), stasis_app_bridge_moh_stop(), stasis_app_bridge_playback_channel_find(), stasis_app_control_find_by_channel_id(), stasis_app_control_record(), stasis_app_exec(), stasis_app_playback_find_by_id(), stasis_app_recording_find_by_name(), stasis_app_register(), stasis_app_send(), stasis_app_unregister(), stasis_message_type_declined(), stasis_topic_pool_get_topic(), t38_automatic_reject(), t38_framehook_read(), t38_framehook_write(), t38_interpret_parameters(), t38_reinvite_response_cb(), test_ao2_find_w_no_flags(), test_ao2_find_w_OBJ_KEY(), test_ao2_find_w_OBJ_PARTIAL_KEY(), test_ao2_find_w_OBJ_POINTER(), test_cel_peer_strings_match(), test_expected_duplicates(), test_item_find(), test_performance(), unschedule_qualify(), unsubscribe(), update_queue(), user_find(), user_profile_find(), ustmtext(), verify_default_parking_lot(), verify_default_profiles(), wait_bridge_wrapper_find_by_name(), xml_translate(), xmpp_client_config_merge_buddies(), xmpp_client_service_discovery_result_hook(), xmpp_component_register_get_hook(), xmpp_config_find(), xmpp_pak_message(), xmpp_pak_presence(), xmpp_pak_s10n(), xmpp_roster_hook(), and xmpp_status_exec().

#define ao2_global_obj_ref ( holder   )     __ao2_global_obj_ref(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

Examples:
/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 800 of file astobj2.h.

Referenced by __ast_manager_event_multichan(), __ast_vm_greeter_register(), __ast_vm_register(), acf_jabberreceive_read(), acf_jabberstatus_read(), agent_run(), agents_post_apply_config(), app_exec(), ast_ari_config_get(), ast_cdr_engine_reload(), ast_cdr_engine_term(), ast_cdr_get_config(), ast_cdr_is_enabled(), ast_cdr_serialize_variables(), ast_cdr_set_config(), ast_cel_backend_register(), ast_cel_backend_unregister(), ast_cel_check_enabled(), ast_cel_fabricate_channel_from_event(), ast_cel_get_config(), ast_cel_set_config(), ast_cel_track_event(), ast_get_builtin_feature(), ast_get_chan_applicationmap(), ast_get_chan_featuremap_config(), ast_get_chan_features_general_config(), ast_get_chan_features_pickup_config(), ast_get_chan_features_xfer_config(), ast_named_acl_find(), ast_parking_blind_transfer_park(), ast_parking_is_exten_park(), ast_parking_park_bridge_channel(), ast_parking_park_call(), ast_parking_provider_registered(), ast_parking_register_bridge_features(), ast_parking_unregister_bridge_features(), ast_sip_publish_client_get(), ast_smdi_interface_find(), ast_statsd_log_full(), AST_TEST_DEFINE(), ast_udptl_new_with_bindaddr(), ast_vm_greeter_is_registered(), ast_vm_greeter_unregister(), ast_vm_is_registered(), ast_vm_unregister(), ast_xmpp_client_find(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), base_process_party_a(), bridge_agent_hold_deferred_create(), bridge_candidate_add_to_cdr(), bridge_candidate_process(), build_mansession(), build_nonce(), cdr_detach(), cdr_object_alloc(), cdr_object_check_party_a_answer(), cdr_object_check_party_a_hangup(), cdr_object_dispatch(), cdr_object_get_billsec(), cdr_object_set_disposition(), cdr_object_transition_state(), cdr_submit_batch(), cdr_toggle_runtime_options(), cel_linkedid_ref(), cel_report_event(), cel_track_app(), check_manager_session_inuse(), check_new_cdr_needed(), check_retire_linkedid(), cli_complete_notify(), cli_display_named_acl(), cli_display_named_acl_list(), cli_notify(), cli_retrieve_by_id(), complete_bridge_profile_name(), complete_menu_name(), complete_user_profile_name(), conf_find_bridge_profile(), conf_find_user_profile(), conf_set_menu_to_user(), create_mwi_subscriptions(), delete_old_messages(), dial_status_to_disposition(), endpoint_receives_unsolicited_mwi_for_mailbox(), finalized_state_process_party_a(), find_session(), find_session_by_nonce(), function_amiclient(), generate_or_link_lots_to_configs(), get_dialstatus_blob(), get_feature_ds(), get_state(), handle_bridge_enter_message(), handle_bridge_leave_message(), handle_channel_cache_message(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menu(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_debug(), handle_cli_show_config(), handle_cli_status(), handle_cli_submit(), handle_dial_message(), handle_feature_show(), handle_parked_call_message(), handle_parking_bridge_enter_message(), handle_show_named_acl_cmd(), handle_showmanconn(), handle_skel_show_config(), handle_skel_show_levels(), handle_standard_bridge_enter_message(), hep_queue_cb(), hepv3_config_post_apply(), hepv3_send_packet(), is_enabled(), jingle_endpoint_state_find_or_create(), jingle_request(), line_identify(), manager_jabber_send(), parking_dynamic_lots_enabled(), post_cdr(), purge_sessions(), registration_loaded_observer(), remove_all_configured_parking_lot_extensions(), save_dialstatus(), session_destroy(), single_state_bridge_enter_comparison(), single_state_process_dial_begin(), sip_outbound_publish_apply(), sip_outbound_publish_synchronize(), sip_outbound_registration_apply(), skel_find_or_create_state(), smdi_load(), snapshot_cep_changed(), sorcery_config_retrieve_fields(), sorcery_config_retrieve_id(), sorcery_config_retrieve_multiple(), sorcery_config_retrieve_regex(), stasis_init(), stasis_message_type_declined(), statsd_init(), submit_scheduled_batch(), unbound_resolver_resolve(), unload_module(), xmpp_action_hook(), xmpp_cli_create_collection(), xmpp_cli_create_leafnode(), xmpp_cli_delete_pubsub_node(), xmpp_cli_list_pubsub_nodes(), xmpp_cli_purge_pubsub_nodes(), xmpp_client_config_post_apply(), xmpp_client_find_or_create(), xmpp_client_reconnect(), xmpp_client_send_message(), xmpp_client_set_group_presence(), xmpp_client_set_presence(), xmpp_client_thread(), xmpp_component_register_get_hook(), xmpp_component_service_discovery_get_hook(), xmpp_component_service_discovery_items_hook(), xmpp_config_post_apply(), xmpp_config_prelink(), xmpp_connect_hook(), xmpp_init_event_distribution(), xmpp_join_exec(), xmpp_leave_exec(), xmpp_log_hook(), xmpp_pubsub_build_publish_skeleton(), xmpp_pubsub_handle_error(), xmpp_pubsub_iq_create(), xmpp_pubsub_publish_device_state(), xmpp_pubsub_subscribe(), xmpp_roster_hook(), xmpp_send_cb(), xmpp_send_exec(), xmpp_sendgroup_exec(), xmpp_show_buddies(), xmpp_show_clients(), and xmpp_status_exec().

#define ao2_global_obj_release ( holder   )     __ao2_global_obj_release(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

#define ao2_global_obj_replace ( holder,
obj   )     __ao2_global_obj_replace(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

Definition at line 742 of file astobj2.h.

Referenced by unload_module().

#define ao2_global_obj_replace_unref ( holder,
obj   )     __ao2_global_obj_replace_unref(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

#define AO2_GLOBAL_OBJ_STATIC ( name   ) 

Define a global object holder to be used to hold an ao2 object, statically initialized.

Since:
11.0
Parameters:
name This will be the name of the object holder.
This macro creates a global object holder that can be used to hold an ao2 object accessible using the API. The structure is allocated and initialized to be empty.

Example usage:

 static AO2_GLOBAL_OBJ_STATIC(global_cfg);

This defines global_cfg, intended to hold an ao2 object accessible using an API.

Examples:
/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 669 of file astobj2.h.

#define ao2_iterator_next ( iter   )     __ao2_iterator_next((iter))

Definition at line 1944 of file astobj2.h.

Referenced by __ast_data_search_cmp_structure(), __ast_manager_event_multichan(), __data_result_print_cli(), __find_call(), __iax2_show_peers(), __queues_show(), __test_cel_generate_peer_str(), aco_set_defaults(), action_agents(), action_confbridgelistrooms(), action_coreshowchannels(), action_devicestatelist(), action_extensionstatelist(), action_meetmelist(), action_presencestatelist(), add_ice_to_sdp(), add_ice_to_stream(), agent_show_requested(), agents_post_apply_config(), agents_sweep(), alias_show(), app_to_json(), ast_add_hint(), ast_ari_bridges_list(), ast_ari_channels_list(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), ast_ari_recordings_list_stored(), ast_bridge_channel_kick(), ast_bucket_file_json(), ast_bucket_json(), ast_cdr_setvar(), ast_channel_iterator_next(), ast_complete_channels(), ast_data_iterator_next(), ast_data_search_match(), ast_endpoint_snapshot_create(), ast_merge_contexts_and_delete(), ast_msg_var_iterator_next(), ast_multi_channel_blob_get_channels(), ast_pickup_find_by_group(), ast_print_namedgroups(), ast_sip_for_each_contact(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_regex(), ast_srtp_unprotect(), AST_TEST_DEFINE(), ast_var_indications(), ast_var_indications_table(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), auth_observer(), authenticate(), authenticate_reply(), bridge_app_subscribed_involved(), bridge_channel_event_join_leave(), bridge_channel_moving(), bridge_channel_talking(), build_cli_notify(), calendar_query_exec(), cel_generate_peer_str(), check_access(), check_events(), clear_queue(), cli_complete_endpoint(), cli_complete_notify(), cli_complete_registration(), cli_complete_show(), cli_console_active(), cli_display_named_acl_list(), cli_fax_show_sessions(), cli_list_devices(), cli_show_channels(), cli_tps_report(), complete_bridge_profile_name(), complete_bridge_stasis(), complete_confbridge_name(), complete_core_show_hint(), complete_country(), complete_iax2_peers(), complete_iax2_unregister(), complete_menu_name(), complete_queue_remove_member(), complete_user_profile_name(), complete_userno(), conf_queue_dtmf(), config_hook_exec(), configure_parking_extensions(), container_to_json_array(), control_dispatch_all(), control_prestart_dispatch_all(), data_filter_find(), data_odbc_provider_handler(), data_provider_print_cli(), data_provider_release_all(), data_result_generate_node(), data_result_manager_output(), destroy_pvts(), device_state_cb(), dial_state_process_bridge_enter(), dialgroup_read(), disable_marked_lots(), dump_queue_members(), endpoint_receives_unsolicited_mwi_for_mailbox(), extension_state_cb(), fax_session_tab_complete(), find_queue_by_name_rt(), find_ringing_channel(), find_session(), find_session_by_nonce(), free_members(), generate_or_link_lots_to_configs(), get_device_state_causing_channels(), get_member_status(), get_transferee(), get_write_timeout(), handle_bridge_pairings(), handle_bridge_show_all(), handle_chanlist(), handle_cli_confbridge_list(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_iax2_show_callno_limits(), handle_cli_iax2_show_users(), handle_cli_indication_show(), handle_cli_odbc_show(), handle_cli_sound_show(), handle_cli_status(), handle_show_calendar(), handle_show_calendars(), handle_show_hint(), handle_show_hints(), handle_show_named_acl_cmd(), handle_showmanconn(), handle_skel_show_games(), handle_skel_show_levels(), hints_data_provider_get(), iax2_getpeername(), iax2_getpeertrunk(), interface_exists(), jingle_add_google_candidates_to_transport(), jingle_add_ice_udp_candidates_to_transport(), jingle_request(), load_users(), local_devicestate(), locals_show(), manager_fax_sessions(), manager_iax2_show_peer_list(), manager_parking_status_all_lots(), manager_parking_status_single_lot(), manager_queues_status(), manager_queues_summary(), mark_lots_as_disabled(), meetme_menu_admin_extended(), meetme_show_cmd(), moh_rescan_files(), msg_func_write(), multihomed_get_udp_transport(), mwi_initial_events(), mwi_mailbox_delete_all(), mwi_mailbox_get(), mwi_subscription_mailboxes_str(), num_available_members(), parking_lot_get_space(), peers_data_provider_get(), pjsip_acf_dial_contacts_read(), pjsip_aor_function_read(), poke_all_peers(), pp_each_user_helper(), presence_state_cb(), prune_peers(), prune_users(), purge_sessions(), queue_function_mem_read(), queue_function_qac_dep(), queue_function_queuememberlist(), queues_data_provider_get(), queues_data_provider_get_helper(), reload(), remove_all_configured_parking_lot_extensions(), remove_pending_parking_lot_extensions(), rt_handle_member_record(), session_shutdown(), set_transfer_variables_all(), show_codecs(), single_state_process_bridge_enter(), sip_outbound_publish_synchronize(), sla_calc_station_delays(), sla_change_trunk_state(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), stasis_app_mailboxes_to_json(), stop_streams(), system_create_resolver_and_set_nameservers(), test_ao2_callback_traversal(), test_ao2_iteration(), test_expected_duplicates(), test_iterator_next(), tps_taskprocessor_tab_complete(), try_calling(), unbound_config_preapply(), update_realtime_members(), users_data_provider_get(), xmpp_pubsub_create_affiliations(), xmpp_show_buddies(), and xmpp_show_clients().

#define ao2_link ( container,
obj   )     __ao2_link((container), (obj), 0)

Definition at line 1543 of file astobj2.h.

Referenced by __allocate_taskprocessor(), __ast_channel_alloc_ap(), __ast_sorcery_apply_wizard_mapping(), __ast_sorcery_object_field_register(), _ast_odbc_request_obj2(), activate_thread(), add_calltoken_ignore(), add_column_name(), add_item(), add_new_event_cb(), add_session_media(), agents_post_apply_config(), alloc_variant(), app_exec(), append_event(), applicationmap_handler(), ast_add_hint(), ast_bridge_dtmf_hook(), ast_bridge_peers_nolock(), ast_bucket_file_metadata_set(), ast_cel_backend_register(), ast_change_hint(), ast_change_name(), ast_channel_dialed_causes_add(), ast_config_hook_register(), ast_extension_state3(), ast_get_chan_applicationmap(), ast_get_namedgroups(), ast_merge_contexts_and_delete(), ast_multi_channel_blob_add_channel(), ast_multi_channel_blob_get_channels(), ast_phoneprov_add_extension(), ast_phoneprov_provider_register(), ast_register_indication_country(), ast_sip_publication_add_datastore(), ast_sip_publish_client_add_datastore(), ast_sip_register_cli_formatter(), ast_sip_session_add_datastore(), ast_sip_session_register_sdp_handler(), ast_sip_subscription_add_datastore(), ast_smdi_md_message_push(), ast_smdi_mwi_message_push(), ast_sorcery_global_observer_add(), ast_sorcery_instance_observer_add(), ast_sorcery_object_fields_register(), ast_sorcery_observer_add(), ast_sorcery_wizard_observer_add(), ast_str_container_add(), AST_TEST_DEFINE(), astobj2_test_1_helper(), bridge_other_hook(), bridge_register(), build_calendar(), build_callno_limits(), build_device(), build_mansession(), build_profile(), build_route(), cache_dump_by_eid_cb(), cache_entry_dump(), caldav_add_event(), cel_linkedid_ref(), chan_pjsip_add_hold(), channel_do_masquerade(), channel_replaced_cb(), cli_channel_populate_container(), cli_contact_populate_container(), cli_populate_container(), command_prestart_queue_command(), conf_run(), contact_expiration_observer_created(), contact_link_static(), create_mwi_subscriptions_for_endpoint(), create_new_sip_etag(), data_filter_add_child(), data_provider_add_child(), data_result_add_child(), data_search_add_child(), dialgroup_write(), endelm(), endpoint_internal_create(), extension_state_add_destroy(), fax_session_new(), featuregroup_handler(), find_channel_by_group(), generate_parked_user(), get_lock(), get_or_create_subscription(), grow(), handle_channel_cache_message(), hash_test_grow(), icalendar_add_event(), inprocess_count(), insert_test_duplicates(), insert_test_vector(), jingle_action_session_initiate(), jingle_request(), join_conference_bridge(), keepalive_transport_state_callback(), link_option_to_types(), load_config(), local_request(), member_add_to_queue(), merge_container_cb(), msg_set_var_full(), mwi_mailbox_get(), mwi_on_aor(), notify_option_handler(), odbc_register_class(), on_dns_update_peer(), parking_lot_build_or_update(), parse_config(), parse_tag(), peercnt_add(), permanent_uri_handler(), process_category(), pubsub_on_rx_publish_request(), queued_active_thread_idle(), realtime_common(), realtime_peer(), realtime_user(), reload_single_member(), save_dialstatus(), scan_file(), schedule_qualify(), serializer_find_or_create(), set_config(), set_fn(), sip_monitor_instance_init(), sip_outbound_publish_apply(), sip_outbound_registration_apply(), sla_build_station(), sla_build_trunk(), smdi_load(), sorcery_astdb_retrieve_fields_common(), sorcery_astdb_retrieve_regex(), sorcery_config_fields_cmp(), sorcery_config_internal_load(), sorcery_memory_create(), sorcery_memory_fields_cmp(), sorcery_memory_update(), sorcery_realtime_retrieve_multiple(), stasis_app_bridge_create(), stasis_app_bridge_playback_channel_add(), stasis_app_control_play_uri(), stasis_app_control_record(), stasis_app_exec(), store_by_peercallno(), store_by_transfercallno(), subscribe_device_state(), test_performance(), test_sub(), ustmtext(), verify_default_parking_lot(), verify_default_profiles(), wait_bridge_wrapper_alloc(), xml_translate(), xmpp_client_config_merge_buddies(), xmpp_client_create_buddy(), and zombify_threads().

#define ao2_link_flags ( container,
obj,
flags   )     __ao2_link((container), (obj), (flags))

#define ao2_lock ( a   )     __ao2_lock(a, AO2_LOCK_REQ_MUTEX, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

Definition at line 599 of file astobj2.h.

Referenced by __ast_manager_event_multichan(), __ast_sorcery_wizard_register(), __queues_show(), _ast_odbc_request_obj2(), _sip_show_peer(), _sip_show_peers(), _sip_show_peers_one(), _sip_tcp_helper_thread(), action_confbridgelist(), action_confbridgelistrooms(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), action_extensionstatelist(), action_kick_last(), action_toggle_mute_participants(), action_waitevent(), add_calltoken_ignore(), add_sdp(), add_to_queue(), aoro2_obj_cb(), app_exec(), app_handler(), ari_bridges_play_found(), ari_bridges_play_new(), ast_add_hint(), ast_ari_applications_list(), ast_cdr_clear_property(), ast_cdr_getvar(), ast_cdr_reset(), ast_cdr_serialize_variables(), ast_cdr_set_property(), ast_cdr_setuserfield(), ast_cdr_setvar(), ast_change_hint(), ast_change_name(), ast_dns_resolve_recurring_cancel(), ast_endpoint_add_channel(), ast_endpoint_set_max_channels(), ast_endpoint_set_state(), ast_extension_state_del(), ast_get_indication_tone(), ast_get_indication_zone(), ast_hook_send_action(), ast_local_get_peer(), ast_local_setup_bridge(), ast_local_setup_masquerade(), ast_manager_unregister(), ast_merge_contexts_and_delete(), ast_odbc_direct_execute(), ast_odbc_find_table(), ast_odbc_prepare_and_execute(), ast_odbc_smart_execute(), ast_register_indication_country(), ast_remove_hint(), ast_set_indication_country(), ast_sip_session_suspend(), ast_sip_session_unsuspend(), ast_taskprocessor_execute(), ast_taskprocessor_is_task(), ast_threadpool_shutdown(), ast_unreal_answer(), ast_unreal_channel_push_to_bridge(), ast_unreal_digit_begin(), ast_unreal_digit_end(), ast_unreal_fixup(), ast_unreal_lock_all(), ast_unreal_queryoption(), ast_unreal_sendhtml(), ast_unreal_sendtext(), ast_unreal_setoption(), ast_unreal_write(), ast_unregister_indication_country(), ast_websocket_close(), ast_websocket_server_add_protocol(), ast_websocket_write(), ast_xmpp_client_lock(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), auth_http_callback(), bridge_manager_destroy(), bridge_manager_service_req(), bridge_manager_thread(), bridge_move(), bridge_parking_pull(), build_callno_limits(), build_peer(), build_reply_digest(), calendar_destructor(), cdr_object_dispatch_all_cb(), cel_linkedid_ref(), change_callid_pvt(), channel_do_masquerade(), check_retire_linkedid(), cleanup_registration(), clear_stats(), cli_fax_show_sessions(), cli_show_channel(), compare_weight(), complete_core_show_hint(), complete_queue_remove_member(), complete_sip_user(), conf_announce_channel_depart(), conf_announce_channel_push(), conf_ended(), conf_find_bridge_profile(), conf_find_menu_entry_by_sequence(), conf_find_user_profile(), conf_moh_suspend(), conf_moh_unsuspend(), conf_run(), control_wait(), create_addr_from_peer(), create_dynamic_lot_full(), data_odbc_provider_handler(), db_destructor(), db_open(), db_sync_thread(), device_state_cb(), dial_masquerade_breakdown(), dial_masquerade_datastore_remove_chan(), dial_masquerade_fixup(), dial_state_process_bridge_enter(), dns_query_recurring_resolution_callback(), dns_query_recurring_scheduled_callback(), endpoint_cache_clear(), exec_command_on_condition(), execute_menu_entry(), execute_state_callback(), extension_state_add_destroy(), extension_state_cb(), find_member_by_queuename_and_interface(), find_queue_by_name_rt(), find_session(), find_session_by_nonce(), func_confbridge_info(), generate_parked_user(), generic_http_callback(), generic_lock_unlock_helper(), get_input(), get_member_penalty(), get_member_status(), handle_attended_transfer(), handle_blind_transfer(), handle_bridge_leave_message(), handle_channel_cache_message(), handle_cli_confbridge_list(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menu(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), handle_cli_misdn_send_facility(), handle_cli_odbc_show(), handle_dial_message(), handle_hangup(), handle_parked_call_message(), handle_parking_bridge_enter_message(), handle_request_subscribe(), handle_show_hint(), handle_show_hints(), handle_showmanconn(), handle_standard_bridge_enter_message(), handle_video_on_exit(), handle_video_on_join(), inprocess_count(), is_our_turn(), jingle_fixup(), jingle_hangup(), jingle_new(), jingle_request(), jingle_session_lock_full(), join_conference_bridge(), join_queue(), kqueue_timer_ack(), kqueue_timer_disable_continuous(), kqueue_timer_enable_continuous(), kqueue_timer_set_rate(), leave_conference(), leave_marked(), leave_queue(), load_indications(), local_call(), local_devicestate(), local_hangup(), locals_show(), manager_fax_sessions_entry(), manager_optimize_away(), manager_queues_status(), manager_queues_summary(), manager_show_registry(), manager_sip_peer_status(), member_add_to_queue(), member_call_pending_clear(), member_call_pending_set(), member_remove_from_queue(), messaging_app_subscribe_endpoint(), messaging_app_unsubscribe_endpoint(), moh_class_destructor(), moh_release(), mohalloc(), monmp3thread(), msg_data_func_read(), msg_data_func_write(), msg_func_read(), msg_func_write(), msg_send_exec(), on_dns_update_peer(), park_common_setup(), parking_duration_callback(), parking_lot_retrieve_parked_user(), parking_lot_search_context_extension_inuse(), parking_park_bridge_channel(), pbx_outgoing_attempt(), pbx_outgoing_exec(), peercnt_add(), peercnt_remove(), peers_data_provider_get(), presence_state_cb(), process_events(), process_message(), pthread_timer_ack(), pthread_timer_disable_continuous(), pthread_timer_enable_continuous(), pthread_timer_get_event(), pthread_timer_open(), pthread_timer_set_rate(), publish_msg(), purge_sessions(), queue_function_mem_read(), queue_function_mem_write(), queue_function_qac_dep(), queue_function_queuegetchannel(), queue_function_queuememberlist(), queue_function_queuewaitingcount(), queue_function_var(), queues_data_provider_get(), realtime_sqlite3_execute_handle(), recalc_holdtime(), record_abandoned(), register_verify(), reload(), reload_queues(), reload_single_member(), reload_single_queue(), remove_from_queue(), ring_entry(), rna(), run_timer(), schedule_calendar_event(), session_do(), set_dial_masquerade(), set_eventmask(), set_member_paused(), set_member_penalty_help_members(), set_member_ringinuse_help_members(), set_queue_variables(), single_state_process_bridge_enter(), sip_keepalive_all_peers(), sip_outbound_publish_timer_cb(), sip_outbound_registration_apply(), sip_poke_all_peers(), sip_prune_realtime(), sip_send_all_mwi_subscriptions(), sip_send_all_registers(), sip_send_mwi_to_peer(), sip_session_suspend_task(), sip_show_inuse(), sip_show_mwi(), sip_show_objects(), sip_show_registry(), sip_show_user(), sip_show_users(), sip_tcptls_write(), sla_add_trunk_to_station(), sla_build_station(), sla_build_trunk(), sla_change_trunk_state(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_station_exec(), sla_station_is_marked(), sla_station_mark(), sla_trunk_is_marked(), sla_trunk_mark(), sorcery_memory_update(), spandsp_fax_cli_show_session(), spandsp_manager_fax_session(), stasis_app_control_execute_until_exhausted(), stasis_app_register(), stasis_message_router_add(), stasis_message_router_add_cache_update(), stasis_message_router_remove(), stasis_message_router_remove_cache_update(), stasis_message_router_set_default(), stasis_message_router_unsubscribe(), stimulate_attended_transfer(), taskprocessor_push(), test_lock(), threadpool_execute(), timerfd_timer_ack(), timerfd_timer_disable_continuous(), timerfd_timer_enable_continuous(), timerfd_timer_get_event(), timerfd_timer_set_rate(), try_calling(), unload_module(), unreal_queue_frame(), unreal_queue_indicate(), update_call_counter(), update_peer_lastmsgssent(), update_queue(), update_realtime_members(), wait_wrapper_removal(), xmpp_client_service_discovery_result_hook(), xmpp_pak_presence(), and xmpp_pak_s10n().

#define ao2_rdlock ( a   )     __ao2_lock(a, AO2_LOCK_REQ_RDLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

#define ao2_ref ( o,
delta   )     __ao2_ref((o), (delta))

Examples:
/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 520 of file astobj2.h.

Referenced by __aco_option_register(), __allocate_taskprocessor(), __analog_ss_thread(), __ao2_cleanup(), __ast_channel_alloc_ap(), __ast_codec_register(), __ast_data_add(), __ast_data_register(), __ast_data_search_cmp_structure(), __ast_format_interface_register(), __ast_module_user_add(), __ast_module_user_hangup_all(), __ast_module_user_remove(), __ast_read(), __ast_sorcery_open(), __data_result_print_cli(), __features_config_alloc(), __find_callno(), __init_manager(), __queues_show(), __sip_destroy(), __unload_module(), _ast_odbc_request_obj2(), _sip_tcp_helper_thread(), acf_faxopt_read(), acf_faxopt_write(), acf_jabberstatus_read(), aco_option_register_deprecated(), aco_process_var(), aco_set_defaults(), acquire_bridge(), action_agents(), action_confbridgekick(), action_confbridgelist(), action_confbridgelistrooms(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), action_coreshowchannels(), action_devicestatelist(), action_extensionstatelist(), action_meetmelist(), action_messagesend(), action_presencestatelist(), add_calltoken_ignore(), add_cc_call_info_to_response(), add_column_name(), add_datastore(), add_event_to_list(), add_format_information_cb(), add_hintdevice(), add_ice_to_sdp(), add_ice_to_stream(), add_item(), add_sdp(), add_to_queue(), admin_exec(), agent_after_bridge_cb(), agent_after_bridge_cb_failed(), agent_alert(), agent_bridge_channel_get_lock(), agent_function_read(), agent_handle_show_specific(), agent_pvt_devstate_get(), agent_pvt_new(), agent_request_exec(), agent_run(), agent_show_requested(), agents_cfg_alloc(), agents_post_apply_config(), agents_sweep(), alias_show(), alloc_notify_task_data(), alloc_playback_chan(), alloc_variant(), allocate_subscription(), allocate_subscription_tree(), ami_contact_cb(), ami_outbound_registration_task(), ami_sip_qualify(), analog_ss_thread(), announce_hangup(), announce_request(), announce_thread(), aoc_publish_blob(), app_create(), app_exec(), app_send(), app_update(), ast_add_hint(), ast_ari_add_handler(), ast_ari_bridges_list(), ast_ari_channels_list(), ast_ari_config_validate_user(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), ast_ari_endpoints_send_message_to_endpoint(), ast_ari_remove_handler(), ast_ari_websocket_session_create(), ast_bridge_blob_create(), ast_bridge_channel_feature_digit(), ast_bridge_channel_kick(), ast_bridge_channel_lock_bridge(), ast_bridge_channel_merge_inhibit(), ast_bridge_depart(), ast_bridge_destroy(), ast_bridge_dtmf_hook(), ast_bridge_features_cleanup(), ast_bridge_impart(), ast_bridge_interval_hook(), ast_bridge_join(), ast_bridge_notify_masquerade(), ast_bridge_parking_init(), ast_bridge_snapshot_create(), ast_bridge_snapshot_get_latest(), ast_bucket_alloc(), ast_bucket_file_alloc(), ast_bucket_file_copy(), ast_bucket_file_json(), ast_bucket_json(), ast_calendar_unref_event(), ast_cdr_fork(), ast_cdr_get_config(), ast_cdr_set_config(), ast_cel_backend_register(), ast_cel_backend_unregister(), ast_cel_engine_init(), ast_cel_general_config_alloc(), ast_cel_get_config(), ast_cel_set_config(), ast_change_hint(), ast_channel_bridge_peer(), ast_channel_dialed_causes_add(), ast_channel_get_bridge(), ast_channel_get_bridge_channel(), ast_channel_get_manager_vars(), ast_channel_get_vars(), ast_channel_snapshot_get_latest(), ast_channel_snapshot_get_latest_by_name(), ast_channel_suppress(), ast_closestream(), ast_codec_samples_count(), ast_complete_channels(), ast_config_hook_register(), ast_config_text_file_save2(), ast_data_add_codecs(), ast_data_free(), ast_data_iterator_end(), ast_data_iterator_next(), ast_data_search_match(), ast_dns_resolve(), ast_dns_resolve_async(), ast_dns_resolve_recurring(), ast_dns_resolve_recurring_cancel(), ast_endpoint_blob_create(), ast_endpoint_latest_snapshot(), ast_endpoint_shutdown(), ast_endpoint_snapshot_create(), ast_extension_state3(), ast_extension_state_del(), ast_extension_state_extended(), ast_format_attribute_set(), ast_format_cap_append_by_type(), ast_format_cap_get_best_by_type(), ast_format_cap_get_compatible(), ast_format_cap_get_format(), ast_format_cap_remove_by_type(), ast_format_clone(), ast_format_create_named(), ast_format_parse_sdp_fmtp(), ast_get_chan_applicationmap(), ast_get_chan_featuremap_config(), ast_get_chan_features_general_config(), ast_get_chan_features_pickup_config(), ast_get_chan_features_xfer_config(), ast_get_namedgroups(), ast_iax2_new(), ast_local_get_peer(), ast_local_init(), ast_local_setup_bridge(), ast_local_setup_masquerade(), ast_manager_event_blob_create(), ast_media_get_media(), ast_media_get_variants(), ast_media_index_create(), ast_merge_contexts_and_delete(), ast_moh_destroy(), ast_msg_alloc(), ast_msg_destroy(), ast_msg_get_var(), ast_msg_queue(), ast_msg_ref(), ast_msg_send(), ast_msg_var_iterator_next(), ast_multi_channel_blob_add_channel(), ast_multi_channel_blob_create(), ast_multi_channel_blob_get_channel(), ast_multi_channel_blob_get_channels(), ast_multi_object_blob_create(), ast_multi_object_blob_single_channel_publish(), ast_mwi_blob_create(), ast_mwi_create(), ast_mwi_mailbox_delete_all(), ast_mwi_mailbox_delete_by_regex(), ast_openstream_full(), ast_openvstream(), ast_parked_call_payload_create(), ast_phoneprov_provider_register(), ast_pickup_find_by_group(), ast_pjsip_rdata_get_endpoint(), ast_print_namedgroups(), ast_ref_namedgroups(), ast_remove_hint(), ast_request(), ast_rtcp_write(), ast_rtp_destroy(), ast_rtp_instance_destroy(), ast_rtp_instance_make_compatible(), ast_rtp_instance_new(), ast_rtp_lookup_mime_multiple2(), ast_rtp_prop_set(), ast_rtp_publish_rtcp_message(), ast_rtp_raw_write(), ast_rtp_read(), ast_rtp_stop(), ast_settimeout_full(), ast_sip_channel_pvt_alloc(), ast_sip_create_subscription(), ast_sip_destroy_cli(), ast_sip_dialog_get_endpoint(), ast_sip_dialog_get_session(), ast_sip_get_artificial_auth(), ast_sip_get_artificial_endpoint(), ast_sip_get_debug(), ast_sip_get_endpoint_identifier_order(), ast_sip_get_keep_alive_interval(), ast_sip_global_default_outbound_endpoint(), ast_sip_location_retrieve_contact_and_aor_from_list(), ast_sip_publish_client_alloc_datastore(), ast_sip_publish_client_get(), ast_sip_publish_client_send(), ast_sip_session_alloc(), ast_sip_session_alloc_datastore(), ast_sip_session_create_outgoing(), ast_sip_session_defer_termination(), ast_sip_session_defer_termination_cancel(), ast_sip_session_suspend(), ast_sip_session_unsuspend(), ast_sip_subscription_alloc_datastore(), ast_sip_subscription_notify(), ast_sip_unregister_cli_formatter(), ast_smdi_interface_find(), ast_sorcery_alloc(), ast_sorcery_global_observer_add(), ast_sorcery_instance_observer_add(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_observer_add(), ast_sorcery_ref(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_regex(), ast_sorcery_unref(), ast_sorcery_wizard_observer_add(), ast_sorcery_wizard_unregister(), ast_sounds_get_index(), ast_sounds_reindex(), ast_speech_destroy(), ast_speech_new(), ast_str_container_add(), ast_taskprocessor_get(), ast_taskprocessor_listener_get_tps(), ast_taskprocessor_unreference(), ast_tcptls_client_create(), ast_tcptls_client_start(), ast_tcptls_server_root(), AST_TEST_DEFINE(), ast_threadpool_create(), ast_tone_zone_ref(), ast_tone_zone_sound_ref(), ast_tone_zone_sound_unref(), ast_tone_zone_unref(), ast_translate_available_formats(), ast_translator_best_choice(), ast_unreal_alloc(), ast_unreal_answer(), ast_unreal_channel_push_to_bridge(), ast_unreal_digit_begin(), ast_unreal_digit_end(), ast_unreal_hangup(), ast_unreal_indicate(), ast_unreal_new_channels(), ast_unreal_sendhtml(), ast_unreal_sendtext(), ast_unreal_setoption(), ast_unreal_write(), ast_websocket_client_create(), ast_websocket_ref(), ast_websocket_server_add_protocol(), ast_websocket_server_remove_protocol(), ast_websocket_uri_cb(), ast_xmpp_client_config_alloc(), ast_xmpp_client_find(), ast_xmpp_client_unref(), asterisk_publication_devicestate_refresh(), asterisk_publication_mwi_refresh(), asterisk_publication_send_refresh(), asterisk_start_devicestate_publishing(), asterisk_start_mwi_publishing(), asterisk_stop_devicestate_publishing(), asterisk_stop_mwi_publishing(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), attach_framehook(), attended_transfer_bridge(), attended_transfer_properties_alloc(), auth_observer(), bridge_action_bridge(), bridge_agent_hold_push(), bridge_app_subscribed(), bridge_app_subscribed_involved(), bridge_base_init(), bridge_basic_change_personality(), bridge_basic_personality_alloc(), bridge_builtin_set_limits(), bridge_channel_attended_transfer(), bridge_channel_change_bridge(), bridge_channel_destroy(), bridge_channel_event_join_leave(), bridge_channel_feature_digit_timeout(), bridge_channel_handle_interval(), bridge_channel_ind_thread(), bridge_channel_internal_alloc(), bridge_channel_moving(), bridge_channel_talking(), bridge_do_move(), bridge_manager_create(), bridge_manager_destroy(), bridge_manager_service_req(), bridge_manager_thread(), bridge_merge_message_create(), bridge_other_hook(), bridge_profile_alloc(), bridge_profile_sounds_alloc(), bridge_stasis_push_peek(), bridge_template_handler(), bucket_alloc(), bucket_file_alloc(), build_callno_limits(), build_conf(), build_entity_id(), build_mansession(), build_user(), caldav_destructor(), calendar_destructor(), calendar_devstate_change(), calendar_event_notify(), calendar_query_exec(), call(), call_pickup_incoming_request(), callattempt_free(), caller_joined_bridge(), calltoken_required(), cancel_and_unpublish(), cancel_publish_refresh(), cancel_refresh_timer_task(), cancel_registration(), cb_events(), cc_handle_publish_error(), cdr_engine_shutdown(), cel_config_alloc(), cel_linkedid_ref(), celt_set(), chan_cleanup(), chan_list_destructor(), chan_pjsip_answer(), chan_pjsip_call(), chan_pjsip_devicestate(), chan_pjsip_get_rtp_peer(), chan_pjsip_get_vrtp_peer(), chan_pjsip_indicate(), chan_pjsip_new(), chan_pjsip_sendtext(), chan_pjsip_set_rtp_peer(), channel_admin_exec(), channel_do_masquerade(), channels_shutdown(), check_delayed_requests(), check_manager_session_inuse(), check_peer_ok(), check_retire_linkedid(), check_state(), check_translation_path(), cleanup_capabilities(), clear_queue(), cli_alias_passthrough(), cli_aor_get_container(), cli_complete_show(), cli_display_named_acl_list(), cli_endpoint_get_container(), cli_fax_show_session(), cli_fax_show_sessions(), cli_get_container(), cli_print_body(), cli_qualify_contacts(), cli_retrieve_by_id(), cli_tps_ping(), cli_tps_report(), client_buddy_handler(), compare_weight(), complete_agent(), complete_agent_logoff(), complete_bridge_live(), complete_bridge_participant(), complete_bridge_profile_name(), complete_bridge_stasis(), complete_confbridge_name(), complete_core_show_hint(), complete_menu_name(), complete_parking_lot(), complete_queue_remove_member(), complete_trans_path_choice(), complete_user_profile_name(), complete_userno(), conf_alloc(), conf_announce_channel_depart(), conf_announce_channel_push(), conf_bridge_profile_copy(), conf_bridge_profile_destroy(), conf_find_bridge_profile(), conf_find_user_profile(), conf_free(), conf_queue_dtmf(), conf_run(), conf_start_record(), confbridge_cfg_alloc(), config_hook_exec(), configure_local_rtp(), configure_parking_extensions(), console_new(), consulting_exit(), consumer_exec(), consumer_exec_sync(), contact_deleted(), contact_expiration_expire(), contact_expiration_initialize_existing(), contact_expiration_observer_created(), contact_expiration_observer_deleted(), contact_expiration_observer_updated(), contact_wrapper_destroy(), control_create(), control_list_create(), copy_socket_data(), create_addr(), create_channel_blob_message(), create_dynamic_lot_full(), create_esc_entry(), create_mwi_subscriptions(), create_object(), create_outgoing_sdp_stream(), create_parked_subscription_full(), create_subscription_tree(), create_trunk_ref(), dahdi_new(), data_add_codec(), data_filter_add_nodes(), data_filter_alloc(), data_filter_destructor(), data_filter_find(), data_filter_generate(), data_filter_release(), data_odbc_provider_handler(), data_provider_create(), data_provider_destructor(), data_provider_find(), data_provider_new(), data_provider_print_cli(), data_provider_release(), data_provider_release_all(), data_result_create(), data_result_destructor(), data_result_find_child(), data_result_generate(), data_result_generate_node(), data_result_get_node(), data_result_manager_output(), data_search_alloc(), data_search_cmp_bool(), data_search_cmp_char(), data_search_cmp_dbl(), data_search_cmp_int(), data_search_cmp_ipaddr(), data_search_cmp_ptr(), data_search_cmp_string(), data_search_cmp_uint(), data_search_create(), data_search_destructor(), data_search_find(), data_search_get_node(), data_search_release(), db_start_batch(), defer_termination_cancel(), delete_contact_status(), destroy_callback(), destroy_endpoint(), destroy_faxdetect(), destroy_gateway(), destroy_hint(), destroy_mailbox_mapping(), destroy_queue(), destroy_session(), destroy_v21_sessions(), device_state_cb(), device_state_subscription_create(), dial_masquerade_datastore_destroy(), dial_state_process_bridge_enter(), dialgroup_read(), dialgroup_write(), dialog_info_xml_get_version(), dialog_info_xml_state_find_or_create(), dialplan_handle_msg_cb(), dictate_exec(), disable_marked_lots(), dns_query_recurring_resolution_callback(), dns_query_recurring_scheduled_callback(), do_notify(), dump_queue_members(), eagi_exec(), end_bridge_callback(), end_bridge_callback_data_fixup(), endpoint_destructor(), endpoint_internal_create(), endpoint_snapshot_dtor(), endpt_send_request(), endpt_send_request_wrapper(), event_notification_duplicate(), eventlist_destroy(), eventlist_destructor(), eventlist_duplicate(), ewscal_destructor(), exchangecal_destructor(), expire_register(), explicit_publish_destroy(), extension_state_add_destroy(), extension_state_cb(), extensionstate_update(), fake_ami(), fax_detect_attach(), fax_detect_framehook(), fax_detect_framehook_destroy(), fax_detect_new(), fax_gateway_attach(), fax_gateway_detect_t38(), fax_gateway_framehook(), fax_gateway_framehook_destroy(), fax_gateway_new(), fax_gateway_request_t38(), fax_gateway_start(), fax_session_new(), fax_session_reserve(), fax_session_tab_complete(), feature_attended_transfer(), find_an_endpoint(), find_bridge(), find_channel_control(), find_control(), find_details(), find_hint_by_cb_id(), find_or_create_contact_status(), find_or_create_details(), find_queue_by_name_rt(), find_ringing_channel(), find_session(), find_session_by_nonce(), format_cap_destroy(), format_cap_framed_init(), forwards_create(), forwards_create_bridge(), forwards_create_channel(), forwards_create_endpoint(), free_members(), func_channel_read(), func_confbridge_info(), function_amiclient(), function_sippeer(), generate_or_link_lots_to_configs(), generate_parked_user(), generic_fax_exec(), generic_lock_unlock_helper(), generic_recall(), get_auth(), get_codecs(), get_destination(), get_device_state_causing_channels(), get_dialstatus_blob(), get_feature_ds(), get_global_cfg(), get_languages(), get_member_penalty(), get_member_status(), get_root_handler(), get_system_cfg(), global_config_alloc(), global_loaded_observer(), group_destroy(), grow(), handle_aor(), handle_auth(), handle_bridge_kick_channel(), handle_bridge_pairings(), handle_bridge_show_all(), handle_capabilities_res_message(), handle_cc_notify(), handle_cc_subscribe(), handle_chanlist(), handle_cli_confbridge_kick(), handle_cli_confbridge_list(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), handle_cli_iax2_set_debug(), handle_cli_iax2_show_callno_limits(), handle_cli_odbc_show(), handle_cli_sound_show(), handle_cli_status(), handle_client_registration(), handle_endpoint(), handle_identify(), handle_incoming_request(), handle_msg_cb(), handle_new_invite_request(), handle_open_receive_channel_ack_message(), handle_outgoing_response(), handle_phoneprov(), handle_queue_remove_member(), handle_registration_response(), handle_registrations(), handle_request_bye(), handle_request_subscribe(), handle_response_subscribe(), handle_show_hint(), handle_show_hints(), handle_show_named_acl_cmd(), handle_show_translation_path(), handle_show_translation_table(), handle_showmanconn(), handle_sip_publish_initial(), handle_sip_publish_modify(), handle_sip_publish_refresh(), handle_sip_publish_remove(), handle_skel_show_games(), handle_skel_show_levels(), handle_speechcreate(), handle_tcptls_connection(), hangupcause_read(), hash_test_grow(), hash_test_lookup(), hash_test_shrink(), hepv3_config_post_apply(), hepv3_create_capture_info(), hepv3_data_alloc(), hepv3_send_packet(), hintdevice_destroy(), hints_data_provider_get(), hooks_remove_heap(), httpd_helper_thread(), iax2_codec_choose(), iax2_codec_pref_string(), iax2_data_add_codecs(), iax2_destroy(), iax2_format_compatibility_cap2bitfield(), iax2_getformatname_multiple(), iax2_parse_allow_disallow(), iax2_request(), iax_template_parse(), icalendar_destructor(), indicate(), indicate_data_alloc(), indicate_data_destroy(), indications_shutdown(), info_dtmf_data_alloc(), info_dtmf_data_destroy(), init_start_time(), inprocess_count(), interface_exists(), internal_format_cap_identical(), internal_stasis_subscribe(), invite_collision_timeout(), invite_proceeding(), invite_terminated(), jingle_action_hook(), jingle_action_session_initiate(), jingle_add_google_candidates_to_transport(), jingle_add_ice_udp_candidates_to_transport(), jingle_add_payloads_to_description(), jingle_alloc(), jingle_config_alloc(), jingle_endpoint_alloc(), jingle_endpoint_destructor(), jingle_endpoint_state_create(), jingle_endpoint_state_destructor(), jingle_endpoint_state_find_or_create(), jingle_get_rtp_peer(), jingle_hangup(), jingle_interpret_content(), jingle_new(), jingle_read(), jingle_request(), join_conference_bridge(), keepalive_global_loaded(), keepalive_transport_state_callback(), kqueue_timer_close(), kqueue_timer_open(), leave_conference(), link_option_to_types(), listener_shutdown(), load_config(), load_endpoint(), load_module(), load_objects(), load_odbc_config(), load_users(), local_call(), local_devicestate(), local_hangup(), local_request(), local_shutdown(), locals_show(), logging_on_rx_msg(), logging_on_tx_msg(), manager_add_filter(), manager_fax_session(), manager_fax_sessions(), manager_optimize_away(), manager_parking_status_all_lots(), manager_parking_status_single_lot(), manager_queues_status(), manager_queues_summary(), manager_remove_queue_member(), mark_lots_as_disabled(), matrix_rebuild(), measurenoise(), media_hangup(), media_info_alloc(), media_offer_read_av(), media_variant_alloc(), meetme_menu_admin(), meetme_menu_admin_extended(), meetme_show_cmd(), meetmemute(), message_sink_cb(), messaging_app_unsubscribe_endpoint(), messaging_cleanup(), messaging_init(), mgcp_get_rtp_peer(), mgcp_new(), mgcp_rtp_read(), misdn_new(), module_config_alloc(), module_config_destructor(), module_config_dtor(), moh_files_release(), moh_rescan_files(), msg_data_alloc(), msg_data_create(), msg_data_func_read(), msg_data_func_write(), msg_destructor(), msg_ds_destroy(), msg_func_read(), msg_func_write(), msg_q_cb(), msg_send_exec(), msg_set_var_full(), multicast_rtp_request(), multihomed_get_udp_transport(), mwi_create_subscription(), mwi_initial_events(), mwi_mailbox_get(), mwi_stasis_cb(), mwi_stasis_subscription_alloc(), mwi_state_create_message(), mwi_subscription_mailboxes_str(), named_acl_config_alloc(), naptr_thread(), new_iax(), new_invite_alloc(), newpvt(), notify_ami_data_create(), notify_ami_uri_data_create(), notify_cli_data_create(), notify_cli_uri_data_create(), notify_task_data_destructor(), num_available_members(), odbc_class_destructor(), odbc_obj_destructor(), odbc_release_obj2(), on_endpoint(), ooh323_get_rtp_peer(), ooh323_get_vrtp_peer(), ooh323_new(), ooh323_rtp_read(), ooh323_set_read_format(), ooh323_set_write_format(), ooh323c_set_capability(), ooh323c_set_capability_for_call(), orig_app(), orig_exten(), parking_blind_transfer_park(), parking_config_alloc(), parking_lot_build_or_update(), parking_lot_get_bridge(), parking_lot_get_space(), parking_lot_retrieve_parked_user(), parking_park_bridge_channel(), parking_set_duration(), parse_moved_contact(), pbx_outgoing_attempt(), pbx_shutdown(), peer_ref(), peer_unref(), peercnt_add(), peercnt_modify(), peercnt_remove_by_addr(), peercnt_remove_cb(), peers_data_provider_get(), permanent_uri_handler(), persistent_endpoint_find_or_create(), phone_new(), pjsip_acf_dial_contacts_read(), playback_create(), presence_state_alloc(), presence_state_cb(), process_sdp(), process_sdp_a_audio(), process_sdp_a_video(), proxy_from_config(), pthread_timer_close(), pthread_timer_open(), publish_expire(), publish_msg(), pubsub_on_client_refresh(), pubsub_on_rx_publish_request(), pubsub_on_rx_refresh(), pubsub_on_server_timeout(), purge_old_messages(), purge_sessions(), qualify_and_schedule(), qualify_and_schedule_all(), qualify_and_schedule_all_cb(), qualify_contact(), qualify_contact_sched(), qualify_contact_task(), queue_function_mem_read(), queue_function_mem_write(), queue_function_qac_dep(), queue_function_queuememberlist(), queue_ref(), queue_register(), queue_ringing_trunk(), queue_stasis_data_alloc(), queue_unref(), queue_unregister(), queued_active_thread_idle(), queued_idle_thread_dead(), queued_task_pushed(), queued_zombie_thread_dead(), queues_data_provider_get_helper(), realtime_common(), realtime_sqlite3_execute(), realtime_sqlite3_require(), recalling_enter(), recalling_exit(), recording_alloc(), recording_cleanup(), ref_proxy(), ref_pvt(), refer_attended_alloc(), refer_attended_task(), refer_blind_callback(), refer_progress_alloc(), refer_progress_bridge(), refer_progress_notification_alloc(), refer_progress_on_evsub_state(), registrar_on_rx_request(), registration_loaded_observer(), reload(), reload_single_member(), remote_send_hold_refresh(), remove_all_configured_parking_lot_extensions(), remove_bridge_playback(), remove_from_playbacks(), remove_from_queue(), remove_pending_parking_lot_extensions(), reschedule_reinvite(), resend_reinvite(), resolution_thread(), rna(), root_handler_create(), rqm_exec(), rt_handle_member_record(), rtcp_message_handler(), run_externnotify(), rx_task_data_create(), save_dialstatus(), sched_data_create(), sched_delay_remove(), schedule_publish_refresh(), schedule_registration(), send_direct_media_request(), send_refresh_cb(), send_request_cb(), send_start_msg_snapshots(), send_unpublish_task(), sendtext_data_create(), sendtext_data_destroy(), serialized_notify(), serializer_create(), session_create(), session_destroy(), session_details_new(), session_do(), session_end(), session_termination_task(), set_dial_masquerade(), set_fn(), set_member_paused(), set_member_penalty_help_members(), set_member_ringinuse_help_members(), set_peer_defaults(), set_peercnt_limit(), set_socket_transport(), setup_stasis_subs(), show_codec(), show_codecs(), show_sound_info_cb(), shutdown_data_create(), single_state_process_bridge_enter(), sip_cc_monitor_suspend(), sip_cli_print_global(), sip_cli_print_system(), sip_create_publication(), sip_destroy_peer(), sip_get_rtp_peer(), sip_get_trtp_peer(), sip_get_vrtp_peer(), sip_handle_cc(), sip_hangup(), sip_monitor_instance_init(), sip_msg_send(), sip_new(), sip_outbound_publish_apply(), sip_outbound_publish_callback(), sip_outbound_publish_client_alloc(), sip_outbound_publish_state_alloc(), sip_outbound_publish_synchronize(), sip_outbound_publish_timer_cb(), sip_outbound_registration_apply(), sip_outbound_registration_response_cb(), sip_outbound_registration_state_destroy(), sip_outbound_registration_timer_cb(), sip_prepare_socket(), sip_publish_client_service_queue(), sip_rtp_read(), sip_session_suspend_task(), sip_tcp_locate(), skel_config_alloc(), skel_find_or_create_state(), skel_game_alloc(), skel_level_alloc(), skinny_device_destroy(), skinny_get_rtp_peer(), skinny_get_vrtp_peer(), skinny_line_destroy(), skinny_new(), skinny_rtp_read(), skinny_set_rtp_peer(), sla_add_trunk_to_station(), sla_calc_station_delays(), sla_change_trunk_state(), sla_choose_idle_trunk(), sla_choose_ringing_trunk(), sla_create_failed_station(), sla_create_ringing_station(), sla_create_station_ref(), sla_destroy(), sla_event_destroy(), sla_failed_station_destroy(), sla_find_trunk_ref(), sla_find_trunk_ref_byname(), sla_handle_dial_state_event(), sla_queue_event_conf(), sla_queue_event_full(), sla_ringing_station_destroy(), sla_ringing_trunk_destroy(), sla_show_stations(), sla_show_trunks(), sla_station_exec(), sla_station_is_marked(), sla_station_ref_destructor(), sla_station_release_refs(), sla_stop_ringing_trunk(), sla_trunk_is_marked(), sla_trunk_ref_destructor(), sla_trunk_release_refs(), smdi_read(), socket_process_helper(), sorcery_config_close(), sorcery_config_open(), sorcery_memory_close(), sorcery_object_type_alloc(), sorcery_observer_invocation_alloc(), spandsp_fax_gw_gen_alloc(), spandsp_fax_gw_gen_release(), srv_thread(), start_rtp(), stasis_app_bridge_playback_channel_find(), stasis_app_channel_unreal_set_internal(), stasis_app_control_get_snapshot(), stasis_app_control_record(), stasis_app_control_snoop(), stasis_app_recording_find_by_name(), stasis_app_recording_options_create(), stasis_app_stored_recording_find_all(), stasis_app_stored_recording_find_by_name(), stasis_caching_topic_create(), stasis_caching_unsubscribe(), stasis_caching_unsubscribe_and_join(), stasis_config_alloc(), stasis_cp_all_create(), stasis_cp_single_create(), stasis_init(), stasis_message_create_full(), stasis_message_router_create_internal(), stasis_message_sink_create(), stasis_topic_pool_create(), stasis_unsubscribe_and_join(), store_auth(), subscription_change_alloc(), subscription_established(), subscription_persistence_load(), subscription_persistence_remove(), system_create_resolver_and_set_nameservers(), t38_automatic_reject_timer_cb(), t38_change_state(), t38_framehook_write(), t38_parameters_task_data_alloc(), talk_detect_audiohook_cb(), test_ao2_callback_traversal(), test_ao2_iteration(), test_core_format_parse_sdp_fmtp(), test_expected_duplicates(), test_item_alloc(), test_iterator_next(), test_performance(), test_ref(), test_unref(), thread_worker_pair_alloc(), thread_worker_pair_destructor(), threadpool_alloc(), timerfd_timer_close(), timerfd_timer_open(), tps_taskprocessor_destroy(), tps_taskprocessor_tab_complete(), transfer(), transfer_data_alloc(), transmit_audio(), transmit_connect(), transmit_connect_with_sdp(), transmit_modify_request(), transmit_modify_with_sdp(), transmit_publish(), transport_apply(), try_calling(), try_suggested_sip_codec(), udptl_snapshot_alloc(), unbound_config_alloc(), unbound_config_apply_default(), unbound_config_state_destructor(), unbound_resolver_alloc(), unbound_resolver_callback(), unbound_resolver_cancel(), unbound_resolver_resolve(), unbound_resolver_start(), unbound_resolver_thread(), unicast_rtp_request(), unistim_get_rtp_peer(), unistim_line_destroy(), unistim_new(), unistim_rtp_read(), unload_module(), unref_caldav(), unref_calendar(), unref_db(), unref_ewscal(), unref_exchangecal(), unref_icalendar(), unref_instance_cond(), unref_mansession(), unref_pvt(), unregister_task(), unschedule_all_cb(), update_connected_line_information(), update_contact_status(), update_create(), update_queue(), update_realtime_members(), uri_parse_and_default(), user_alloc(), user_unref(), username_identify(), ustmtext(), wait_wrapper_removal(), websocket_client_args_create(), websocket_client_connect(), websocket_client_create(), websocket_client_parse_uri(), websocket_server_create_impl(), xml_translate(), xmpp_buddy_destructor(), xmpp_client_alloc(), xmpp_client_config_merge_buddies(), xmpp_client_create_buddy(), xmpp_client_find_or_create(), xmpp_client_service_discovery_result_hook(), xmpp_component_register_get_hook(), xmpp_config_alloc(), xmpp_pak_presence(), xmpp_pak_s10n(), xmpp_pubsub_create_affiliations(), xmpp_roster_hook(), xmpp_show_buddies(), xmpp_show_clients(), and xmpp_status_exec().

#define ao2_replace ( dst,
src   )     ao2_t_replace((dst), (src), "")

#define ao2_t_alloc ( data_size,
destructor_fn,
debug_msg   )     __ao2_alloc((data_size), (destructor_fn), AO2_ALLOC_OPT_LOCK_MUTEX)

#define ao2_t_alloc_options ( data_size,
destructor_fn,
options,
debug_msg   )     __ao2_alloc((data_size), (destructor_fn), (options))

Allocate and initialize an object.

Parameters:
data_size The sizeof() of the user-defined structure.
destructor_fn The destructor function (can be NULL)
options The ao2 object options (See enum ao2_alloc_opts)
debug_msg An ao2 object debug tracing message.
Returns:
A pointer to user-data.
Allocates a struct astobj2 with sufficient space for the user-defined structure.
Note:
  • storage is zeroed; XXX maybe we want a flag to enable/disable this.
  • the refcount of the object just created is 1
  • the returned pointer cannot be free()'d or realloc()'ed; rather, we just call ao2_ref(o, -1);

Definition at line 470 of file astobj2.h.

Referenced by __ao2_container_alloc_hash(), __ao2_container_alloc_rbtree(), __ast_codec_register(), ao2_container_register(), and ast_format_create_named().

#define ao2_t_bump ( obj,
tag   ) 

Bump refcount on an AO2 object by one, returning the object.

Since:
12 This is useful for inlining a ref bump, and you don't care about the ref count. Also NULL safe, for even more convenience.
Parameters:
obj AO2 object to bump the refcount on.
Return values:
The given obj pointer.

Definition at line 541 of file astobj2.h.

Referenced by __sip_subscribe_mwi_do(), ast_bridge_impart(), handle_response_subscribe(), and transmit_register().

#define ao2_t_callback ( c,
flags,
cb_fn,
arg,
tag   )     __ao2_callback((c), (flags), (cb_fn), (arg))

ao2_callback() is a generic function that applies cb_fn() to all objects in a container, as described below.

Parameters:
c A pointer to the container to operate on.
flags A set of flags specifying the operation to perform, partially used by the container code, but also passed to the callback.
  • If OBJ_NODATA is set, ao2_callback will return NULL. No refcounts of any of the traversed objects will be incremented. On the converse, if it is NOT set (the default), the ref count of the first matching object will be incremented and returned.
  • If OBJ_MULTIPLE is set, the ref count of all matching objects will be incremented in an iterator for a temporary container and returned.
  • If OBJ_SEARCH_OBJECT is set, the traversed items will be restricted to the objects in the bucket that the object key hashes to.
  • If OBJ_SEARCH_KEY is set, the traversed items will be restricted to the objects in the bucket that the object key hashes to.
cb_fn A function pointer, that will be called on all objects, to see if they match. This function returns CMP_MATCH if the object is matches the criteria; CMP_STOP if the traversal should immediately stop, or both (via bitwise ORing), if you find a match and want to end the traversal, and 0 if the object is not a match, but the traversal should continue. This is the function that is applied to each object traversed. Its arguments are: (void *obj, void *arg, int flags), where: obj is an object arg is the same as arg passed into ao2_callback flags is the same as flags passed into ao2_callback (flags are also used by ao2_callback).
arg passed to the callback.
tag used for debugging.
Return values:
NULL on failure or no matching object found.
object found if OBJ_MULTIPLE is not set in the flags parameter.
ao2_iterator pointer if OBJ_MULTIPLE is set in the flags parameter. The iterator must be destroyed with ao2_iterator_destroy() when the caller no longer needs it.
If the function returns any objects, their refcount is incremented, and the caller is in charge of decrementing them once done.

Typically, ao2_callback() is used for two purposes:

  • to perform some action (including removal from the container) on one or more objects; in this case, cb_fn() can modify the object itself, and to perform deletion should set CMP_MATCH on the matching objects, and have OBJ_UNLINK set in flags.
  • to look for a specific object in a container; in this case, cb_fn() should not modify the object, but just return a combination of CMP_MATCH and CMP_STOP on the desired object. Other usages are also possible, of course.

This function searches through a container and performs operations on objects according on flags passed. XXX describe better The comparison is done calling the compare function set implicitly. The arg pointer can be a pointer to an object or to a key, we can say this looking at flags value. If arg points to an object we will search for the object pointed by this value, otherwise we search for a key value. If the key is not unique we only find the first matching value.

The use of flags argument is the follow:

OBJ_UNLINK unlinks the object found OBJ_NODATA on match, do return an object Callbacks use OBJ_NODATA as a default functions such as find() do OBJ_MULTIPLE return multiple matches Default is no. OBJ_SEARCH_OBJECT the pointer is to an object OBJ_SEARCH_KEY the pointer is to a search key OBJ_SEARCH_PARTIAL_KEY the pointer is to a partial search key

Note:
When the returned object is no longer in use, ao2_ref() should be used to free the additional reference possibly created by this function.

Definition at line 1704 of file astobj2.h.

Referenced by __init_manager(), ast_cc_agent_callback(), ast_cc_monitor_count(), ast_moh_destroy(), ast_srtp_destroy(), astobj2_test_1_helper(), cc_cli_output_status(), cleanup_all_regs(), device_state_cb(), do_monitor(), get_mohbydigit(), handle_cc_kill(), load_moh_classes(), presence_state_cb(), reload_config(), remove_hintdevice(), sip_show_channels(), sip_show_channelstats(), sip_show_objects(), test_container_clone(), unlink_peers_from_tables(), and unload_module().

#define ao2_t_callback_data ( container,
flags,
cb_fn,
arg,
data,
tag   )     __ao2_callback_data((container), (flags), (cb_fn), (arg), (data))

ao2_callback_data() is a generic function that applies cb_fn() to all objects in a container. It is functionally identical to ao2_callback() except that instead of taking an ao2_callback_fn *, it takes an ao2_callback_data_fn *, and allows the caller to pass in arbitrary data.

This call would be used instead of ao2_callback() when the caller needs to pass OBJ_SEARCH_OBJECT, OBJ_SEARCH_KEY, or OBJ_SEARCH_PARTIAL_KEY as part of the flags argument (which in turn requires passing in a known pointer type for 'arg') and also needs access to other non-global data to complete it's comparison or task.

See the documentation for ao2_callback() for argument descriptions.

See also:
ao2_callback()

Definition at line 1742 of file astobj2.h.

Referenced by cccancel_exec(), ccreq_exec(), ccss_device_state(), count_agents(), kill_duplicate_offers(), match_filter(), and sip_find_peer_full().

#define ao2_t_cleanup ( obj,
tag   )     __ao2_cleanup((obj))

#define ao2_t_container_alloc ( n_buckets,
hash_fn,
cmp_fn,
tag   )     ao2_t_container_alloc_options(AO2_ALLOC_OPT_LOCK_MUTEX, (n_buckets), (hash_fn), (cmp_fn), (tag))

#define ao2_t_container_alloc_hash ( ao2_options,
container_options,
n_buckets,
hash_fn,
sort_fn,
cmp_fn,
tag   )     __ao2_container_alloc_hash((ao2_options), (container_options), (n_buckets), (hash_fn), (sort_fn), (cmp_fn))

Allocate and initialize a hash container with the desired number of buckets.

We allocate space for a struct astobj_container, struct container and the buckets[] array.

Parameters:
ao2_options Container ao2 object options (See enum ao2_alloc_opts)
container_options Container behaviour options (See enum ao2_container_opts)
n_buckets Number of buckets for hash
hash_fn Pointer to a function computing a hash value. (NULL if everyting goes in first bucket.)
sort_fn Pointer to a sort function. (NULL to not sort the buckets.)
cmp_fn Pointer to a compare function used by ao2_find. (NULL to match everything)
tag used for debugging.
Returns:
A pointer to a struct container.
Note:
Destructor is set implicitly.

Definition at line 1241 of file astobj2.h.

Referenced by astobj2_test_1_helper(), hash_ao2_alloc_empty_clone(), messaging_init(), and test_make_sorted().

#define ao2_t_container_alloc_list ( ao2_options,
container_options,
sort_fn,
cmp_fn,
tag   )     __ao2_container_alloc_list((ao2_options), (container_options), (sort_fn), (cmp_fn))

Allocate and initialize a list container.

Parameters:
ao2_options Container ao2 object options (See enum ao2_alloc_opts)
container_options Container behaviour options (See enum ao2_container_opts)
sort_fn Pointer to a sort function. (NULL if list not sorted.)
cmp_fn Pointer to a compare function used by ao2_find. (NULL to match everything)
tag used for debugging.
Returns:
A pointer to a struct container.
Note:
Destructor is set implicitly.

Implemented as a degenerate hash table.

Definition at line 1287 of file astobj2.h.

Referenced by astobj2_test_1_helper(), container_init(), internal_ao2_traverse(), load_module(), and test_make_sorted().

#define ao2_t_container_alloc_options ( options,
n_buckets,
hash_fn,
cmp_fn,
tag   )     ao2_t_container_alloc_hash((options), 0, (n_buckets), (hash_fn), NULL, (cmp_fn), (tag))

Allocate and initialize a hash container with the desired number of buckets.

We allocate space for a struct astobj_container, struct container and the buckets[] array.

Parameters:
options Container ao2 object options (See enum ao2_alloc_opts)
n_buckets Number of buckets for hash
hash_fn Pointer to a function computing a hash value. (NULL if everyting goes in first bucket.)
cmp_fn Pointer to a compare function used by ao2_find. (NULL to match everything)
tag used for debugging.
Returns:
A pointer to a struct container.
Note:
Destructor is set implicitly.

This is legacy container creation that is mapped to the new method.

Definition at line 1195 of file astobj2.h.

#define ao2_t_container_alloc_rbtree ( ao2_options,
container_options,
sort_fn,
cmp_fn,
tag   )     __ao2_container_alloc_rbtree((ao2_options), (container_options), (sort_fn), (cmp_fn))

Allocate and initialize a red-black tree container.

Parameters:
ao2_options Container ao2 object options (See enum ao2_alloc_opts)
container_options Container behaviour options (See enum ao2_container_opts)
sort_fn Pointer to a sort function.
cmp_fn Pointer to a compare function used by ao2_find. (NULL to match everything)
tag used for debugging.
Returns:
A pointer to a struct container.
Note:
Destructor is set implicitly.

Definition at line 1330 of file astobj2.h.

Referenced by astobj2_test_1_helper(), rb_ao2_alloc_empty_clone(), and test_make_sorted().

#define ao2_t_container_clone ( orig,
flags,
tag   )     __ao2_container_clone(orig, flags)

Definition at line 1395 of file astobj2.h.

#define ao2_t_find ( container,
arg,
flags,
tag   )     __ao2_find((container), (arg), (flags))

#define ao2_t_global_obj_ref ( holder,
tag   )     __ao2_global_obj_ref(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

Get a reference to the object stored in the global holder.

Since:
11.0
Parameters:
holder Global ao2 object holder.
tag used for debugging
Return values:
Reference to current ao2 object stored in the holder.
NULL if no object available.

Definition at line 798 of file astobj2.h.

Referenced by AST_TEST_DEFINE().

#define ao2_t_global_obj_release ( holder,
tag   )     __ao2_global_obj_release(&holder, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

Release the ao2 object held in the global holder.

Since:
11.0
Parameters:
holder Global ao2 object holder.
tag used for debugging
Returns:
Nothing

Definition at line 709 of file astobj2.h.

Referenced by AST_TEST_DEFINE(), manager_shutdown(), and udptl_shutdown().

#define ao2_t_global_obj_replace ( holder,
obj,
tag   )     __ao2_global_obj_replace(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

Replace an ao2 object in the global holder.

Since:
11.0
Parameters:
holder Global ao2 object holder.
obj Object to put into the holder. Can be NULL.
tag used for debugging
Note:
This function automatically increases the reference count to account for the reference that the global holder now holds to the object.
Return values:
Reference to previous global ao2 object stored.
NULL if no object available.

Definition at line 740 of file astobj2.h.

Referenced by AST_TEST_DEFINE().

#define ao2_t_global_obj_replace_unref ( holder,
obj,
tag   )     __ao2_global_obj_replace_unref(&holder, (obj), NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__, #holder)

Replace an ao2 object in the global holder, throwing away any old object.

Since:
11.0
Parameters:
holder Global ao2 object holder.
obj Object to put into the holder. Can be NULL.
tag used for debugging
Note:
This function automatically increases the reference count to account for the reference that the global holder now holds to the object. It also decreases the reference count of any object being replaced.
Return values:
0 The global object was previously empty
1 The global object was not previously empty

Definition at line 772 of file astobj2.h.

Referenced by __init_manager(), and AST_TEST_DEFINE().

#define ao2_t_iterator_next ( iter,
tag   )     __ao2_iterator_next((iter))

#define ao2_t_link ( container,
obj,
tag   )     __ao2_link((container), (obj), 0)

Add an object to a container.

Parameters:
container The container to operate on.
obj The object to be added.
tag used for debugging.
Return values:
0 on errors.
1 on success.
This function inserts an object in a container according its key.

Note:
Remember to set the key before calling this function.

This function automatically increases the reference count to account for the reference that the container now holds to the object.

Definition at line 1542 of file astobj2.h.

Referenced by __sip_alloc(), _moh_register(), add_hintdevice(), add_sdp(), ao2_container_register(), ast_srtp_add_stream(), ast_srtp_create(), astobj2_test_1_helper(), authenticate(), cc_core_init_instance(), change_callid_pvt(), create_new_generic_list(), manager_add_filter(), parse_register_contact(), pvt_set_needdestroy(), realtime_peer(), register_verify(), reload_config(), sip_prune_realtime(), sip_register(), sip_subscribe_mwi(), and sip_threadinfo_create().

#define ao2_t_link_flags ( container,
obj,
flags,
tag   )     __ao2_link((container), (obj), (flags))

Definition at line 1545 of file astobj2.h.

#define ao2_t_ref ( o,
delta,
tag   )     __ao2_ref((o), (delta))

Reference/unreference an object and return the old refcount.

Parameters:
o A pointer to the object
delta Value to add to the reference counter.
tag used for debugging
Returns:
The value of the reference counter before the operation.
Increase/decrease the reference counter according the value of delta.

If the refcount goes to zero, the object is destroyed.

Note:
The object must not be locked by the caller of this function, as it is invalid to try to unlock it after releasing the reference.

if we know the pointer to an object, it is because we have a reference count to it, so the only case when the object can go away is when we release our reference, and it is the last one in existence.

Definition at line 519 of file astobj2.h.

Referenced by __ao2_container_clone(), __ao2_container_clone_debug(), __container_unlink_node_debug(), __init_manager(), __sip_alloc(), __sip_destroy(), __sip_subscribe_mwi_do(), _sip_show_peer(), _sip_tcp_helper_thread(), action_find(), add_hintdevice(), agent_connect_caller(), ao2_container_dup(), ao2_container_register(), ao2_iterator_destroy(), ao2_iterator_init(), ast_channel_internal_cleanup(), ast_hook_send_action(), ast_manager_register2(), ast_manager_register_struct(), ast_manager_unregister(), ast_srtp_add_stream(), ast_srtp_change_source(), ast_srtp_destroy(), ast_srtp_policy_destroy(), ast_srtp_unprotect(), AST_TEST_DEFINE(), astobj2_test_1_helper(), authenticate(), build_peer(), build_reply_digest(), cc_ref(), cc_shutdown(), cc_unref(), cdr_object_alloc(), cdr_object_snapshot_copy(), cdr_object_swap_snapshot(), check_peer_ok(), cleanup_module(), cleanup_registration(), complete_show_sorcery_object(), cpg_confchg_cb(), create_addr_from_peer(), data_shutdown(), default_listener_shutdown(), default_tps_processing_function(), device_state_cb(), dialog_dump_func(), generic_monitor_devstate_cb(), handle_request_do(), handle_response_register(), handle_response_subscribe(), hash_ao2_insert_node(), hash_ao2_new_node(), insert_test_duplicates(), insert_test_vector(), internal_ao2_iterator_next(), internal_ao2_traverse(), manager_add_filter(), manager_free_user(), manager_show_registry(), peer_dump_func(), presence_state_cb(), process_message(), publish_corosync_ping_to_stasis(), rb_ao2_insert_node(), rb_ao2_new_node(), reload_config(), sched_qualifies_empty(), schedule_qualify(), session_destructor(), session_instance_destructor(), sip_call(), sip_cc_monitor_cancel_available_timer(), sip_cc_monitor_request_cc(), sip_destroy_peer(), sip_monitor_instance_destructor(), sip_prepare_socket(), sip_reg_timeout(), sip_register(), sip_reload(), sip_reregister(), sip_send_all_mwi_subscriptions(), sip_send_all_registers(), sip_show_channel(), sip_show_history(), sip_show_mwi(), sip_show_objects(), sip_show_registry(), sip_show_settings(), sip_show_tcp(), sip_subscribe_mwi(), sip_subscribe_mwi_do(), sip_tcp_locate(), sip_tcptls_write(), sip_threadinfo_create(), sip_threadinfo_destructor(), tcptls_stream_close(), tcptls_stream_fopen(), temp_peer(), test_ao2_find_w_no_flags(), test_ao2_find_w_OBJ_KEY(), test_ao2_find_w_OBJ_PARTIAL_KEY(), test_ao2_find_w_OBJ_POINTER(), test_container_clone(), test_traversal_nonsorted(), test_traversal_sorted(), tps_shutdown(), transmit_register(), unload_module(), and unschedule_qualify().

#define ao2_t_replace ( dst,
src,
tag   ) 

Replace one object reference with another cleaning up the original.

Since:
12.4.0
Parameters:
dst Pointer to the object that will be cleaned up.
src Pointer to the object replacing it.

Definition at line 562 of file astobj2.h.

Referenced by __sip_destroy(), dialog_unlink_all(), format_cap_replace(), handle_response_register(), sip_reg_timeout(), sip_registry_destroy(), and softmix_mixing_loop().

#define ao2_t_unlink ( container,
obj,
tag   )     __ao2_unlink((container), (obj), 0)

Remove an object from a container.

Parameters:
container The container to operate on.
obj The object to unlink.
tag used for debugging.
Return values:
NULL,always 
Note:
The object requested to be unlinked must be valid. However, if it turns out that it is not in the container, this function is still safe to be called.

If the object gets unlinked from the container, the container's reference to the object will be automatically released. (The refcount will be decremented).

Definition at line 1599 of file astobj2.h.

Referenced by _sip_tcp_helper_thread(), add_sdp(), ast_srtp_add_stream(), astobj2_test_1_helper(), build_peer(), cc_complete(), cc_failed(), cc_generic_monitor_destructor(), dialog_unlink_all(), expire_register(), parse_register_contact(), sip_prepare_socket(), and sip_prune_realtime().

#define ao2_t_unlink_flags ( container,
obj,
flags,
tag   )     __ao2_unlink((container), (obj), (flags))

Definition at line 1602 of file astobj2.h.

#define ao2_trylock ( a   )     __ao2_trylock(a, AO2_LOCK_REQ_MUTEX, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

#define ao2_tryrdlock ( a   )     __ao2_trylock(a, AO2_LOCK_REQ_RDLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

Definition at line 622 of file astobj2.h.

#define ao2_trywrlock ( a   )     __ao2_trylock(a, AO2_LOCK_REQ_WRLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

Definition at line 623 of file astobj2.h.

#define ao2_unlink ( container,
obj   )     __ao2_unlink((container), (obj), 0)

Definition at line 1600 of file astobj2.h.

Referenced by app_exec(), ast_bridge_channel_feature_digit(), ast_bridge_channel_kick(), ast_change_name(), ast_channel_release(), ast_channel_unlink(), ast_data_remove_node(), ast_endpoint_shutdown(), ast_hangup(), ast_pickup_find_by_group(), ast_sorcery_wizard_unregister(), ast_taskprocessor_unreference(), ast_websocket_server_remove_protocol(), bridge_base_dissolving(), bridge_channel_event_join_leave(), bridge_channel_moving(), bridge_channel_talking(), build_calendar(), build_user(), channel_do_masquerade(), check_retire_linkedid(), conf_ended(), conf_run(), control_unlink(), create_new_sip_etag(), data_provider_release(), data_provider_release_all(), destroy_gateway(), destroy_pvts(), destroy_v21_sessions(), dialgroup_write(), fax_session_new(), generic_fax_exec(), get_lock(), grow(), handle_channel_cache_message(), handle_cli_iax2_prune_realtime(), handle_sip_publish_remove(), jingle_hangup(), link_option_to_types(), local_hangup(), member_remove_from_queue(), merge_events_cb(), messaging_app_unsubscribe_endpoint(), msg_set_var_full(), on_dns_update_peer(), parking_lot_remove_if_unused(), parking_lot_retrieve_parked_user(), peercnt_remove(), prune_users(), pthread_timer_close(), publish_expire(), queued_active_thread_idle(), queued_idle_thread_dead(), queued_zombie_thread_dead(), reload(), reload_single_member(), remove_bridge_playback(), remove_by_peercallno(), remove_by_transfercallno(), remove_device_state_subscription(), session_destroy(), sip_cc_monitor_destructor(), sip_outbound_registration_apply(), stasis_app_bridge_destroy(), unlink_peer(), unpark_parked_user(), and wait_wrapper_removal().

#define ao2_unlink_flags ( container,
obj,
flags   )     __ao2_unlink((container), (obj), (flags))

#define ao2_unlock ( a   )     __ao2_unlock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

Definition at line 611 of file astobj2.h.

Referenced by __adjust_lock(), __ao2_container_clone(), __ao2_container_clone_debug(), __ast_manager_event_multichan(), __ast_sorcery_open(), __ast_sorcery_wizard_register(), __queues_show(), _ast_odbc_request_obj2(), _sip_show_peer(), _sip_show_peers(), _sip_show_peers_one(), _sip_tcp_helper_thread(), action_confbridgelist(), action_confbridgelistrooms(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), action_extensionstatelist(), action_kick_last(), action_toggle_mute_participants(), action_waitevent(), add_calltoken_ignore(), add_sdp(), add_to_queue(), ao2_container_check(), ao2_container_dump(), ao2_container_dup(), ao2_container_stats(), ao2_iterator_restart(), aoro2_obj_cb(), app_exec(), app_handler(), ari_bridges_play_found(), ari_bridges_play_new(), ast_add_hint(), ast_cdr_clear_property(), ast_cdr_getvar(), ast_cdr_reset(), ast_cdr_serialize_variables(), ast_cdr_set_property(), ast_cdr_setuserfield(), ast_cdr_setvar(), ast_change_hint(), ast_change_name(), ast_dns_resolve_recurring_cancel(), ast_endpoint_add_channel(), ast_endpoint_set_max_channels(), ast_endpoint_set_state(), ast_extension_state_del(), ast_get_indication_tone(), ast_get_indication_zone(), ast_hook_send_action(), ast_local_get_peer(), ast_local_setup_bridge(), ast_local_setup_masquerade(), ast_manager_unregister(), ast_merge_contexts_and_delete(), ast_odbc_direct_execute(), ast_odbc_find_table(), ast_odbc_prepare_and_execute(), ast_odbc_smart_execute(), ast_register_indication_country(), ast_remove_hint(), ast_set_indication_country(), ast_sip_session_suspend(), ast_sip_session_unsuspend(), ast_sip_unregister_cli_formatter(), ast_sorcery_unref(), ast_taskprocessor_execute(), ast_taskprocessor_is_task(), ast_threadpool_shutdown(), ast_unreal_answer(), ast_unreal_channel_push_to_bridge(), ast_unreal_digit_begin(), ast_unreal_digit_end(), ast_unreal_fixup(), ast_unreal_hangup(), ast_unreal_lock_all(), ast_unreal_queryoption(), ast_unreal_sendhtml(), ast_unreal_sendtext(), ast_unreal_setoption(), ast_unreal_write(), ast_unregister_indication_country(), ast_websocket_close(), ast_websocket_server_add_protocol(), ast_websocket_write(), ast_xmpp_client_unlock(), astman_is_authed(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), auth_http_callback(), bridge_manager_destroy(), bridge_manager_service_req(), bridge_manager_thread(), bridge_move(), bridge_parking_pull(), build_callno_limits(), build_peer(), build_reply_digest(), cache_put(), caldav_load_calendar(), calendar_destructor(), cdr_object_dispatch_all_cb(), cel_linkedid_ref(), change_callid_pvt(), channel_do_masquerade(), check_retire_linkedid(), cleanup_registration(), clear_stats(), cli_fax_show_sessions(), cli_show_channel(), compare_weight(), complete_core_show_hint(), complete_queue_remove_member(), complete_sip_user(), conf_announce_channel_depart(), conf_announce_channel_push(), conf_ended(), conf_find_bridge_profile(), conf_find_menu_entry_by_sequence(), conf_find_user_profile(), conf_moh_suspend(), conf_moh_unsuspend(), conf_run(), control_wait(), create_addr_from_peer(), create_dynamic_lot_full(), data_odbc_provider_handler(), db_destructor(), db_open(), db_sync_thread(), device_state_cb(), dial_masquerade_breakdown(), dial_masquerade_datastore_remove_chan(), dial_masquerade_fixup(), dial_state_process_bridge_enter(), dns_query_recurring_resolution_callback(), dns_query_recurring_scheduled_callback(), endpoint_cache_clear(), ewscal_load_calendar(), exchangecal_load_calendar(), exec_command_on_condition(), execute_menu_entry(), execute_state_callback(), extension_state_add_destroy(), extension_state_cb(), find_member_by_queuename_and_interface(), find_queue_by_name_rt(), find_session(), find_session_by_nonce(), func_confbridge_info(), generate_parked_user(), generic_http_callback(), generic_lock_unlock_helper(), get_input(), get_member_penalty(), get_member_status(), handle_attended_transfer(), handle_blind_transfer(), handle_bridge_leave_message(), handle_channel_cache_message(), handle_cli_confbridge_list(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menu(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), handle_cli_misdn_send_facility(), handle_cli_odbc_show(), handle_dial_message(), handle_hangup(), handle_parked_call_message(), handle_parking_bridge_enter_message(), handle_request_subscribe(), handle_show_hint(), handle_show_hints(), handle_showmanconn(), handle_standard_bridge_enter_message(), handle_video_on_exit(), handle_video_on_join(), ical_load_calendar(), inprocess_count(), internal_ao2_iterator_next(), internal_ao2_link(), internal_ao2_traverse(), is_our_turn(), jingle_action_session_accept(), jingle_action_session_info(), jingle_action_session_terminate(), jingle_fixup(), jingle_hangup(), jingle_interpret_content(), jingle_new(), jingle_outgoing_hook(), jingle_queue_hangup_with_cause(), jingle_request(), jingle_session_lock_full(), join_conference_bridge(), join_queue(), kqueue_timer_ack(), kqueue_timer_disable_continuous(), kqueue_timer_enable_continuous(), kqueue_timer_set_rate(), leave_conference(), leave_marked(), leave_queue(), load_indications(), local_call(), local_devicestate(), local_hangup(), locals_show(), manager_fax_sessions_entry(), manager_optimize_away(), manager_queues_status(), manager_queues_summary(), manager_show_registry(), manager_sip_peer_status(), member_add_to_queue(), member_call_pending_clear(), member_call_pending_set(), member_remove_from_queue(), messaging_app_subscribe_endpoint(), messaging_app_unsubscribe_endpoint(), moh_class_destructor(), moh_release(), mohalloc(), monmp3thread(), msg_data_func_read(), msg_data_func_write(), msg_func_read(), msg_func_write(), msg_send_exec(), on_dns_update_peer(), park_common_setup(), parking_duration_callback(), parking_lot_retrieve_parked_user(), parking_lot_search_context_extension_inuse(), parking_park_bridge_channel(), pbx_outgoing_attempt(), pbx_outgoing_exec(), peercnt_add(), peercnt_remove(), peers_data_provider_get(), presence_state_cb(), process_events(), process_message(), pthread_timer_ack(), pthread_timer_disable_continuous(), pthread_timer_enable_continuous(), pthread_timer_get_event(), pthread_timer_open(), pthread_timer_set_rate(), publish_local_bridge_message(), publish_msg(), purge_sessions(), queue_function_mem_read(), queue_function_mem_write(), queue_function_qac_dep(), queue_function_queuegetchannel(), queue_function_queuememberlist(), queue_function_queuewaitingcount(), queue_function_var(), queues_data_provider_get(), realtime_sqlite3_execute_handle(), recalc_holdtime(), record_abandoned(), register_verify(), reinvite_timeout(), reload(), reload_queues(), reload_single_member(), reload_single_queue(), remove_from_queue(), ring_entry(), rna(), run_timer(), schedule_calendar_event(), session_do(), set_dial_masquerade(), set_eventmask(), set_member_paused(), set_member_penalty_help_members(), set_member_ringinuse_help_members(), set_queue_variables(), show_codecs(), single_state_process_bridge_enter(), sip_keepalive_all_peers(), sip_outbound_publish_timer_cb(), sip_outbound_registration_apply(), sip_poke_all_peers(), sip_prune_realtime(), sip_send_all_mwi_subscriptions(), sip_send_all_registers(), sip_send_mwi_to_peer(), sip_session_suspend_task(), sip_show_inuse(), sip_show_mwi(), sip_show_objects(), sip_show_registry(), sip_show_user(), sip_show_users(), sip_tcptls_write(), sla_add_trunk_to_station(), sla_build_station(), sla_build_trunk(), sla_change_trunk_state(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), sla_state(), sla_station_exec(), sla_station_is_marked(), sla_station_mark(), sla_trunk_is_marked(), sla_trunk_mark(), smdi_toggle_mwi(), sorcery_memory_update(), spandsp_fax_cli_show_session(), spandsp_manager_fax_session(), stasis_app_channel_unreal_set_internal(), stasis_app_control_execute_until_exhausted(), stasis_app_register(), stasis_cache_get_all(), stasis_cache_get_by_eid(), stasis_forward_all(), stasis_forward_cancel(), stasis_message_router_add(), stasis_message_router_add_cache_update(), stasis_message_router_remove(), stasis_message_router_remove_cache_update(), stasis_message_router_set_default(), stasis_message_router_unsubscribe(), stimulate_attended_transfer(), taskprocessor_push(), test_unlock(), threadpool_execute(), timerfd_timer_ack(), timerfd_timer_disable_continuous(), timerfd_timer_enable_continuous(), timerfd_timer_get_event(), timerfd_timer_set_rate(), try_calling(), unload_module(), unreal_colp_redirect_indicate(), unreal_queue_frame(), unreal_queue_indicate(), update_call_counter(), update_peer_lastmsgssent(), update_queue(), update_realtime_members(), wait_wrapper_removal(), xmpp_client_service_discovery_result_hook(), xmpp_pak_presence(), and xmpp_pak_s10n().

#define ao2_wrlock ( a   )     __ao2_lock(a, AO2_LOCK_REQ_WRLOCK, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)

#define OBJ_KEY   OBJ_SEARCH_KEY

Deprecated name

Definition at line 1043 of file astobj2.h.

Referenced by __ast_bucket_scheme_register(), __ast_sorcery_apply_default(), __ast_sorcery_apply_wizard_mapping(), __ast_sorcery_object_field_register(), __ast_sorcery_object_register(), __ast_sorcery_wizard_register(), acf_jabberstatus_read(), aco_option_find(), action_confbridgekick(), action_confbridgelist(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), add_sdp_streams(), agent_alert(), agent_cfg_find(), agent_cfg_sort_cmp(), agent_function_read(), agent_handle_show_specific(), agent_login_exec(), agent_logoff_request(), agent_pvt_cmp(), agent_pvt_devstate_get(), agent_pvt_sort_cmp(), agent_request_exec(), agent_run(), agents_post_apply_config(), alloc_variant(), announce_request(), app_exec(), applicationmap_sort(), ari_show_user(), ast_ari_config_validate_user(), ast_bucket_alloc(), ast_bucket_file_alloc(), ast_bucket_file_metadata_get(), ast_bucket_file_metadata_set(), ast_bucket_file_metadata_unset(), ast_channel_dialed_causes_add(), ast_channel_dialed_causes_find(), ast_channel_get_by_name_prefix(), ast_channel_hash_cb(), ast_channel_iterator_by_name_new(), ast_endpoint_find_by_id(), ast_get_chan_applicationmap(), ast_get_feature(), ast_media_get_variants(), ast_multi_channel_blob_get_channel(), ast_multi_channel_blob_get_channels(), ast_sip_publication_get_datastore(), ast_sip_publication_remove_datastore(), ast_sip_session_get_datastore(), ast_sip_session_register_sdp_handler(), ast_sip_session_remove_datastore(), ast_sip_session_unregister_sdp_handler(), ast_sip_subscription_get_datastore(), ast_sorcery_alloc(), ast_sorcery_copy(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_diff(), ast_sorcery_load_object(), ast_sorcery_object_fields_register(), ast_sorcery_object_set_copy_handler(), ast_sorcery_object_set_diff_handler(), ast_sorcery_objectset_apply(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_observer_add(), ast_sorcery_observer_remove(), ast_sorcery_reload_object(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_regex(), ast_sorcery_update(), ast_taskprocessor_create_with_listener(), ast_taskprocessor_get(), AST_TEST_DEFINE(), ast_websocket_server_add_protocol(), ast_websocket_server_remove_protocol(), ast_websocket_uri_cb(), authenticate_request(), authenticate_verify(), bridge_cmp_cb(), bridge_dtmf_hook_sort(), bridge_hash_cb(), bridge_profile_find(), bridge_sort_cmp(), bucket_file_metadata_cmp(), bucket_file_metadata_hash(), bucket_file_wizard_retrieve(), bucket_rbtree_str_sort_cmp(), bucket_scheme_cmp(), bucket_scheme_hash(), bucket_wizard_retrieve(), build_peer(), build_user(), cdr_object_channel_cmp_fn(), cdr_object_channel_hash_fn(), chan_pjsip_new(), channel_cmp(), channel_hash(), channel_role_hash_cb(), channel_role_multi_cmp_cb(), channel_role_single_cmp_cb(), channel_snapshot_cmp_cb(), channel_snapshot_hash_cb(), check_featuregroup_item(), cli_channel_retrieve_by_id(), cli_contact_retrieve_by_id(), client_buddy_handler(), complete_confbridge_participant(), conf_find_bridge_profile(), conf_find_user_profile(), conf_handle_talker_cb(), conf_set_menu_to_user(), conference_bridge_cmp_cb(), conference_bridge_hash_cb(), config_opt_cmp(), config_opt_hash(), datastore_cmp(), datastore_hash(), db_cmp_fn(), db_hash_fn(), dial_state_process_bridge_enter(), endpoint_internal_create(), featuregroup_cmp(), featuregroup_find(), featuregroup_hash(), find_database(), find_member_by_queuename_and_interface(), find_peer(), find_user(), find_variant(), forwards_sort(), func_confbridge_info(), generic_lock_unlock_helper(), generic_mute_unmute_helper(), group_item_sort(), handle_bridge_enter_message(), handle_bridge_leave_message(), handle_bridge_pairings(), handle_channel_cache_message(), handle_cli_confbridge_kick(), handle_cli_confbridge_list(), handle_cli_confbridge_start_record(), handle_cli_confbridge_stop_record(), handle_cli_iax2_unregister(), handle_dial_message(), handle_incoming_sdp(), handle_negotiated_sdp_session_media(), handle_parked_call_message(), iax2_destroy_helper(), insert_test_duplicates(), jingle_action_hook(), jingle_endpoint_cmp(), jingle_endpoint_find(), jingle_endpoint_hash(), jingle_request(), jingle_session_cmp(), jingle_session_hash(), join_conference_bridge(), media_info_cmp(), media_info_hash(), media_variant_cmp(), media_variant_hash(), member_cmp_fn(), member_hash_fn(), menu_cmp_cb(), menu_find(), menu_hash_cb(), menu_template_handler(), named_item_find(), notify_option_cmp(), notify_option_find(), notify_option_hash(), parking_lot_cfg_cmp_fn(), parking_lot_cfg_hash_fn(), parking_lot_sort_fn(), peer_cmp_cb(), peer_hash_cb(), persistent_endpoint_cmp(), persistent_endpoint_find_or_create(), persistent_endpoint_hash(), playback_cmp(), playback_hash(), protocol_cmp_fn(), protocol_hash_fn(), publication_cmp_fn(), publication_hash_fn(), pubsub_on_rx_publish_request(), recording_cmp(), recording_hash(), recording_sort(), sdp_handler_list_cmp(), sdp_handler_list_hash(), sdp_requires_deferral(), session_media_cmp(), session_media_dtor(), session_media_hash(), session_outgoing_nat_hook(), single_state_process_bridge_enter(), skel_find_or_create_state(), skel_level_cmp(), skel_level_find(), skel_level_hash(), sorcery_config_cmp(), sorcery_config_hash(), sorcery_config_retrieve_id(), sorcery_memory_cmp(), sorcery_memory_delete(), sorcery_memory_hash(), sorcery_memory_retrieve_id(), sorcery_memory_update(), sorcery_reloadable(), stasis_app_control_record(), stasis_app_playback_find_by_id(), stasis_app_recording_find_by_name(), t38_automatic_reject(), t38_framehook_read(), t38_framehook_write(), t38_interpret_parameters(), t38_reinvite_response_cb(), test_ao2_find_w_OBJ_KEY(), test_cmp_cb(), test_expected_duplicates(), test_hash_cb(), test_item_cmp(), test_item_find(), test_item_hash(), test_performance(), test_sort_cb(), tps_cmp_cb(), tps_hash_cb(), user_cmp_cb(), user_find(), user_hash_cb(), user_profile_find(), user_sort_cmp(), verify_default_parking_lot(), verify_default_profiles(), wait_bridge_hash_fn(), wait_bridge_sort_fn(), wait_bridge_wrapper_find_by_name(), xmpp_buddy_cmp(), xmpp_buddy_hash(), xmpp_client_config_merge_buddies(), xmpp_client_service_discovery_result_hook(), xmpp_component_register_get_hook(), xmpp_config_cmp(), xmpp_config_find(), xmpp_config_hash(), xmpp_pak_message(), xmpp_pak_presence(), xmpp_pak_s10n(), xmpp_resource_hash(), xmpp_roster_hook(), and xmpp_status_exec().

#define OBJ_PARTIAL_KEY   OBJ_SEARCH_PARTIAL_KEY

#define OBJ_POINTER   OBJ_SEARCH_OBJECT

Deprecated name

Definition at line 1042 of file astobj2.h.

Referenced by __find_call(), __find_callno(), _sip_tcp_helper_thread(), add_calltoken_ignore(), agent_cfg_sort_cmp(), agent_pvt_cmp(), agent_pvt_sort_cmp(), applicationmap_sort(), ast_config_hook_unregister(), ast_get_indication_zone(), ast_get_namedgroups(), ast_srtp_add_stream(), ast_srtp_change_source(), AST_TEST_DEFINE(), ast_unregister_indication_country(), bridge_cmp_cb(), bridge_dtmf_hook_sort(), bridge_hash_cb(), bridge_sort_cmp(), bucket_file_metadata_hash(), bucket_rbtree_str_sort_cmp(), bucket_scheme_hash(), build_callno_limits(), build_peer(), cdr_object_channel_cmp_fn(), cdr_object_channel_hash_fn(), channel_cmp(), channel_hash(), cli_alias_passthrough(), cli_fax_show_session(), compare_weight(), complete_indications(), conference_bridge_cmp_cb(), conference_bridge_hash_cb(), data_filter_find(), data_provider_find(), data_result_find_child(), data_search_find(), device_state_cb(), entry_cmp_fn(), featuregroup_cmp(), featuregroup_hash(), find_calendar(), find_cc_core_instance(), find_event(), find_generic_monitor_instance_list(), find_load_queue_rt_friendly(), find_pvt(), find_queue_by_name_rt(), forwards_sort(), get_esc_entry(), get_member_penalty(), get_sip_pvt_from_replaces(), group_cmp_fn(), group_item_sort(), handle_cli_indication_show(), hash_test_lookup(), hash_test_shrink(), manager_fax_session(), menu_cmp_cb(), menu_hash_cb(), msg_data_find(), named_acl_find(), namedgroup_match(), parking_lot_cfg_cmp_fn(), parking_lot_cfg_hash_fn(), parking_lot_sort_fn(), parse_tone_zone(), peercnt_add(), peercnt_modify(), peercnt_remove_by_addr(), presence_state_cb(), queue_function_queuegetchannel(), queue_function_queuememberlist(), queue_function_queuewaitingcount(), queue_function_var(), realtime_common(), realtime_sqlite3_require(), recording_cleanup(), recording_sort(), reload_queue_members(), reload_single_member(), reload_single_queue(), remove_from_playbacks(), remove_from_queue(), sched_delay_remove(), set_fn(), sip_find_peer_full(), sip_poke_peer_s(), sip_prune_realtime(), sip_tcptls_write(), sla_find_station(), sla_find_trunk(), test_ao2_find_w_OBJ_POINTER(), test_container_clone(), unsubscribe(), update_queue(), user_cmp_cb(), user_hash_cb(), ustmtext(), wait_bridge_hash_fn(), and wait_bridge_sort_fn().


Typedef Documentation

typedef int( ao2_callback_data_fn)(void *obj, void *arg, void *data, int flags)

Type of a generic callback function.

Parameters:
obj pointer to the (user-defined part) of an object.
arg callback argument from ao2_callback()
data arbitrary data from ao2_callback()
flags flags from ao2_callback() OBJ_SEARCH_OBJECT - if set, 'arg', is an object. OBJ_SEARCH_KEY - if set, 'arg', is a search key item that is not an object. OBJ_SEARCH_PARTIAL_KEY - if set, 'arg', is a partial search key item that is not an object.
The return values are a combination of enum _cb_results. Callback functions are used to search or manipulate objects in a container.

Definition at line 1136 of file astobj2.h.

typedef int( ao2_callback_fn)(void *obj, void *arg, int flags)

Type of a generic callback function.

Parameters:
obj pointer to the (user-defined part) of an object.
arg callback argument from ao2_callback()
flags flags from ao2_callback() OBJ_SEARCH_OBJECT - if set, 'arg', is an object. OBJ_SEARCH_KEY - if set, 'arg', is a search key item that is not an object. OBJ_SEARCH_PARTIAL_KEY - if set, 'arg', is a partial search key item that is not an object.
The return values are a combination of enum _cb_results. Callback functions are used to search or manipulate objects in a container.

Definition at line 1118 of file astobj2.h.

typedef void(* ao2_destructor_fn)(void *vdoomed)

Typedef for an object destructor.

Parameters:
vdoomed Object to destroy.
This is called just before freeing the memory for the object. It is passed a pointer to the user-defined data of the object.

Returns:
Nothing

Definition at line 409 of file astobj2.h.

typedef int( ao2_hash_fn)(const void *obj, int flags)

Type of a generic function to generate a hash value from an object.

Parameters:
obj pointer to the (user-defined part) of an object.
flags flags from ao2_callback() OBJ_SEARCH_OBJECT - if set, 'obj', is an object. OBJ_SEARCH_KEY - if set, 'obj', is a search key item that is not an object.
Note:
This function must be idempotent.
Returns:
Computed hash value.

Definition at line 1150 of file astobj2.h.

typedef void( ao2_prnt_fn)(void *where, const char *fmt,...)

Print output.

Since:
12.0.0
Parameters:
where User data pointer needed to determine where to put output.
fmt printf type format string.
Returns:
Nothing

Definition at line 1409 of file astobj2.h.

typedef void( ao2_prnt_obj_fn)(void *v_obj, void *where, ao2_prnt_fn *prnt)

Print object key.

Since:
12.0.0
Parameters:
v_obj A pointer to the object we want the key printed.
where User data needed by prnt to determine where to put output.
prnt Print output callback function to use.
Returns:
Nothing

Definition at line 1421 of file astobj2.h.

typedef int( ao2_sort_fn)(const void *obj_left, const void *obj_right, int flags)

Type of generic container sort function.

Parameters:
obj_left pointer to the (user-defined part) of an object.
obj_right pointer to the (user-defined part) of an object.
flags flags from ao2_callback() OBJ_SEARCH_OBJECT - if set, 'obj_right', is an object. OBJ_SEARCH_KEY - if set, 'obj_right', is a search key item that is not an object. OBJ_SEARCH_PARTIAL_KEY - if set, 'obj_right', is a partial search key item that is not an object.
Note:
This function must be idempotent.
Return values:
<0 if obj_left < obj_right
=0 if obj_left == obj_right
>0 if obj_left > obj_right

Definition at line 1168 of file astobj2.h.


Enumeration Type Documentation

A callback function will return a combination of CMP_MATCH and CMP_STOP. The latter will terminate the search in a container.

Enumerator:
CMP_MATCH  the object matches the request
CMP_STOP  stop the search now

Definition at line 918 of file astobj2.h.

00918                  {
00919    CMP_MATCH   = 0x1,   /*!< the object matches the request */
00920    CMP_STOP = 0x2,   /*!< stop the search now */
00921 };

Options available when allocating an ao2 object.

Enumerator:
AO2_ALLOC_OPT_LOCK_MUTEX  The ao2 object has a recursive mutex lock associated with it.
AO2_ALLOC_OPT_LOCK_RWLOCK  The ao2 object has a non-recursive read/write lock associated with it.
AO2_ALLOC_OPT_LOCK_NOLOCK  The ao2 object has no lock associated with it.
AO2_ALLOC_OPT_LOCK_MASK  The ao2 object locking option field mask.

Definition at line 412 of file astobj2.h.

00412                     {
00413    /*! The ao2 object has a recursive mutex lock associated with it. */
00414    AO2_ALLOC_OPT_LOCK_MUTEX = (0 << 0),
00415    /*! The ao2 object has a non-recursive read/write lock associated with it. */
00416    AO2_ALLOC_OPT_LOCK_RWLOCK = (1 << 0),
00417    /*! The ao2 object has no lock associated with it. */
00418    AO2_ALLOC_OPT_LOCK_NOLOCK = (2 << 0),
00419    /*! The ao2 object locking option field mask. */
00420    AO2_ALLOC_OPT_LOCK_MASK = (3 << 0),
00421 };

Options available when allocating an ao2 container object.

Note:
Each option is open to some interpretation by the container type as long as it makes sense with the option name.
Enumerator:
AO2_CONTAINER_ALLOC_OPT_INSERT_BEGIN  Insert objects at the beginning of the container. (Otherwise it is the opposite; insert at the end.).

Note:
If an ao2_sort_fn is provided, the object is inserted before any objects with duplicate keys.

Hash containers insert the object in the computed hash bucket in the indicated manner.

AO2_CONTAINER_ALLOC_OPT_DUPS_MASK  The ao2 container objects with duplicate keys option field mask.
AO2_CONTAINER_ALLOC_OPT_DUPS_ALLOW  Allow objects with duplicate keys in container.
AO2_CONTAINER_ALLOC_OPT_DUPS_REJECT  Reject objects with duplicate keys in container.

Note:
The container must be sorted. i.e. have an ao2_sort_fn.
AO2_CONTAINER_ALLOC_OPT_DUPS_OBJ_REJECT  Reject duplicate objects in container.

Don't link the same object into the container twice. However, you can link a different object with the same key.

Note:
The container must be sorted. i.e. have an ao2_sort_fn.

It is assumed that the objects are located where the search key says they should be located.

AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE  Replace objects with duplicate keys in container.

The existing duplicate object is removed and the new object takes the old object's place.

Note:
The container must be sorted. i.e. have an ao2_sort_fn.

Definition at line 1053 of file astobj2.h.

01053                         {
01054    /*!
01055     * \brief Insert objects at the beginning of the container.
01056     * (Otherwise it is the opposite; insert at the end.)
01057     *
01058     * \note If an ao2_sort_fn is provided, the object is inserted
01059     * before any objects with duplicate keys.
01060     *
01061     * \note Hash containers insert the object in the computed hash
01062     * bucket in the indicated manner.
01063     */
01064    AO2_CONTAINER_ALLOC_OPT_INSERT_BEGIN = (1 << 0),
01065 
01066    /*!
01067     * \brief The ao2 container objects with duplicate keys option field mask.
01068     */
01069    AO2_CONTAINER_ALLOC_OPT_DUPS_MASK = (3 << 1),
01070    /*!
01071     * \brief Allow objects with duplicate keys in container.
01072     */
01073    AO2_CONTAINER_ALLOC_OPT_DUPS_ALLOW = (0 << 1),
01074    /*!
01075     * \brief Reject objects with duplicate keys in container.
01076     *
01077     * \note The container must be sorted.  i.e. have an
01078     * ao2_sort_fn.
01079     */
01080    AO2_CONTAINER_ALLOC_OPT_DUPS_REJECT = (1 << 1),
01081    /*!
01082     * \brief Reject duplicate objects in container.
01083     *
01084     * \details Don't link the same object into the container twice.
01085     * However, you can link a different object with the same key.
01086     *
01087     * \note The container must be sorted.  i.e. have an
01088     * ao2_sort_fn.
01089     *
01090     * \note It is assumed that the objects are located where the
01091     * search key says they should be located.
01092     */
01093    AO2_CONTAINER_ALLOC_OPT_DUPS_OBJ_REJECT = (2 << 1),
01094    /*!
01095     * \brief Replace objects with duplicate keys in container.
01096     *
01097     * \details The existing duplicate object is removed and the new
01098     * object takes the old object's place.
01099     *
01100     * \note The container must be sorted.  i.e. have an
01101     * ao2_sort_fn.
01102     */
01103    AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE = (3 << 1),
01104 };

Flags that can be passed to ao2_iterator_init() to modify the behavior of the iterator.

Enumerator:
AO2_ITERATOR_DONTLOCK  Assume that the ao2_container is already locked.

Note:
For ao2_containers that have mutexes, no locking will be done.

For ao2_containers that have RWLOCKs, the lock will be promoted to write mode as needed. The lock will be returned to the original locked state.

Only use this flag if the ao2_container is manually locked already. You should hold the lock until after ao2_iterator_destroy(). If you must release the lock then you must at least hold the lock whenever you call an ao2_iterator_xxx function with this iterator.

AO2_ITERATOR_MALLOCD  Indicates that the iterator was dynamically allocated by astobj2 API and should be freed by ao2_iterator_destroy().
AO2_ITERATOR_UNLINK  Indicates that before the iterator returns an object from the container being iterated, the object should be unlinked from the container.
AO2_ITERATOR_DESCENDING  Iterate in descending order (Last to first container object) (Otherwise ascending order)

Note:
Other traversal orders such as pre-order and post-order do not make sense because they require the container structure to be static during the traversal. Iterators just about guarantee that is not going to happen because the container is allowed to change by other threads during the iteration.

Definition at line 1860 of file astobj2.h.

01860                         {
01861    /*!
01862     * \brief Assume that the ao2_container is already locked.
01863     *
01864     * \note For ao2_containers that have mutexes, no locking will
01865     * be done.
01866     *
01867     * \note For ao2_containers that have RWLOCKs, the lock will be
01868     * promoted to write mode as needed.  The lock will be returned
01869     * to the original locked state.
01870     *
01871     * \note Only use this flag if the ao2_container is manually
01872     * locked already.  You should hold the lock until after
01873     * ao2_iterator_destroy().  If you must release the lock then
01874     * you must at least hold the lock whenever you call an
01875     * ao2_iterator_xxx function with this iterator.
01876     */
01877    AO2_ITERATOR_DONTLOCK = (1 << 0),
01878    /*!
01879     * Indicates that the iterator was dynamically allocated by
01880     * astobj2 API and should be freed by ao2_iterator_destroy().
01881     */
01882    AO2_ITERATOR_MALLOCD = (1 << 1),
01883    /*!
01884     * Indicates that before the iterator returns an object from
01885     * the container being iterated, the object should be unlinked
01886     * from the container.
01887     */
01888    AO2_ITERATOR_UNLINK = (1 << 2),
01889    /*!
01890     * Iterate in descending order (Last to first container object)
01891     * (Otherwise ascending order)
01892     *
01893     * \note Other traversal orders such as pre-order and post-order
01894     * do not make sense because they require the container
01895     * structure to be static during the traversal.  Iterators just
01896     * about guarantee that is not going to happen because the
01897     * container is allowed to change by other threads during the
01898     * iteration.
01899     */
01900    AO2_ITERATOR_DESCENDING = (1 << 3),
01901 };

Which lock to request.

Enumerator:
AO2_LOCK_REQ_MUTEX  Request the mutex lock be acquired.
AO2_LOCK_REQ_RDLOCK  Request the read lock be acquired.
AO2_LOCK_REQ_WRLOCK  Request the write lock be acquired.

Definition at line 582 of file astobj2.h.

00582                   {
00583    /*! Request the mutex lock be acquired. */
00584    AO2_LOCK_REQ_MUTEX,
00585    /*! Request the read lock be acquired. */
00586    AO2_LOCK_REQ_RDLOCK,
00587    /*! Request the write lock be acquired. */
00588    AO2_LOCK_REQ_WRLOCK,
00589 };

Flags passed to ao2_callback_fn(), ao2_hash_fn(), and ao2_sort_fn() to modify behaviour.

Enumerator:
OBJ_UNLINK  Unlink the object for which the callback function returned CMP_MATCH.
OBJ_NODATA  On match, don't return the object hence do not increase its refcount.
OBJ_MULTIPLE  Don't stop at the first match in ao2_callback() unless the result of of the callback function has the CMP_STOP bit set.
OBJ_NOLOCK  Assume that the ao2_container is already locked.

Note:
For ao2_containers that have mutexes, no locking will be done.

For ao2_containers that have RWLOCKs, the lock will be promoted to write mode as needed. The lock will be returned to the original locked state.

Only use this flag if the ao2_container is manually locked already.

OBJ_SEARCH_MASK  Search option field mask.

Todo:
Eventually OBJ_SEARCH_MASK will shrink to a two bit field when the codebase is made to use the search field values as a field instead of independent bits.
OBJ_SEARCH_NONE  The arg parameter has no meaning to the astobj2 code.
OBJ_SEARCH_OBJECT  The arg parameter is an object of the same type.

The arg parameter is an object of the same type as the one being searched for, so use the object's ao2_hash_fn and/or ao2_sort_fn functions for optimized searching.

Note:
The supplied ao2_callback_fn is called after the container nodes have been filtered by the ao2_hash_fn and/or ao2_sort_fn functions.
OBJ_SEARCH_KEY  The arg parameter is a search key, but is not an object.

This can be used when you want to be able to pass custom data to the container's stored ao2_hash_fn, ao2_sort_fn, and ao2_find ao2_callback_fn functions that is not a full object, but perhaps just a string.

Note:
The supplied ao2_callback_fn is called after the container nodes have been filtered by the ao2_hash_fn and/or ao2_sort_fn functions.
OBJ_SEARCH_PARTIAL_KEY  The arg parameter is a partial search key similar to OBJ_SEARCH_KEY.

The partial key can be used by the ao2_sort_fn to guide the search to find a contiguous subset of a sorted container. For example, a sorted container holds: "A", "B", "Bert", "Beth", "Earnie". Doing a partial key search with "B" will find the sorted subset of all held objects starting with "B".

Note:
The supplied ao2_callback_fn is called after the container nodes have been filtered by the ao2_sort_fn function.
OBJ_ORDER_MASK  Traverse order option field mask.
OBJ_ORDER_ASCENDING  Traverse in ascending order (First to last container object).
OBJ_ORDER_DESCENDING  Traverse in descending order (Last to first container object).
OBJ_ORDER_PRE  Traverse in pre-order (Node then children, for tree container).

Note:
For non-tree containers, it is up to the container type to make the best interpretation of the order. For list and hash containers, this also means ascending order because a binary tree can degenerate into a list.
OBJ_ORDER_POST  Traverse in post-order (Children then node, for tree container).

Note:
For non-tree containers, it is up to the container type to make the best interpretation of the order. For list and hash containers, this also means descending order because a binary tree can degenerate into a list.

Definition at line 926 of file astobj2.h.

00926                   {
00927    /*!
00928     * Unlink the object for which the callback function returned
00929     * CMP_MATCH.
00930     */
00931    OBJ_UNLINK = (1 << 0),
00932    /*!
00933     * On match, don't return the object hence do not increase its
00934     * refcount.
00935     */
00936    OBJ_NODATA = (1 << 1),
00937    /*!
00938     * Don't stop at the first match in ao2_callback() unless the
00939     * result of of the callback function has the CMP_STOP bit set.
00940     */
00941    OBJ_MULTIPLE = (1 << 2),
00942    /*!
00943     * \brief Assume that the ao2_container is already locked.
00944     *
00945     * \note For ao2_containers that have mutexes, no locking will
00946     * be done.
00947     *
00948     * \note For ao2_containers that have RWLOCKs, the lock will be
00949     * promoted to write mode as needed.  The lock will be returned
00950     * to the original locked state.
00951     *
00952     * \note Only use this flag if the ao2_container is manually
00953     * locked already.
00954     */
00955    OBJ_NOLOCK = (1 << 4),
00956 
00957    /*!
00958     * \brief Search option field mask.
00959     *
00960     * \todo Eventually OBJ_SEARCH_MASK will shrink to a two bit
00961     * field when the codebase is made to use the search field
00962     * values as a field instead of independent bits.
00963     */
00964    OBJ_SEARCH_MASK = (0x07 << 5),
00965    /*! \brief The arg parameter has no meaning to the astobj2 code. */
00966    OBJ_SEARCH_NONE = (0 << 5),
00967    /*!
00968     * \brief The arg parameter is an object of the same type.
00969     *
00970     * \details
00971     * The arg parameter is an object of the same type as the one
00972     * being searched for, so use the object's ao2_hash_fn and/or
00973     * ao2_sort_fn functions for optimized searching.
00974     *
00975     * \note The supplied ao2_callback_fn is called after the
00976     * container nodes have been filtered by the ao2_hash_fn and/or
00977     * ao2_sort_fn functions.
00978     */
00979    OBJ_SEARCH_OBJECT = (1 << 5),
00980    /*!
00981     * \brief The arg parameter is a search key, but is not an object.
00982     *
00983     * \details
00984     * This can be used when you want to be able to pass custom data
00985     * to the container's stored ao2_hash_fn, ao2_sort_fn, and
00986     * ao2_find ao2_callback_fn functions that is not a full object,
00987     * but perhaps just a string.
00988     *
00989     * \note The supplied ao2_callback_fn is called after the
00990     * container nodes have been filtered by the ao2_hash_fn and/or
00991     * ao2_sort_fn functions.
00992     */
00993    OBJ_SEARCH_KEY = (2 << 5),
00994    /*!
00995     * \brief The arg parameter is a partial search key similar to OBJ_SEARCH_KEY.
00996     *
00997     * \details
00998     * The partial key can be used by the ao2_sort_fn to guide the
00999     * search to find a contiguous subset of a sorted container.
01000     * For example, a sorted container holds: "A", "B", "Bert",
01001     * "Beth", "Earnie".  Doing a partial key search with "B" will
01002     * find the sorted subset of all held objects starting with "B".
01003     *
01004     * \note The supplied ao2_callback_fn is called after the
01005     * container nodes have been filtered by the ao2_sort_fn
01006     * function.
01007     */
01008    OBJ_SEARCH_PARTIAL_KEY = (4 << 5),
01009 
01010    /*! \brief Traverse order option field mask. */
01011    OBJ_ORDER_MASK = (0x03 << 8),
01012    /*! \brief Traverse in ascending order (First to last container object) */
01013    OBJ_ORDER_ASCENDING = (0 << 8),
01014    /*! \brief Traverse in descending order (Last to first container object) */
01015    OBJ_ORDER_DESCENDING = (1 << 8),
01016    /*!
01017     * \brief Traverse in pre-order (Node then children, for tree container)
01018     *
01019     * \note For non-tree containers, it is up to the container type
01020     * to make the best interpretation of the order.  For list and
01021     * hash containers, this also means ascending order because a
01022     * binary tree can degenerate into a list.
01023     */
01024    OBJ_ORDER_PRE = (2 << 8),
01025    /*!
01026     * \brief Traverse in post-order (Children then node, for tree container)
01027     *
01028     * \note For non-tree containers, it is up to the container type
01029     * to make the best interpretation of the order.  For list and
01030     * hash containers, this also means descending order because a
01031     * binary tree can degenerate into a list.
01032     */
01033    OBJ_ORDER_POST = (3 << 8),
01034 };


Function Documentation

void* __ao2_alloc ( size_t  data_size,
ao2_destructor_fn  destructor_fn,
unsigned int  options 
)

Definition at line 628 of file astobj2.c.

References internal_ao2_alloc().

Referenced by hash_ao2_new_node(), and rb_ao2_new_node().

00629 {
00630    return internal_ao2_alloc(data_size, destructor_fn, options, __FILE__, __LINE__, __FUNCTION__);
00631 }

void* __ao2_alloc_debug ( size_t  data_size,
ao2_destructor_fn  destructor_fn,
unsigned int  options,
const char *  tag,
const char *  file,
int  line,
const char *  func,
int  ref_debug 
)

Definition at line 609 of file astobj2.c.

References ast_get_tid(), internal_ao2_alloc(), and NULL.

Referenced by __ao2_container_alloc_hash_debug(), __ao2_container_alloc_rbtree_debug(), __ast_channel_internal_alloc(), __ast_format_cap_alloc_debug(), __sip_alloc(), and _moh_class_malloc().

00611 {
00612    /* allocation */
00613    void *obj;
00614 
00615    if ((obj = internal_ao2_alloc(data_size, destructor_fn, options, file, line, func)) == NULL) {
00616       return NULL;
00617    }
00618 
00619    if (ref_log) {
00620       fprintf(ref_log, "%p,+1,%d,%s,%d,%s,**constructor**,%s\n", obj, ast_get_tid(), file, line, func, tag);
00621       fflush(ref_log);
00622    }
00623 
00624    /* return a pointer to the user data */
00625    return obj;
00626 }

void* __ao2_callback ( struct ao2_container c,
enum search_flags  flags,
ao2_callback_fn cb_fn,
void *  arg 
)

Definition at line 449 of file astobj2_container.c.

References AO2_CALLBACK_DEFAULT, internal_ao2_traverse(), and NULL.

Referenced by __ao2_find(), __ao2_unlink(), ao2_container_dup(), and container_destruct().

00451 {
00452    return internal_ao2_traverse(c, flags, cb_fn, arg, NULL, AO2_CALLBACK_DEFAULT, NULL, NULL, 0, NULL);
00453 }

void* __ao2_callback_data ( struct ao2_container c,
enum search_flags  flags,
ao2_callback_data_fn cb_fn,
void *  arg,
void *  data 
)

Definition at line 462 of file astobj2_container.c.

References AO2_CALLBACK_WITH_DATA, internal_ao2_traverse(), and NULL.

00464 {
00465    return internal_ao2_traverse(c, flags, cb_fn, arg, data, AO2_CALLBACK_WITH_DATA, NULL, NULL, 0, NULL);
00466 }

void* __ao2_callback_data_debug ( struct ao2_container c,
enum search_flags  flags,
ao2_callback_data_fn cb_fn,
void *  arg,
void *  data,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

Definition at line 455 of file astobj2_container.c.

References AO2_CALLBACK_WITH_DATA, and internal_ao2_traverse().

00458 {
00459    return internal_ao2_traverse(c, flags, cb_fn, arg, data, AO2_CALLBACK_WITH_DATA, tag, file, line, func);
00460 }

void* __ao2_callback_debug ( struct ao2_container c,
enum search_flags  flags,
ao2_callback_fn cb_fn,
void *  arg,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

Definition at line 442 of file astobj2_container.c.

References AO2_CALLBACK_DEFAULT, internal_ao2_traverse(), and NULL.

Referenced by __ao2_find_debug(), __ao2_unlink_debug(), __find_call(), and container_destruct_debug().

00445 {
00446    return internal_ao2_traverse(c, flags, cb_fn, arg, NULL, AO2_CALLBACK_DEFAULT, tag, file, line, func);
00447 }

void __ao2_cleanup ( void *  obj  ) 

gcc __attribute__(cleanup()) functions

Note:
they must be able to handle NULL parameters because most of the allocation/find functions can fail and we don't want to try to tear down a NULL

Definition at line 526 of file astobj2.c.

References ao2_ref.

Referenced by agent_request_exec(), bridge_after_cb(), bridge_agent_hold_push(), bridge_builtin_set_limits(), bridge_stasis_queue_join_action(), and parking_set_duration().

00527 {
00528    if (obj) {
00529       ao2_ref(obj, -1);
00530    }
00531 }

void __ao2_cleanup_debug ( void *  obj,
const char *  tag,
const char *  file,
int  line,
const char *  function 
)

Definition at line 519 of file astobj2.c.

References __ao2_ref_debug().

00520 {
00521    if (obj) {
00522       __ao2_ref_debug(obj, -1, tag, file, line, function);
00523    }
00524 }

struct ao2_container* __ao2_container_alloc_hash ( unsigned int  ao2_options,
unsigned int  container_options,
unsigned int  n_buckets,
ao2_hash_fn hash_fn,
ao2_sort_fn sort_fn,
ao2_callback_fn cmp_fn 
) [read]

Definition at line 1103 of file astobj2_hash.c.

References ao2_t_alloc_options, container_destruct(), and hash_ao2_container_init().

Referenced by __ao2_container_alloc_list().

01106 {
01107    unsigned int num_buckets;
01108    size_t container_size;
01109    struct ao2_container_hash *self;
01110 
01111    num_buckets = hash_fn ? n_buckets : 1;
01112    container_size = sizeof(struct ao2_container_hash) + num_buckets * sizeof(struct hash_bucket);
01113 
01114    self = ao2_t_alloc_options(container_size, container_destruct, ao2_options,
01115       "New hash container");
01116    return hash_ao2_container_init(self, container_options, num_buckets,
01117       hash_fn, sort_fn, cmp_fn);
01118 }

struct ao2_container* __ao2_container_alloc_hash_debug ( unsigned int  ao2_options,
unsigned int  container_options,
unsigned int  n_buckets,
ao2_hash_fn hash_fn,
ao2_sort_fn sort_fn,
ao2_callback_fn cmp_fn,
const char *  tag,
const char *  file,
int  line,
const char *  func,
int  ref_debug 
) [read]

Definition at line 1120 of file astobj2_hash.c.

References __ao2_alloc_debug(), container_destruct(), container_destruct_debug(), and hash_ao2_container_init().

Referenced by __ao2_container_alloc_list_debug(), and hash_ao2_alloc_empty_clone_debug().

01124 {
01125    unsigned int num_buckets;
01126    size_t container_size;
01127    struct ao2_container_hash *self;
01128 
01129    num_buckets = hash_fn ? n_buckets : 1;
01130    container_size = sizeof(struct ao2_container_hash) + num_buckets * sizeof(struct hash_bucket);
01131 
01132    self = __ao2_alloc_debug(container_size,
01133       ref_debug ? container_destruct_debug : container_destruct, ao2_options,
01134       tag, file, line, func, ref_debug);
01135    return hash_ao2_container_init(self, container_options, num_buckets, hash_fn,
01136       sort_fn, cmp_fn);
01137 }

struct ao2_container* __ao2_container_alloc_list ( unsigned int  ao2_options,
unsigned int  container_options,
ao2_sort_fn sort_fn,
ao2_callback_fn cmp_fn 
) [read]

Definition at line 1139 of file astobj2_hash.c.

References __ao2_container_alloc_hash(), and NULL.

01141 {
01142    return __ao2_container_alloc_hash(ao2_options, container_options, 1, NULL, sort_fn,
01143       cmp_fn);
01144 }

struct ao2_container* __ao2_container_alloc_list_debug ( unsigned int  ao2_options,
unsigned int  container_options,
ao2_sort_fn sort_fn,
ao2_callback_fn cmp_fn,
const char *  tag,
const char *  file,
int  line,
const char *  func,
int  ref_debug 
) [read]

Definition at line 1146 of file astobj2_hash.c.

References __ao2_container_alloc_hash_debug(), and NULL.

01149 {
01150    return __ao2_container_alloc_hash_debug(ao2_options, container_options, 1, NULL,
01151       sort_fn, cmp_fn, tag, file, line, func, ref_debug);
01152 }

struct ao2_container* __ao2_container_alloc_rbtree ( unsigned int  ao2_options,
unsigned int  container_options,
ao2_sort_fn sort_fn,
ao2_callback_fn cmp_fn 
) [read]

Definition at line 2063 of file astobj2_rbtree.c.

References ao2_t_alloc_options, ast_log, container_destruct(), LOG_ERROR, NULL, and rb_ao2_container_init().

02065 {
02066    struct ao2_container_rbtree *self;
02067 
02068    if (!sort_fn) {
02069       /* Sanity checks. */
02070       ast_log(LOG_ERROR, "Missing sort_fn()!\n");
02071       return NULL;
02072    }
02073 
02074    self = ao2_t_alloc_options(sizeof(*self), container_destruct, ao2_options,
02075       "New rbtree container");
02076    return rb_ao2_container_init(self, container_options, sort_fn, cmp_fn);
02077 }

struct ao2_container* __ao2_container_alloc_rbtree_debug ( unsigned int  ao2_options,
unsigned int  container_options,
ao2_sort_fn sort_fn,
ao2_callback_fn cmp_fn,
const char *  tag,
const char *  file,
int  line,
const char *  func,
int  ref_debug 
) [read]

Definition at line 2079 of file astobj2_rbtree.c.

References __ao2_alloc_debug(), __LOG_ERROR, ast_log, container_destruct(), container_destruct_debug(), NULL, and rb_ao2_container_init().

Referenced by rb_ao2_alloc_empty_clone_debug().

02082 {
02083    struct ao2_container_rbtree *self;
02084 
02085    if (!sort_fn) {
02086       /* Sanity checks. */
02087       ast_log(__LOG_ERROR, file, line, func, "Missing sort_fn()!\n");
02088       return NULL;
02089    }
02090 
02091    self = __ao2_alloc_debug(sizeof(*self),
02092       ref_debug ? container_destruct_debug : container_destruct, ao2_options,
02093       tag, file, line, func, ref_debug);
02094    return rb_ao2_container_init(self, container_options, sort_fn, cmp_fn);
02095 }

struct ao2_container* __ao2_container_clone ( struct ao2_container orig,
enum search_flags  flags 
) [read]

Create a clone/copy of the given container.

Since:
11.0
Parameters:
orig Container to copy all object references from.
flags OBJ_NOLOCK if a lock is already held on the container.
Note:
This can potentially be expensive because a malloc is needed for every object in the orig container.
Return values:
Clone container on success.
NULL on error.

Definition at line 739 of file astobj2_container.c.

References ao2_container_methods::alloc_empty_clone, ao2_container_dup(), ao2_t_ref, ao2_unlock, ao2_wrlock, ast_assert, is_ao2_object(), NULL, OBJ_NOLOCK, and ao2_container::v_table.

00740 {
00741    struct ao2_container *clone;
00742    int failed;
00743 
00744    /* Create the clone container with the same properties as the original. */
00745    if (!is_ao2_object(orig) || !orig->v_table || !orig->v_table->alloc_empty_clone) {
00746       /* Sanity checks. */
00747       ast_assert(0);
00748       return NULL;
00749    }
00750    clone = orig->v_table->alloc_empty_clone(orig);
00751    if (!clone) {
00752       return NULL;
00753    }
00754 
00755    if (flags & OBJ_NOLOCK) {
00756       ao2_wrlock(clone);
00757    }
00758    failed = ao2_container_dup(clone, orig, flags);
00759    if (flags & OBJ_NOLOCK) {
00760       ao2_unlock(clone);
00761    }
00762    if (failed) {
00763       /* Object copy into the clone container failed. */
00764       ao2_t_ref(clone, -1, "Clone creation failed.");
00765       clone = NULL;
00766    }
00767    return clone;
00768 }

struct ao2_container* __ao2_container_clone_debug ( struct ao2_container orig,
enum search_flags  flags,
const char *  tag,
const char *  file,
int  line,
const char *  func,
int  ref_debug 
) [read]

Definition at line 770 of file astobj2_container.c.

References __ao2_ref_debug(), ao2_container_methods::alloc_empty_clone_debug, ao2_container_dup(), ao2_t_ref, ao2_unlock, ao2_wrlock, ast_assert, is_ao2_object(), NULL, OBJ_NOLOCK, and ao2_container::v_table.

00771 {
00772    struct ao2_container *clone;
00773    int failed;
00774 
00775    /* Create the clone container with the same properties as the original. */
00776    if (!is_ao2_object(orig) || !orig->v_table || !orig->v_table->alloc_empty_clone_debug) {
00777       /* Sanity checks. */
00778       ast_assert(0);
00779       return NULL;
00780    }
00781    clone = orig->v_table->alloc_empty_clone_debug(orig, tag, file, line, func, ref_debug);
00782    if (!clone) {
00783       return NULL;
00784    }
00785 
00786    if (flags & OBJ_NOLOCK) {
00787       ao2_wrlock(clone);
00788    }
00789    failed = ao2_container_dup(clone, orig, flags);
00790    if (flags & OBJ_NOLOCK) {
00791       ao2_unlock(clone);
00792    }
00793    if (failed) {
00794       /* Object copy into the clone container failed. */
00795       if (ref_debug) {
00796          __ao2_ref_debug(clone, -1, tag, file, line, func);
00797       } else {
00798          ao2_t_ref(clone, -1, "Clone creation failed.");
00799       }
00800       clone = NULL;
00801    }
00802    return clone;
00803 }

void* __ao2_find ( struct ao2_container c,
const void *  arg,
enum search_flags  flags 
)

Definition at line 484 of file astobj2_container.c.

References __ao2_callback(), ast_assert, ao2_container::cmp_fn, and NULL.

Referenced by _get_mohbyname().

00485 {
00486    void *arged = (void *) arg;/* Done to avoid compiler const warning */
00487 
00488    if (!c) {
00489       /* Sanity checks. */
00490       ast_assert(0);
00491       return NULL;
00492    }
00493    return __ao2_callback(c, flags, c->cmp_fn, arged);
00494 }

void* __ao2_find_debug ( struct ao2_container c,
const void *  arg,
enum search_flags  flags,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

the find function just invokes the default callback with some reasonable flags.

Definition at line 471 of file astobj2_container.c.

References __ao2_callback_debug(), ast_assert, ao2_container::cmp_fn, and NULL.

Referenced by __ast_format_cache_get_debug(), __find_call(), and _get_mohbyname().

00473 {
00474    void *arged = (void *) arg;/* Done to avoid compiler const warning */
00475 
00476    if (!c) {
00477       /* Sanity checks. */
00478       ast_assert(0);
00479       return NULL;
00480    }
00481    return __ao2_callback_debug(c, flags, c->cmp_fn, arged, tag, file, line, func);
00482 }

void* __ao2_global_obj_ref ( struct ao2_global_obj holder,
const char *  tag,
const char *  file,
int  line,
const char *  func,
const char *  name 
)

Definition at line 708 of file astobj2.c.

References __ao2_ref(), __ao2_ref_debug(), __ast_rwlock_rdlock(), __ast_rwlock_unlock(), ast_assert, ast_log, ao2_global_obj::lock, LOG_ERROR, NULL, and ao2_global_obj::obj.

00709 {
00710    void *obj;
00711 
00712    if (!holder) {
00713       /* For sanity */
00714       ast_log(LOG_ERROR, "Must be called with a global object!\n");
00715       ast_assert(0);
00716       return NULL;
00717    }
00718 
00719    if (__ast_rwlock_rdlock(file, line, func, &holder->lock, name)) {
00720       /* Could not get the read lock. */
00721       ast_assert(0);
00722       return NULL;
00723    }
00724 
00725    obj = holder->obj;
00726    if (obj) {
00727       if (tag) {
00728          __ao2_ref_debug(obj, +1, tag, file, line, func);
00729       } else {
00730          __ao2_ref(obj, +1);
00731       }
00732    }
00733 
00734    __ast_rwlock_unlock(file, line, func, &holder->lock, name);
00735 
00736    return obj;
00737 }

void __ao2_global_obj_release ( struct ao2_global_obj holder,
const char *  tag,
const char *  file,
int  line,
const char *  func,
const char *  name 
)

Definition at line 634 of file astobj2.c.

References __ao2_ref(), __ao2_ref_debug(), __ast_rwlock_unlock(), __ast_rwlock_wrlock(), ast_assert, ast_log, ao2_global_obj::lock, LOG_ERROR, NULL, and ao2_global_obj::obj.

00635 {
00636    if (!holder) {
00637       /* For sanity */
00638       ast_log(LOG_ERROR, "Must be called with a global object!\n");
00639       ast_assert(0);
00640       return;
00641    }
00642    if (__ast_rwlock_wrlock(file, line, func, &holder->lock, name)) {
00643       /* Could not get the write lock. */
00644       ast_assert(0);
00645       return;
00646    }
00647 
00648    /* Release the held ao2 object. */
00649    if (holder->obj) {
00650       if (tag) {
00651          __ao2_ref_debug(holder->obj, -1, tag, file, line, func);
00652       } else {
00653          __ao2_ref(holder->obj, -1);
00654       }
00655       holder->obj = NULL;
00656    }
00657 
00658    __ast_rwlock_unlock(file, line, func, &holder->lock, name);
00659 }

void* __ao2_global_obj_replace ( struct ao2_global_obj holder,
void *  obj,
const char *  tag,
const char *  file,
int  line,
const char *  func,
const char *  name 
)

Definition at line 661 of file astobj2.c.

References __ao2_ref(), __ao2_ref_debug(), __ast_rwlock_unlock(), __ast_rwlock_wrlock(), ast_assert, ast_log, ao2_global_obj::lock, LOG_ERROR, NULL, and ao2_global_obj::obj.

Referenced by __ao2_global_obj_replace_unref().

00662 {
00663    void *obj_old;
00664 
00665    if (!holder) {
00666       /* For sanity */
00667       ast_log(LOG_ERROR, "Must be called with a global object!\n");
00668       ast_assert(0);
00669       return NULL;
00670    }
00671    if (__ast_rwlock_wrlock(file, line, func, &holder->lock, name)) {
00672       /* Could not get the write lock. */
00673       ast_assert(0);
00674       return NULL;
00675    }
00676 
00677    if (obj) {
00678       if (tag) {
00679          __ao2_ref_debug(obj, +1, tag, file, line, func);
00680       } else {
00681          __ao2_ref(obj, +1);
00682       }
00683    }
00684    obj_old = holder->obj;
00685    holder->obj = obj;
00686 
00687    __ast_rwlock_unlock(file, line, func, &holder->lock, name);
00688 
00689    return obj_old;
00690 }

int __ao2_global_obj_replace_unref ( struct ao2_global_obj holder,
void *  obj,
const char *  tag,
const char *  file,
int  line,
const char *  func,
const char *  name 
)

Definition at line 692 of file astobj2.c.

References __ao2_global_obj_replace(), __ao2_ref(), and __ao2_ref_debug().

00693 {
00694    void *obj_old;
00695 
00696    obj_old = __ao2_global_obj_replace(holder, obj, tag, file, line, func, name);
00697    if (obj_old) {
00698       if (tag) {
00699          __ao2_ref_debug(obj_old, -1, tag, file, line, func);
00700       } else {
00701          __ao2_ref(obj_old, -1);
00702       }
00703       return 1;
00704    }
00705    return 0;
00706 }

void* __ao2_iterator_next ( struct ao2_iterator iter  ) 

Definition at line 646 of file astobj2_container.c.

References internal_ao2_iterator_next(), and NULL.

00647 {
00648    return internal_ao2_iterator_next(iter, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__);
00649 }

void* __ao2_iterator_next_debug ( struct ao2_iterator iter,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

Definition at line 641 of file astobj2_container.c.

References internal_ao2_iterator_next().

00642 {
00643    return internal_ao2_iterator_next(iter, tag, file, line, func);
00644 }

int __ao2_link ( struct ao2_container c,
void *  obj_new,
int  flags 
)

Definition at line 169 of file astobj2_container.c.

References internal_ao2_link(), and NULL.

Referenced by dup_obj_cb(), and internal_ao2_traverse().

00170 {
00171    return internal_ao2_link(c, obj_new, flags, NULL, __FILE__, __LINE__, __PRETTY_FUNCTION__);
00172 }

int __ao2_link_debug ( struct ao2_container c,
void *  obj_new,
int  flags,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

Definition at line 164 of file astobj2_container.c.

References internal_ao2_link().

Referenced by internal_ao2_traverse().

00165 {
00166    return internal_ao2_link(c, obj_new, flags, tag, file, line, func);
00167 }

int __ao2_lock ( void *  a,
enum ao2_lock_req  lock_how,
const char *  file,
const char *  func,
int  line,
const char *  var 
)

Lock an object.

Parameters:
a A pointer to the object we want to lock.
lock_how,file,func,line,var 
Returns:
0 on success, other values on error.

Definition at line 152 of file astobj2.c.

References __ast_pthread_mutex_lock(), __ast_rwlock_rdlock(), __ast_rwlock_wrlock(), __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_LOCK_REQ_MUTEX, AO2_LOCK_REQ_RDLOCK, AO2_LOCK_REQ_WRLOCK, ast_assert, ast_atomic_fetchadd_int(), ast_log, INTERNAL_OBJ(), INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_rwlock_priv::lock, ao2_lock_priv::lock, astobj2_lock::mutex, NULL, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, and astobj2_rwlock::rwlock.

Referenced by _agent_lock(), _ast_bridge_channel_lock(), and _ast_bridge_lock().

00153 {
00154    struct astobj2 *obj = INTERNAL_OBJ(user_data);
00155    struct astobj2_lock *obj_mutex;
00156    struct astobj2_rwlock *obj_rwlock;
00157    int res = 0;
00158 
00159    if (obj == NULL) {
00160       ast_assert(0);
00161       return -1;
00162    }
00163 
00164    switch (obj->priv_data.options & AO2_ALLOC_OPT_LOCK_MASK) {
00165    case AO2_ALLOC_OPT_LOCK_MUTEX:
00166       obj_mutex = INTERNAL_OBJ_MUTEX(user_data);
00167       res = __ast_pthread_mutex_lock(file, line, func, var, &obj_mutex->mutex.lock);
00168 #ifdef AO2_DEBUG
00169       if (!res) {
00170          ast_atomic_fetchadd_int(&ao2.total_locked, 1);
00171       }
00172 #endif
00173       break;
00174    case AO2_ALLOC_OPT_LOCK_RWLOCK:
00175       obj_rwlock = INTERNAL_OBJ_RWLOCK(user_data);
00176       switch (lock_how) {
00177       case AO2_LOCK_REQ_MUTEX:
00178       case AO2_LOCK_REQ_WRLOCK:
00179          res = __ast_rwlock_wrlock(file, line, func, &obj_rwlock->rwlock.lock, var);
00180          if (!res) {
00181             ast_atomic_fetchadd_int(&obj_rwlock->rwlock.num_lockers, -1);
00182 #ifdef AO2_DEBUG
00183             ast_atomic_fetchadd_int(&ao2.total_locked, 1);
00184 #endif
00185          }
00186          break;
00187       case AO2_LOCK_REQ_RDLOCK:
00188          res = __ast_rwlock_rdlock(file, line, func, &obj_rwlock->rwlock.lock, var);
00189          if (!res) {
00190             ast_atomic_fetchadd_int(&obj_rwlock->rwlock.num_lockers, +1);
00191 #ifdef AO2_DEBUG
00192             ast_atomic_fetchadd_int(&ao2.total_locked, 1);
00193 #endif
00194          }
00195          break;
00196       }
00197       break;
00198    case AO2_ALLOC_OPT_LOCK_NOLOCK:
00199       /* The ao2 object has no lock. */
00200       break;
00201    default:
00202       ast_log(__LOG_ERROR, file, line, func, "Invalid lock option on ao2 object %p\n",
00203          user_data);
00204       return -1;
00205    }
00206 
00207    return res;
00208 }

int __ao2_ref ( void *  o,
int  delta 
)

int __ao2_ref_debug ( void *  o,
int  delta,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

Definition at line 481 of file astobj2.c.

References ast_assert, ast_get_tid(), internal_ao2_ref(), INTERNAL_OBJ(), and NULL.

Referenced by __ao2_cleanup_debug(), __ao2_container_clone_debug(), __ao2_global_obj_ref(), __ao2_global_obj_release(), __ao2_global_obj_replace(), __ao2_global_obj_replace_unref(), __ast_format_cap_append_debug(), __ast_module_ref(), __ast_module_unref(), __container_unlink_node_debug(), __find_call(), hash_ao2_new_node(), internal_ao2_iterator_next(), internal_ao2_traverse(), and rb_ao2_new_node().

00482 {
00483    struct astobj2 *obj = INTERNAL_OBJ(user_data);
00484    int old_refcount = -1;
00485 
00486    if (obj) {
00487       old_refcount = internal_ao2_ref(user_data, delta, file, line, func);
00488    }
00489 
00490    if (ref_log && user_data) {
00491       if (!obj) {
00492          /* Invalid object: Bad magic number. */
00493          fprintf(ref_log, "%p,%d,%d,%s,%d,%s,**invalid**,%s\n",
00494             user_data, delta, ast_get_tid(), file, line, func, tag);
00495          fflush(ref_log);
00496       } else if (old_refcount + delta == 0) {
00497          fprintf(ref_log, "%p,%d,%d,%s,%d,%s,**destructor**,%s\n",
00498             user_data, delta, ast_get_tid(), file, line, func, tag);
00499          fflush(ref_log);
00500       } else if (delta != 0) {
00501          fprintf(ref_log, "%p,%s%d,%d,%s,%d,%s,%d,%s\n", user_data, (delta < 0 ? "" : "+"),
00502             delta, ast_get_tid(), file, line, func, old_refcount, tag);
00503          fflush(ref_log);
00504       }
00505    }
00506 
00507    if (obj == NULL) {
00508       ast_assert(0);
00509    }
00510 
00511    return old_refcount;
00512 }

int __ao2_trylock ( void *  a,
enum ao2_lock_req  lock_how,
const char *  file,
const char *  func,
int  line,
const char *  var 
)

Try locking-- (don't block if fail).

Parameters:
a A pointer to the object we want to lock.
lock_how,file,func,line,var 
Returns:
0 on success, other values on error.

Definition at line 260 of file astobj2.c.

References __ast_pthread_mutex_trylock(), __ast_rwlock_tryrdlock(), __ast_rwlock_trywrlock(), __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_LOCK_REQ_MUTEX, AO2_LOCK_REQ_RDLOCK, AO2_LOCK_REQ_WRLOCK, ast_assert, ast_atomic_fetchadd_int(), ast_log, INTERNAL_OBJ(), INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_rwlock_priv::lock, ao2_lock_priv::lock, astobj2_lock::mutex, NULL, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, and astobj2_rwlock::rwlock.

Referenced by _ast_bridge_channel_trylock(), and _ast_bridge_trylock().

00261 {
00262    struct astobj2 *obj = INTERNAL_OBJ(user_data);
00263    struct astobj2_lock *obj_mutex;
00264    struct astobj2_rwlock *obj_rwlock;
00265    int res = 0;
00266 
00267    if (obj == NULL) {
00268       ast_assert(0);
00269       return -1;
00270    }
00271 
00272    switch (obj->priv_data.options & AO2_ALLOC_OPT_LOCK_MASK) {
00273    case AO2_ALLOC_OPT_LOCK_MUTEX:
00274       obj_mutex = INTERNAL_OBJ_MUTEX(user_data);
00275       res = __ast_pthread_mutex_trylock(file, line, func, var, &obj_mutex->mutex.lock);
00276 #ifdef AO2_DEBUG
00277       if (!res) {
00278          ast_atomic_fetchadd_int(&ao2.total_locked, 1);
00279       }
00280 #endif
00281       break;
00282    case AO2_ALLOC_OPT_LOCK_RWLOCK:
00283       obj_rwlock = INTERNAL_OBJ_RWLOCK(user_data);
00284       switch (lock_how) {
00285       case AO2_LOCK_REQ_MUTEX:
00286       case AO2_LOCK_REQ_WRLOCK:
00287          res = __ast_rwlock_trywrlock(file, line, func, &obj_rwlock->rwlock.lock, var);
00288          if (!res) {
00289             ast_atomic_fetchadd_int(&obj_rwlock->rwlock.num_lockers, -1);
00290 #ifdef AO2_DEBUG
00291             ast_atomic_fetchadd_int(&ao2.total_locked, 1);
00292 #endif
00293          }
00294          break;
00295       case AO2_LOCK_REQ_RDLOCK:
00296          res = __ast_rwlock_tryrdlock(file, line, func, &obj_rwlock->rwlock.lock, var);
00297          if (!res) {
00298             ast_atomic_fetchadd_int(&obj_rwlock->rwlock.num_lockers, +1);
00299 #ifdef AO2_DEBUG
00300             ast_atomic_fetchadd_int(&ao2.total_locked, 1);
00301 #endif
00302          }
00303          break;
00304       }
00305       break;
00306    case AO2_ALLOC_OPT_LOCK_NOLOCK:
00307       /* The ao2 object has no lock. */
00308       return 0;
00309    default:
00310       ast_log(__LOG_ERROR, file, line, func, "Invalid lock option on ao2 object %p\n",
00311          user_data);
00312       return -1;
00313    }
00314 
00315 
00316    return res;
00317 }

void* __ao2_unlink ( struct ao2_container c,
void *  obj,
int  flags 
)

Definition at line 202 of file astobj2_container.c.

References __ao2_callback(), ao2_match_by_addr(), ast_assert, is_ao2_object(), NULL, OBJ_NODATA, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_UNLINK.

00203 {
00204    if (!is_ao2_object(user_data)) {
00205       /* Sanity checks. */
00206       ast_assert(0);
00207       return NULL;
00208    }
00209 
00210    flags &= ~OBJ_SEARCH_MASK;
00211    flags |= (OBJ_UNLINK | OBJ_SEARCH_OBJECT | OBJ_NODATA);
00212    __ao2_callback(c, flags, ao2_match_by_addr, user_data);
00213 
00214    return NULL;
00215 }

void* __ao2_unlink_debug ( struct ao2_container c,
void *  obj,
int  flags,
const char *  tag,
const char *  file,
int  line,
const char *  func 
)

Definition at line 186 of file astobj2_container.c.

References __ao2_callback_debug(), ao2_match_by_addr(), ast_assert, is_ao2_object(), NULL, OBJ_NODATA, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_UNLINK.

00188 {
00189    if (!is_ao2_object(user_data)) {
00190       /* Sanity checks. */
00191       ast_assert(0);
00192       return NULL;
00193    }
00194 
00195    flags &= ~OBJ_SEARCH_MASK;
00196    flags |= (OBJ_UNLINK | OBJ_SEARCH_OBJECT | OBJ_NODATA);
00197    __ao2_callback_debug(c, flags, ao2_match_by_addr, user_data, tag, file, line, func);
00198 
00199    return NULL;
00200 }

int __ao2_unlock ( void *  a,
const char *  file,
const char *  func,
int  line,
const char *  var 
)

Unlock an object.

Parameters:
a A pointer to the object we want unlock.
file,func,line,var 
Returns:
0 on success, other values on error.

Definition at line 210 of file astobj2.c.

References __ast_pthread_mutex_unlock(), __ast_rwlock_unlock(), __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_RWLOCK, ast_assert, ast_atomic_fetchadd_int(), ast_log, INTERNAL_OBJ(), INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_rwlock_priv::lock, ao2_lock_priv::lock, astobj2_lock::mutex, NULL, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, and astobj2_rwlock::rwlock.

Referenced by _agent_unlock(), _ast_bridge_channel_unlock(), and _ast_bridge_unlock().

00211 {
00212    struct astobj2 *obj = INTERNAL_OBJ(user_data);
00213    struct astobj2_lock *obj_mutex;
00214    struct astobj2_rwlock *obj_rwlock;
00215    int res = 0;
00216    int current_value;
00217 
00218    if (obj == NULL) {
00219       ast_assert(0);
00220       return -1;
00221    }
00222 
00223    switch (obj->priv_data.options & AO2_ALLOC_OPT_LOCK_MASK) {
00224    case AO2_ALLOC_OPT_LOCK_MUTEX:
00225       obj_mutex = INTERNAL_OBJ_MUTEX(user_data);
00226       res = __ast_pthread_mutex_unlock(file, line, func, var, &obj_mutex->mutex.lock);
00227 #ifdef AO2_DEBUG
00228       if (!res) {
00229          ast_atomic_fetchadd_int(&ao2.total_locked, -1);
00230       }
00231 #endif
00232       break;
00233    case AO2_ALLOC_OPT_LOCK_RWLOCK:
00234       obj_rwlock = INTERNAL_OBJ_RWLOCK(user_data);
00235 
00236       current_value = ast_atomic_fetchadd_int(&obj_rwlock->rwlock.num_lockers, -1) - 1;
00237       if (current_value < 0) {
00238          /* It was a WRLOCK that we are unlocking.  Fix the count. */
00239          ast_atomic_fetchadd_int(&obj_rwlock->rwlock.num_lockers, -current_value);
00240       }
00241       res = __ast_rwlock_unlock(file, line, func, &obj_rwlock->rwlock.lock, var);
00242 #ifdef AO2_DEBUG
00243       if (!res) {
00244          ast_atomic_fetchadd_int(&ao2.total_locked, -1);
00245       }
00246 #endif
00247       break;
00248    case AO2_ALLOC_OPT_LOCK_NOLOCK:
00249       /* The ao2 object has no lock. */
00250       break;
00251    default:
00252       ast_log(__LOG_ERROR, file, line, func, "Invalid lock option on ao2 object %p\n",
00253          user_data);
00254       res = -1;
00255       break;
00256    }
00257    return res;
00258 }

int ao2_container_check ( struct ao2_container self,
enum search_flags  flags 
)

Perform an integrity check on the specified container.

Since:
12.0.0
Parameters:
self Container to check integrity.
flags OBJ_NOLOCK if a lock is already held on the container.
Return values:
0 on success.
-1 on error.

Definition at line 869 of file astobj2_container.c.

References ao2_rdlock, ao2_unlock, ast_assert, is_ao2_object(), and OBJ_NOLOCK.

Referenced by AST_TEST_DEFINE(), astobj2_test_1_helper(), hash_ao2_node_destructor(), insert_test_duplicates(), insert_test_vector(), internal_ao2_link(), rb_ao2_node_destructor(), and test_container_clone().

00870 {
00871    int res = 0;
00872 
00873    if (!is_ao2_object(self) || !self->v_table) {
00874       /* Sanity checks. */
00875       ast_assert(0);
00876       return -1;
00877    }
00878 #if defined(AO2_DEBUG)
00879    if (!self->v_table->integrity) {
00880       /* No ingetrigy check available.  Assume container is ok. */
00881       return 0;
00882    }
00883 
00884    if (!(flags & OBJ_NOLOCK)) {
00885       ao2_rdlock(self);
00886    }
00887    res = self->v_table->integrity(self);
00888    if (!(flags & OBJ_NOLOCK)) {
00889       ao2_unlock(self);
00890    }
00891 #endif   /* defined(AO2_DEBUG) */
00892    return res;
00893 }

int ao2_container_count ( struct ao2_container c  ) 

Returns the number of elements in a container.

return the number of elements in the container

Definition at line 36 of file astobj2_container.c.

References ast_atomic_fetchadd_int(), and ao2_container::elements.

Referenced by __ast_data_register(), __ast_manager_event_multichan(), __queues_show(), _sip_show_peers(), action_confbridgekick(), action_confbridgelist(), action_confbridgelistrooms(), action_confbridgesetsinglevideosrc(), action_confbridgestartrecord(), action_confbridgestoprecord(), action_lock_unlock_helper(), action_mute_unmute_helper(), ami_show_endpoints(), ami_show_resource_lists(), ao2_iterator_count(), app_is_finished(), ari_show(), ast_active_channels(), ast_ari_applications_list(), ast_ari_websocket_events_event_websocket(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), ast_cdr_unregister(), ast_data_search_match(), ast_endpoint_snapshot_create(), ast_get_chan_applicationmap(), ast_get_namedgroups(), ast_merge_contexts_and_delete(), ast_namedgroups_intersect(), ast_sip_cli_traverse_objects(), ast_sip_initialize_system(), ast_sip_location_retrieve_first_aor_contact(), ast_sorcery_create(), ast_sorcery_delete(), ast_sorcery_update(), ast_srtp_unprotect(), AST_TEST_DEFINE(), ast_tone_zone_count(), astobj2_test_1_helper(), auth_observer(), calc_metric(), cc_cli_output_status(), cel_pre_apply_config(), check_events(), cleanup(), cli_display_parking_lot(), cli_fax_show_sessions(), cli_tps_report(), control_command_count(), control_wait(), create_local_sdp(), create_sound_blob(), data_odbc_provider_handler(), data_provider_release(), data_provider_release_all(), device_state_cb(), dial_state_process_bridge_enter(), do_timing(), endelm(), format_ami_aor_handler(), get_device_state_causing_channels(), global_loaded_observer(), grow(), handle_cli_sound_show(), handle_feature_show(), handle_negotiated_sdp(), handle_registrations(), handle_show_hint(), handle_show_hints(), hints_data_provider_get(), insert_test_vector(), ip_identify(), load_common(), locals_show(), lock_broker(), match_filter(), meetme_data_provider_get(), member_add_to_queue(), mid_test_sync(), mwi_subscription_mailboxes_str(), native_bridge_is_capable(), native_rtp_bridge_compatible(), object_type_loaded_observer(), one_protocol(), parking_lot_remove_if_unused(), pjsip_acf_dial_contacts_read(), presence_state_cb(), process_config(), pthread_timer_open(), queue_exec(), queue_function_mem_read(), queued_set_size(), queued_task_pushed(), queues_data_provider_get_helper(), rx_task(), send_unsolicited_mwi_notify(), shrink(), single_state_process_bridge_enter(), sip_send_all_registers(), sip_show_objects(), sla_in_use(), smdi_load(), sorcery_object_load(), system_create_resolver_and_set_nameservers(), test_ao2_iteration(), test_cel_peer_strings_match(), test_container_clone(), test_sub(), threadpool_send_state_changed(), try_calling(), unload_module(), and xmpp_show_clients().

00037 {
00038    return ast_atomic_fetchadd_int(&c->elements, 0);
00039 }

void ao2_container_dump ( struct ao2_container self,
enum search_flags  flags,
const char *  name,
void *  where,
ao2_prnt_fn prnt,
ao2_prnt_obj_fn prnt_obj 
)

Display contents of the specified container.

Since:
12.0.0
Parameters:
self Container to dump.
flags OBJ_NOLOCK if a lock is already held on the container.
name Container name. (NULL if anonymous)
where User data needed by prnt to determine where to put output.
prnt Print output callback function to use.
prnt_obj Callback function to print the given object's key. (NULL if not available)
Returns:
Nothing

Definition at line 805 of file astobj2_container.c.

References ao2_rdlock, ao2_unlock, ast_assert, is_ao2_object(), and OBJ_NOLOCK.

Referenced by astobj2_test_1_helper(), and test_traversal_sorted().

00806 {
00807    if (!is_ao2_object(self) || !self->v_table) {
00808       prnt(where, "Invalid container\n");
00809       ast_assert(0);
00810       return;
00811    }
00812 
00813    if (!(flags & OBJ_NOLOCK)) {
00814       ao2_rdlock(self);
00815    }
00816    if (name) {
00817       prnt(where, "Container name: %s\n", name);
00818    }
00819 #if defined(AO2_DEBUG)
00820    if (self->v_table->dump) {
00821       self->v_table->dump(self, where, prnt, prnt_obj);
00822    } else
00823 #endif   /* defined(AO2_DEBUG) */
00824    {
00825       prnt(where, "Container dump not available.\n");
00826    }
00827    if (!(flags & OBJ_NOLOCK)) {
00828       ao2_unlock(self);
00829    }
00830 }

int ao2_container_dup ( struct ao2_container dest,
struct ao2_container src,
enum search_flags  flags 
)

Copy all object references in the src container into the dest container.

Since:
11.0
Parameters:
dest Container to copy src object references into.
src Container to copy all object references from.
flags OBJ_NOLOCK if a lock is already held on both containers. Otherwise, the src container is locked first.
Precondition:
The dest container must be empty. If the duplication fails, the dest container will be returned empty.
Note:
This can potentially be expensive because a malloc is needed for every object in the src container.
Return values:
0 on success.
-1 on error.

Definition at line 712 of file astobj2_container.c.

References __ao2_callback(), ao2_rdlock, ao2_t_ref, ao2_unlock, ao2_wrlock, dup_obj_cb(), NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_NOLOCK, and OBJ_UNLINK.

Referenced by __ao2_container_clone(), __ao2_container_clone_debug(), cli_aor_get_container(), cli_endpoint_get_container(), and cli_get_container().

00713 {
00714    void *obj;
00715    int res = 0;
00716 
00717    if (!(flags & OBJ_NOLOCK)) {
00718       ao2_rdlock(src);
00719       ao2_wrlock(dest);
00720    }
00721    obj = __ao2_callback(src, OBJ_NOLOCK, dup_obj_cb, dest);
00722    if (obj) {
00723       /* Failed to put this obj into the dest container. */
00724       ao2_t_ref(obj, -1, "Failed to put this object into the dest container.");
00725 
00726       /* Remove all items from the dest container. */
00727       __ao2_callback(dest, OBJ_NOLOCK | OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL,
00728          NULL);
00729       res = -1;
00730    }
00731    if (!(flags & OBJ_NOLOCK)) {
00732       ao2_unlock(dest);
00733       ao2_unlock(src);
00734    }
00735 
00736    return res;
00737 }

int ao2_container_register ( const char *  name,
struct ao2_container self,
ao2_prnt_obj_fn prnt_obj 
)

Register a container for CLI stats and integrity check.

Since:
12.0.0
Parameters:
name Name to register the container under.
self Container to register.
prnt_obj Callback function to print the given object's key. (NULL if not available)
Return values:
0 on success.
-1 on error.

Definition at line 971 of file astobj2_container.c.

References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_t_alloc_options, ao2_t_link, and ao2_t_ref.

Referenced by ast_bridging_init(), ast_cdr_engine_init(), and ast_channels_init().

00972 {
00973    int res = 0;
00974 #if defined(AO2_DEBUG)
00975    struct ao2_reg_container *reg;
00976 
00977    reg = ao2_t_alloc_options(sizeof(*reg) + strlen(name), ao2_reg_destructor,
00978       AO2_ALLOC_OPT_LOCK_NOLOCK, "Container registration object.");
00979    if (!reg) {
00980       return -1;
00981    }
00982 
00983    /* Fill in registered entry */
00984    ao2_t_ref(self, +1, "Registering container.");
00985    reg->registered = self;
00986    reg->prnt_obj = prnt_obj;
00987    strcpy(reg->name, name);/* safe */
00988 
00989    if (!ao2_t_link(reg_containers, reg, "Save registration object.")) {
00990       res = -1;
00991    }
00992 
00993    ao2_t_ref(reg, -1, "Done registering container.");
00994 #endif   /* defined(AO2_DEBUG) */
00995    return res;
00996 }

void ao2_container_stats ( struct ao2_container self,
enum search_flags  flags,
const char *  name,
void *  where,
ao2_prnt_fn prnt 
)

Display statistics of the specified container.

Since:
12.0.0
Parameters:
self Container to display statistics.
flags OBJ_NOLOCK if a lock is already held on the container.
name Container name. (NULL if anonymous)
where User data needed by prnt to determine where to put output.
prnt Print output callback function to use.
Returns:
Nothing

Definition at line 832 of file astobj2_container.c.

References ao2_rdlock, ao2_unlock, ast_assert, is_ao2_object(), and OBJ_NOLOCK.

Referenced by astobj2_test_1_helper(), and test_traversal_sorted().

00833 {
00834    if (!is_ao2_object(self) || !self->v_table) {
00835       prnt(where, "Invalid container\n");
00836       ast_assert(0);
00837       return;
00838    }
00839 
00840    if (!(flags & OBJ_NOLOCK)) {
00841       ao2_rdlock(self);
00842    }
00843    if (name) {
00844       prnt(where, "Container name: %s\n", name);
00845    }
00846    prnt(where, "Number of objects: %d\n", self->elements);
00847 #if defined(AO2_DEBUG)
00848    prnt(where, "Number of nodes: %d\n", self->nodes);
00849    prnt(where, "Number of empty nodes: %d\n", self->nodes - self->elements);
00850    /*
00851     * XXX
00852     * If the max_empty_nodes count gets out of single digits you
00853     * likely have a code path where ao2_iterator_destroy() is not
00854     * called.
00855     *
00856     * Empty nodes do not harm the container but they do make
00857     * container operations less efficient.
00858     */
00859    prnt(where, "Maximum empty nodes: %d\n", self->max_empty_nodes);
00860    if (self->v_table->stats) {
00861       self->v_table->stats(self, where, prnt);
00862    }
00863 #endif   /* defined(AO2_DEBUG) */
00864    if (!(flags & OBJ_NOLOCK)) {
00865       ao2_unlock(self);
00866    }
00867 }

void ao2_container_unregister ( const char *  name  ) 

Unregister a container for CLI stats and integrity check.

Since:
12.0.0
Parameters:
name Name the container is registered under.
Returns:
Nothing

Definition at line 998 of file astobj2_container.c.

References ao2_t_find, OBJ_NODATA, OBJ_SEARCH_KEY, and OBJ_UNLINK.

Referenced by bridge_cleanup(), cdr_engine_shutdown(), and channels_shutdown().

00999 {
01000 #if defined(AO2_DEBUG)
01001    ao2_t_find(reg_containers, name, OBJ_UNLINK | OBJ_NODATA | OBJ_SEARCH_KEY,
01002       "Unregister container");
01003 #endif   /* defined(AO2_DEBUG) */
01004 }

void ao2_iterator_cleanup ( struct ao2_iterator iter  ) 

Definition at line 558 of file astobj2_container.c.

References ao2_iterator_destroy().

Referenced by create_local_sdp(), and handle_negotiated_sdp().

00559 {
00560    if (iter) {
00561       ao2_iterator_destroy(iter);
00562    }
00563 }

int ao2_iterator_count ( struct ao2_iterator iter  ) 

Get a count of the iterated container objects.

Parameters:
iter the iterator to query
Return values:
The number of objects in the iterated container

Definition at line 651 of file astobj2_container.c.

References ao2_container_count(), and ao2_iterator::c.

Referenced by create_local_sdp(), and handle_negotiated_sdp().

00652 {
00653    return ao2_container_count(iter->c);
00654 }

void ao2_iterator_destroy ( struct ao2_iterator iter  ) 

Destroy a container iterator.

Parameters:
iter the iterator to destroy
Return values:
none This function will release the container reference held by the iterator and any other resources it may be holding.

Definition at line 543 of file astobj2_container.c.

References AO2_ITERATOR_MALLOCD, ao2_iterator_restart(), ao2_t_ref, ast_free, ao2_iterator::c, ao2_iterator::flags, and NULL.

Referenced by __ast_data_search_cmp_structure(), __ast_manager_event_multichan(), __data_result_print_cli(), __find_call(), __iax2_show_peers(), __queues_show(), __test_cel_generate_peer_str(), _sip_show_peers(), aco_set_defaults(), action_agents(), action_confbridgelistrooms(), action_coreshowchannels(), action_devicestatelist(), action_extensionstatelist(), action_meetmelist(), action_presencestatelist(), add_ice_to_sdp(), add_ice_to_stream(), agent_show_requested(), agents_post_apply_config(), agents_sweep(), alias_show(), ao2_iterator_cleanup(), app_to_json(), ast_add_hint(), ast_ari_bridges_list(), ast_ari_channels_list(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), ast_ari_recordings_list_stored(), ast_bridge_channel_kick(), ast_bucket_file_json(), ast_bucket_json(), ast_cdr_setvar(), ast_channel_iterator_destroy(), ast_complete_channels(), ast_data_iterator_end(), ast_data_search_match(), ast_endpoint_snapshot_create(), ast_merge_contexts_and_delete(), ast_msg_var_iterator_destroy(), ast_multi_channel_blob_get_channels(), ast_pickup_find_by_group(), ast_print_namedgroups(), ast_sip_for_each_contact(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_regex(), ast_srtp_unprotect(), AST_TEST_DEFINE(), ast_var_indications(), ast_var_indications_table(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), astobj2_test_1_helper(), auth_observer(), authenticate(), authenticate_reply(), bridge_app_subscribed_involved(), bridge_channel_event_join_leave(), bridge_channel_moving(), bridge_channel_talking(), build_cli_notify(), calendar_query_exec(), cel_generate_peer_str(), check_access(), check_events(), clear_queue(), clear_stats(), cli_complete_endpoint(), cli_complete_notify(), cli_complete_registration(), cli_complete_show(), cli_console_active(), cli_display_named_acl_list(), cli_fax_show_sessions(), cli_list_devices(), cli_show_channels(), cli_tps_report(), compare_weight(), complete_bridge_profile_name(), complete_bridge_stasis(), complete_confbridge_name(), complete_core_id(), complete_core_show_hint(), complete_country(), complete_iax2_peers(), complete_iax2_unregister(), complete_menu_name(), complete_queue(), complete_queue_remove_member(), complete_show_sorcery_object(), complete_sip_peer(), complete_sip_registered_peer(), complete_sip_user(), complete_sipch(), complete_user_profile_name(), complete_userno(), conf_queue_dtmf(), config_hook_exec(), configure_parking_extensions(), container_to_json_array(), control_dispatch_all(), control_prestart_dispatch_all(), data_filter_find(), data_odbc_provider_handler(), data_provider_print_cli(), data_provider_release_all(), data_result_generate_node(), data_result_manager_output(), destroy_pvts(), device_state_cb(), dial_state_process_bridge_enter(), dialgroup_read(), disable_marked_lots(), dump_queue_members(), endpoint_receives_unsolicited_mwi_for_mailbox(), extension_state_cb(), fax_session_tab_complete(), find_queue_by_name_rt(), find_ringing_channel(), find_session(), find_session_by_nonce(), free_members(), generate_or_link_lots_to_configs(), get_device_state_causing_channels(), get_member_status(), get_transferee(), handle_bridge_pairings(), handle_bridge_show_all(), handle_chanlist(), handle_cli_confbridge_list(), handle_cli_confbridge_show_bridge_profiles(), handle_cli_confbridge_show_menus(), handle_cli_confbridge_show_user_profiles(), handle_cli_iax2_show_callno_limits(), handle_cli_iax2_show_users(), handle_cli_indication_show(), handle_cli_moh_show_classes(), handle_cli_moh_show_files(), handle_cli_odbc_show(), handle_cli_sound_show(), handle_cli_status(), handle_show_calendar(), handle_show_calendars(), handle_show_hint(), handle_show_hints(), handle_show_named_acl_cmd(), handle_showmanconn(), handle_skel_show_games(), handle_skel_show_levels(), hints_data_provider_get(), iax2_getpeername(), iax2_getpeertrunk(), interface_exists(), jingle_add_google_candidates_to_transport(), jingle_add_ice_udp_candidates_to_transport(), jingle_request(), kill_duplicate_offers(), load_users(), local_devicestate(), locals_show(), manager_fax_sessions(), manager_iax2_show_peer_list(), manager_parking_status_all_lots(), manager_parking_status_single_lot(), manager_queues_status(), manager_queues_summary(), manager_show_registry(), manager_sip_peer_status(), mark_lots_as_disabled(), meetme_menu_admin_extended(), meetme_show_cmd(), moh_rescan_files(), msg_func_write(), multihomed_get_udp_transport(), mwi_initial_events(), mwi_mailbox_delete_all(), mwi_mailbox_get(), mwi_subscription_mailboxes_str(), num_available_members(), parking_lot_get_space(), peers_data_provider_get(), pjsip_acf_dial_contacts_read(), pjsip_aor_function_read(), poke_all_peers(), pp_each_user_helper(), presence_state_cb(), prune_peers(), prune_users(), purge_sessions(), queue_function_mem_read(), queue_function_qac_dep(), queue_function_queuememberlist(), queues_data_provider_get(), queues_data_provider_get_helper(), reload(), remove_all_configured_parking_lot_extensions(), remove_pending_parking_lot_extensions(), rt_handle_member_record(), session_shutdown(), set_member_paused(), set_member_value(), set_transfer_variables_all(), show_codecs(), single_state_process_bridge_enter(), sip_keepalive_all_peers(), sip_outbound_publish_synchronize(), sip_poke_all_peers(), sip_prune_realtime(), sip_send_all_mwi_subscriptions(), sip_send_all_registers(), sip_show_channel(), sip_show_history(), sip_show_inuse(), sip_show_mwi(), sip_show_objects(), sip_show_registry(), sip_show_tcp(), sip_show_users(), sla_calc_station_delays(), sla_change_trunk_state(), sla_queue_event_conf(), sla_show_stations(), sla_show_trunks(), stasis_app_mailboxes_to_json(), stop_streams(), system_create_resolver_and_set_nameservers(), test_ao2_callback_traversal(), test_ao2_iteration(), test_container_clone(), test_expected_duplicates(), tps_taskprocessor_tab_complete(), try_calling(), unbound_config_preapply(), unload_module(), update_queue(), update_realtime_members(), users_data_provider_get(), xmpp_pubsub_create_affiliations(), xmpp_show_buddies(), and xmpp_show_clients().

00544 {
00545    /* Release any last container node reference. */
00546    ao2_iterator_restart(iter);
00547 
00548    /* Release the iterated container reference. */
00549    ao2_t_ref(iter->c, -1, "Unref iterator in ao2_iterator_destroy");
00550    iter->c = NULL;
00551 
00552    /* Free the malloced iterator. */
00553    if (iter->flags & AO2_ITERATOR_MALLOCD) {
00554       ast_free(iter);
00555    }
00556 }

struct ao2_iterator ao2_iterator_init ( struct ao2_container c,
int  flags 
) [read]

Create an iterator for a container.

Parameters:
c the container
flags one or more flags from ao2_iterator_flags.
Return values:
the constructed iterator
Note:
This function does not take a pointer to an iterator; rather, it returns an iterator structure that should be assigned to (overwriting) an existing iterator structure allocated on the stack or on the heap.
This function will take a reference on the container being iterated.

initialize an iterator so we start from the first object

Definition at line 499 of file astobj2_container.c.

References ao2_t_ref, ao2_iterator::c, and ao2_iterator::flags.

Referenced by __ast_data_search_cmp_structure(), __ast_manager_event_multichan(), __data_result_print_cli(), __iax2_show_peers(), __queues_show(), __test_cel_generate_peer_str(), aco_set_defaults(), action_agents(), action_confbridgelistrooms(), action_coreshowchannels(), action_devicestatelist(), action_extensionstatelist(), action_meetmelist(), action_presencestatelist(), add_ice_to_sdp(), add_ice_to_stream(), agent_show_requested(), agents_post_apply_config(), alias_show(), app_to_json(), ast_add_hint(), ast_ari_bridges_list(), ast_ari_channels_list(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), ast_ari_recordings_list_stored(), ast_bridge_channel_kick(), ast_bucket_file_json(), ast_bucket_json(), ast_channel_iterator_all_new(), ast_complete_channels(), ast_data_iterator_init(), ast_data_search_match(), ast_endpoint_snapshot_create(), ast_merge_contexts_and_delete(), ast_msg_var_iterator_init(), ast_pickup_find_by_group(), ast_print_namedgroups(), ast_sip_for_each_contact(), ast_sorcery_objectset_create2(), ast_sorcery_objectset_json_create(), ast_sorcery_retrieve_by_fields(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_regex(), ast_srtp_unprotect(), AST_TEST_DEFINE(), ast_tone_zone_iterator_init(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), astobj2_test_1_helper(), auth_observer(), authenticate(), authenticate_reply(), bridge_app_subscribed_involved(), bridge_channel_event_join_leave(), bridge_channel_moving(), bridge_channel_talking(), build_cli_notify(), calendar_query_exec(), cel_generate_peer_str(), check_access(), check_events(), clear_queue(), clear_stats(), cli_complete_endpoint(), cli_complete_notify(), cli_complete_registration(), cli_complete_show(), cli_console_active(), cli_display_named_acl_list(), cli_fax_show_sessions(), cli_list_devices(), cli_show_channels(), cli_tps_report(), compare_weight(), complete_bridge_profile_name(), complete_bridge_stasis(), complete_confbridge_name(), complete_core_id(), complete_core_show_hint(), complete_country(), complete_iax2_peers(), complete_iax2_unregister(), complete_menu_name(), complete_queue(), complete_queue_remove_member(), complete_show_sorcery_object(), complete_sip_peer(), complete_sip_registered_peer(), complete_sip_user(), complete_sipch(), complete_user_profile_name(), complete_userno(), conf_queue_dtmf(), config_hook_exec(), configure_parking_extensions(), container_to_json_array(), control_dispatch_all(), control_prestart_dispatch_all(),