part 1 of many standardizing typedefed types to end in _t

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1292 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2006-04-29 01:00:52 +00:00
parent 751ca005d3
commit d0347b2a95
41 changed files with 344 additions and 333 deletions
@@ -37,7 +37,7 @@
static const char modname[] = "mod_dingaling";
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
typedef enum {
TFLAG_IO = (1 << 0),
@@ -74,7 +74,7 @@ static struct {
int codec_rates_last;
unsigned int flags;
unsigned int init;
switch_hash *profile_hash;
switch_hash_t *profile_hash;
int running;
int handles;
} globals;
@@ -107,7 +107,7 @@ struct private_object {
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
unsigned int num_codecs;
int codec_index;
struct switch_rtp *rtp_session;
switch_rtp_t *rtp_session;
ldl_session_t *dlsession;
char *remote_ip;
switch_port_t local_port;
@@ -155,7 +155,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
static switch_status channel_on_loopback(switch_core_session *session);
static switch_status channel_on_transmit(switch_core_session *session);
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool);
switch_core_session **new_session, switch_memory_pool_t *pool);
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -200,7 +200,7 @@ static void get_codecs(struct private_object *tech_pvt)
static void *SWITCH_THREAD_FUNC handle_thread_run(switch_thread *thread, void *obj)
static void *SWITCH_THREAD_FUNC handle_thread_run(switch_thread_t *thread, void *obj)
{
ldl_handle_t *handle = obj;
struct mdl_profile *profile = NULL;
@@ -217,7 +217,7 @@ static void *SWITCH_THREAD_FUNC handle_thread_run(switch_thread *thread, void *o
static void handle_thread_launch(ldl_handle_t *handle)
{
switch_thread *thread;
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
switch_threadattr_create(&thd_attr, module_pool);
@@ -449,7 +449,7 @@ static int do_describe(struct private_object *tech_pvt, int force)
return 0;
}
static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread *thread, void *obj)
static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread_t *thread, void *obj)
{
switch_core_session *session = obj;
@@ -532,7 +532,7 @@ static void *SWITCH_THREAD_FUNC negotiate_thread_run(switch_thread *thread, void
static void negotiate_thread_launch(switch_core_session *session)
{
switch_thread *thread;
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
switch_threadattr_create(&thd_attr, switch_core_session_get_pool(session));
@@ -1009,7 +1009,7 @@ static const switch_loadable_module_interface channel_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool)
switch_core_session **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
+7 -7
View File
@@ -41,7 +41,7 @@
static const char modname[] = "mod_exosip";
#define STRLEN 15
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
@@ -88,8 +88,8 @@ static struct {
char *codec_string;
char *codec_order[SWITCH_MAX_CODECS];
int codec_order_last;
switch_hash *call_hash;
switch_hash *srtp_hash;
switch_hash_t *call_hash;
switch_hash_t *srtp_hash;
int running;
int codec_ms;
int dtmf_duration;
@@ -110,7 +110,7 @@ struct private_object {
int32_t timestamp_recv;
int32_t timestamp_dtmf;
int payload_num;
struct switch_rtp *rtp_session;
switch_rtp_t *rtp_session;
struct osip_rfc3264 *sdp_config;
sdp_message_t *remote_sdp;
sdp_message_t *local_sdp;
@@ -150,7 +150,7 @@ static switch_status exosip_on_hangup(switch_core_session *session);
static switch_status exosip_on_loopback(switch_core_session *session);
static switch_status exosip_on_transmit(switch_core_session *session);
static switch_status exosip_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool);
switch_core_session **new_session, switch_memory_pool_t *pool);
static switch_status exosip_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status exosip_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -996,7 +996,7 @@ static const switch_loadable_module_interface exosip_module_interface = {
};
static switch_status exosip_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool)
switch_core_session **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&exosip_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
@@ -1808,7 +1808,7 @@ static int config_exosip(int reload)
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
{
eXosip_event_t *event = NULL;
switch_event *s_event;
switch_event_t *s_event;
config_exosip(0);
+4 -4
View File
@@ -44,7 +44,7 @@
static const char modname[] = "mod_iax";
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
static int running = 1;
@@ -396,7 +396,7 @@ static switch_status channel_on_ring(switch_core_session *session);
static switch_status channel_on_loopback(switch_core_session *session);
static switch_status channel_on_transmit(switch_core_session *session);
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool);
switch_core_session **new_session, switch_memory_pool_t *pool);
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -724,7 +724,7 @@ static const switch_loadable_module_interface channel_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool)
switch_core_session **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
@@ -871,7 +871,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
{
//int refresh;
struct iax_event *iaxevent = NULL;
switch_event *s_event;
switch_event_t *s_event;
if (load_config() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_TERM;
}
@@ -41,7 +41,7 @@
static const char modname[] = "mod_portaudio";
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
//static int running = 1;
#define SAMPLE_TYPE paInt16
@@ -73,7 +73,7 @@ static struct {
int indev;
int outdev;
int call_id;
switch_hash *call_hash;
switch_hash_t *call_hash;
switch_mutex_t *device_lock;
int sample_rate;
} globals;
@@ -105,7 +105,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
static switch_status channel_on_transmit(switch_core_session *session);
static switch_status channel_outgoing_channel(switch_core_session *session,
switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool);
switch_core_session **new_session, switch_memory_pool_t *pool);
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -268,7 +268,7 @@ static switch_status channel_on_transmit(switch_core_session *session)
while (switch_channel_get_state(channel) == CS_TRANSMIT && !switch_test_flag(tech_pvt, TFLAG_ANSWER)) {
if (switch_time_now() - last >= waitsec) {
char buf[512];
switch_event *event;
switch_event_t *event;
snprintf(buf, sizeof(buf), "BRRRRING! BRRRRING! call %s\n", tech_pvt->call_id);
@@ -476,7 +476,7 @@ static const switch_loadable_module_interface channel_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool)
switch_core_session **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
+6 -6
View File
@@ -50,7 +50,7 @@
static const char modname[] = "mod_woomera";
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
#define STRLEN 15
#define FRAME_LEN 480
@@ -169,7 +169,7 @@ static switch_status woomerachan_on_ring(switch_core_session *session);
static switch_status woomerachan_on_loopback(switch_core_session *session);
static switch_status woomerachan_on_transmit(switch_core_session *session);
static switch_status woomerachan_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool);
switch_core_session **new_session, switch_memory_pool_t *pool);
static switch_status woomerachan_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status woomerachan_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
@@ -186,7 +186,7 @@ static int connect_woomera(switch_socket_t **new_sock, woomera_profile * profile
static int woomera_profile_thread_running(woomera_profile * profile, int set, int new);
static int woomera_locate_socket(woomera_profile * profile, switch_socket_t **woomera_socket);
static int tech_create_read_socket(private_object * tech_pvt);
static void *woomera_channel_thread_run(switch_thread *thread, void *obj);
static void *woomera_channel_thread_run(switch_thread_t *thread, void *obj);
static void *woomera_thread_run(void *obj);
static int tech_activate(private_object * tech_pvt);
@@ -473,7 +473,7 @@ static const switch_loadable_module_interface woomerachan_module_interface = {
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status woomerachan_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
switch_core_session **new_session, switch_memory_pool *pool)
switch_core_session **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&woomerachan_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
@@ -858,7 +858,7 @@ static int woomera_locate_socket(woomera_profile * profile, switch_socket_t **wo
static int tech_create_read_socket(private_object * tech_pvt)
{
switch_memory_pool *pool = switch_core_session_get_pool(tech_pvt->session);
switch_memory_pool_t *pool = switch_core_session_get_pool(tech_pvt->session);
if ((tech_pvt->port = globals.next_woomera_port++) >= WOOMERA_MAX_PORT) {
tech_pvt->port = globals.next_woomera_port = WOOMERA_MIN_PORT;
@@ -926,7 +926,7 @@ static int tech_activate(private_object * tech_pvt)
static void *woomera_channel_thread_run(switch_thread *thread, void *obj)
static void *woomera_channel_thread_run(switch_thread_t *thread, void *obj)
{
switch_core_session *session = obj;
switch_channel *channel = NULL;
@@ -33,7 +33,7 @@
static const char modname[] = "mod_event_multicast";
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
static struct {
char *address;
@@ -81,7 +81,7 @@ static switch_status load_config(void)
}
static void event_handler(switch_event *event)
static void event_handler(switch_event_t *event)
{
char buf[1024];
size_t len;
@@ -189,7 +189,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
{
switch_event *local_event;
switch_event_t *local_event;
char buf[1024];
globals.running = 1;
@@ -36,7 +36,7 @@ static const char modname[] = "mod_event_test";
//#define TORTURE_ME
static void event_handler(switch_event *event)
static void event_handler(switch_event_t *event)
{
char buf[1024];
@@ -68,12 +68,12 @@ static switch_loadable_module_interface event_test_module_interface = {
#define TTHREADS 500
static int THREADS = 0;
static void *torture_thread(switch_thread *thread, void *obj)
static void *torture_thread(switch_thread_t *thread, void *obj)
{
int y = 0;
int z = 0;
switch_core_thread_session *ts = obj;
switch_event *event;
switch_event_t *event;
z = THREADS++;
@@ -89,7 +89,7 @@ static void *torture_thread(switch_thread *thread, void *obj)
}
if (ts->pool) {
switch_memory_pool *pool = ts->pool;
switch_memory_pool_t *pool = ts->pool;
switch_core_destroy_memory_pool(&pool);
}
@@ -58,7 +58,7 @@ static struct {
struct session session;
} globals;
static void event_handler(switch_event *event)
static void event_handler(switch_event_t *event)
{
char buf[1024];
iks *msg;
@@ -34,7 +34,7 @@
static const char modname[] = "mod_zeroconf";
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
static struct {
sw_discovery discovery;
@@ -121,7 +121,7 @@ static sw_result HOWL_API my_service_reply(sw_discovery discovery,
}
static void event_handler(switch_event *event)
static void event_handler(switch_event_t *event)
{
sw_text_record text_record;
sw_result result;
@@ -132,7 +132,7 @@ static void event_handler(switch_event *event)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "sw_text_record_init() failed\n");
return;
} else {
switch_event_header *hp;
switch_event_header_t *hp;
char *service = switch_event_get_header(event, "service");
char *port = switch_event_get_header(event, "port");
sw_port porti = 0;
@@ -120,7 +120,7 @@ struct teletone_obj {
switch_codec codec;
switch_buffer *audio_buffer;
switch_buffer *loop_buffer;
switch_memory_pool *pool;
switch_memory_pool_t *pool;
switch_timer *timer;
switch_timer timer_base;
char code_buffer[1024];
@@ -132,14 +132,14 @@ struct fileio_obj {
char *path;
unsigned int flags;
switch_file_t *fd;
switch_memory_pool *pool;
switch_memory_pool_t *pool;
char *buf;
switch_size_t buflen;
int32 bufsize;
};
struct db_obj {
switch_memory_pool *pool;
switch_memory_pool_t *pool;
switch_core_db *db;
switch_core_db_stmt *stmt;
char *dbname;
@@ -965,7 +965,7 @@ static int teletone_handler(teletone_generation_session_t *ts, teletone_tone_map
/*********************************************************************************/
static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
switch_memory_pool *pool = NULL;
switch_memory_pool_t *pool = NULL;
if (argc > 2) {
struct js_session *jss = NULL;
JSObject *session_obj;
@@ -1070,7 +1070,7 @@ static void session_destroy(JSContext *cx, JSObject *obj)
/*********************************************************************************/
static JSBool fileio_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
switch_memory_pool *pool;
switch_memory_pool_t *pool;
switch_file_t *fd;
char *path, *flags_str;
unsigned int flags = 0;
@@ -1120,7 +1120,7 @@ static void fileio_destroy(JSContext *cx, JSObject *obj)
struct fileio_obj *fio = JS_GetPrivate(cx, obj);
if (fio) {
switch_memory_pool *pool = fio->pool;
switch_memory_pool_t *pool = fio->pool;
switch_core_destroy_memory_pool(&pool);
pool = NULL;
}
@@ -1241,7 +1241,7 @@ JSClass fileio_class = {
/*********************************************************************************/
static JSBool db_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
switch_memory_pool *pool;
switch_memory_pool_t *pool;
switch_core_db *db;
struct db_obj *dbo;
@@ -1271,7 +1271,7 @@ static void db_destroy(JSContext *cx, JSObject *obj)
struct db_obj *dbo = JS_GetPrivate(cx, obj);
if (dbo) {
switch_memory_pool *pool = dbo->pool;
switch_memory_pool_t *pool = dbo->pool;
if (dbo->stmt) {
switch_core_db_finalize(dbo->stmt);
dbo->stmt = NULL;
@@ -1472,7 +1472,7 @@ static JSBool teletone_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
struct teletone_obj *tto = NULL;
struct js_session *jss = NULL;
switch_codec *read_codec;
switch_memory_pool *pool;
switch_memory_pool_t *pool;
char *timer_name = NULL;
if (argc > 0) {
@@ -1549,7 +1549,7 @@ static JSBool teletone_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
static void teletone_destroy(JSContext *cx, JSObject *obj)
{
struct teletone_obj *tto = JS_GetPrivate(cx, obj);
switch_memory_pool *pool;
switch_memory_pool_t *pool;
if (tto) {
if (tto->timer) {
switch_core_timer_destroy(tto->timer);
@@ -2114,7 +2114,7 @@ static void js_parse_and_execute(switch_core_session *session, char *input_code)
static void *SWITCH_THREAD_FUNC js_thread_run(switch_thread *thread, void *obj)
static void *SWITCH_THREAD_FUNC js_thread_run(switch_thread_t *thread, void *obj)
{
char *input_code = obj;
@@ -2128,11 +2128,11 @@ static void *SWITCH_THREAD_FUNC js_thread_run(switch_thread *thread, void *obj)
}
static switch_memory_pool *module_pool = NULL;
static switch_memory_pool_t *module_pool = NULL;
static void js_thread_launch(char *text)
{
switch_thread *thread;
switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL;
if (!module_pool) {
+3 -3
View File
@@ -47,9 +47,9 @@ static switch_loadable_module_interface console_module_interface = {
/*.directory_interface */ NULL
};
static switch_memory_pool *module_pool = NULL;
static switch_hash *log_hash = NULL;
static switch_hash *name_hash = NULL;
static switch_memory_pool_t *module_pool = NULL;
static switch_hash_t *log_hash = NULL;
static switch_hash_t *name_hash = NULL;
static int8_t all_level = -1;
static void del_mapping(char *var) {