-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_v.c
57 lines (44 loc) · 1.34 KB
/
mod_v.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
*
* Copyright (C) 2020. Seven Du <[email protected]> ALL RIGHTS RESERVED
*
* mod_v.c -- V mod
*
*/
#include <switch.h>
#include "code_v.c"
/* Prototypes */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_v_shutdown);
SWITCH_MODULE_LOAD_FUNCTION(mod_v_load);
/* SWITCH_MODULE_DEFINITION(name, load, shutdown, runtime)
* Defines a switch_loadable_module_function_table_t and a static const char[] modname
*/
SWITCH_MODULE_DEFINITION(mod_v, mod_v_load, mod_v_shutdown, NULL);
/* Macro expands to: switch_status_t mod_v_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool) */
SWITCH_MODULE_LOAD_FUNCTION(mod_v_load)
{
_vinit(); // v init
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "mod_v load\n");
int c = freeswitch__sum(1, 2);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "sum = %d\n", c);
mod_v__load(module_interface, pool);
return SWITCH_STATUS_SUCCESS;
}
/*
Called when the system shuts down
Macro expands to: switch_status_t mod_v_shutdown() */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_v_shutdown)
{
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
*/