[Freeswitch-svn] [commit] r5168 - in freeswitch/trunk/src: . include
Freeswitch SVN
mikej at freeswitch.org
Sat May 12 17:43:41 EDT 2007
Author: mikej
Date: Sat May 12 17:43:41 2007
New Revision: 5168
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_ivr_async.c
Log:
create macro to define scheduler function prototypes.
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Sat May 12 17:43:41 2007
@@ -1013,8 +1013,13 @@
typedef void (*switch_application_function_t) (switch_core_session_t *, char *);
typedef void (*switch_event_callback_t) (switch_event_t *);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t) (switch_core_session_t *, void *, switch_caller_profile_t *);
+
typedef struct switch_scheduler_task switch_scheduler_task_t;
+
typedef void (*switch_scheduler_func_t) (switch_scheduler_task_t *task);
+
+#define SWITCH_STANDARD_SCHED_FUNC(name) static void name (switch_scheduler_task_t *task)
+
typedef switch_status_t (*switch_state_handler_t) (switch_core_session_t *);
typedef struct switch_stream_handle switch_stream_handle_t;
typedef switch_status_t (*switch_stream_handle_write_function_t) (switch_stream_handle_t *handle, const char *fmt, ...);
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Sat May 12 17:43:41 2007
@@ -71,7 +71,7 @@
}
}
-static void heartbeat_callback(switch_scheduler_task_t *task)
+SWITCH_STANDARD_SCHED_FUNC(heartbeat_callback)
{
send_heartbeat();
Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c (original)
+++ freeswitch/trunk/src/switch_ivr_async.c Sat May 12 17:43:41 2007
@@ -615,7 +615,7 @@
switch_call_cause_t cause;
};
-static void sch_hangup_callback(switch_scheduler_task_t *task)
+SWITCH_STANDARD_SCHED_FUNC(sch_hangup_callback)
{
struct hangup_helper *helper;
switch_core_session_t *session, *other_session;
@@ -665,7 +665,7 @@
char *context;
};
-static void sch_transfer_callback(switch_scheduler_task_t *task)
+SWITCH_STANDARD_SCHED_FUNC(sch_transfer_callback)
{
struct transfer_helper *helper;
switch_core_session_t *session;
@@ -732,7 +732,7 @@
switch_media_flag_t flags;
};
-static void sch_broadcast_callback(switch_scheduler_task_t *task)
+SWITCH_STANDARD_SCHED_FUNC(sch_broadcast_callback)
{
struct broadcast_helper *helper;
assert(task);
More information about the Freeswitch-svn
mailing list