diff options
author | Alan Mizrahi <alan+crux@mizrahi.com.ve> | 2013-04-19 10:53:11 +0900 |
---|---|---|
committer | Alan Mizrahi <alan+crux@mizrahi.com.ve> | 2013-04-19 10:53:11 +0900 |
commit | bdb8008f2753147cb208ebfbbb0b3089b5fc1e2e (patch) | |
tree | b1ae82fc59c3ad5f77d838c5c145e7a27f3c6673 /asterisk-espeak/build.patch | |
parent | 3b71696a38dea9dfa45e7c084e8fadfebf993396 (diff) | |
download | contrib-bdb8008f2753147cb208ebfbbb0b3089b5fc1e2e.tar.gz contrib-bdb8008f2753147cb208ebfbbb0b3089b5fc1e2e.tar.xz |
asterisk-espeak: Initial commit
Diffstat (limited to 'asterisk-espeak/build.patch')
-rw-r--r-- | asterisk-espeak/build.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/asterisk-espeak/build.patch b/asterisk-espeak/build.patch new file mode 100644 index 000000000..3a36e9469 --- /dev/null +++ b/asterisk-espeak/build.patch @@ -0,0 +1,71 @@ +diff -u -r asterisk-espeak-0.4.orig/app_espeak.c asterisk-espeak-0.4/app_espeak.c +--- asterisk-espeak-0.4.orig/app_espeak.c 2011-07-19 16:37:51.109554567 +0900 ++++ asterisk-espeak-0.4/app_espeak.c 2011-07-19 17:10:38.136024568 +0900 +@@ -46,12 +46,16 @@ + #endif + + #include <stdio.h> +-#include <asterisk/lock.h> ++ ++#include <asterisk.h> + #include <asterisk/file.h> + #include <asterisk/logger.h> + #include <asterisk/channel.h> + #include <asterisk/pbx.h> + #include <asterisk/module.h> ++#include <asterisk/lock.h> ++#include <asterisk/app.h> ++#include <asterisk/config.h> + #include <asterisk/translate.h> + #include <asterisk/utils.h> + #include <asterisk/md5.h> +@@ -160,11 +164,16 @@ + #endif + + /* Config file stuff */ ++#if ASTERISK_VERSION == 8 ++ struct ast_flags config_flags = { 0 }; ++ cfg = ast_config_load(ESPEAK_CONFIG, config_flags); ++#else + #if ASTERISK_VERSION >= 2 + cfg = ast_config_load(ESPEAK_CONFIG); + #else + cfg = ast_load(ESPEAK_CONFIG); + #endif ++#endif + + if (!cfg) + { +@@ -521,7 +530,23 @@ + return res; + } + +-#if ASTERISK_VERSION == 4 ++#if ASTERISK_VERSION == 8 ++int unload_module(void) ++{ ++ int res; ++ res = ast_unregister_application(app); ++ ast_module_user_hangup_all(); ++ return res; ++} ++ ++static int load_module(void) ++{ ++ return ast_register_application(app, espeak_exec, synopsis, descrip); ++} ++ ++AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "eSpeak TTS Interface"); ++ ++#elif ASTERISK_VERSION == 4 + static int unload_module(void) + { + int res; +@@ -550,7 +575,6 @@ + return ast_register_application(app, espeak_exec, synopsis, descrip); + } + +- + char *description(void) + { + return tdesc; |