mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 19:38:22 +00:00
main/pbx: Move pbx_builtin dialplan applications to pbx_builtins.c
We joked about splitting pbx.c into multiple files but this first step was fairly easy. All of the pbx_builtin dialplan applications have been moved into pbx_builtins.c and a new pbx_private.h file was added. load_pbx_builtins() is called by asterisk.c just after load_pbx(). A few functions were renamed and are cross-exposed between the 2 source files. Change-Id: I87066be3dbf7f5822942ac1449d98cc43fc7561a
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
int load_modules(unsigned int); /*!< Provided by loader.c */
|
int load_modules(unsigned int); /*!< Provided by loader.c */
|
||||||
int load_pbx(void); /*!< Provided by pbx.c */
|
int load_pbx(void); /*!< Provided by pbx.c */
|
||||||
|
int load_pbx_builtins(void); /*!< Provided by pbx_builtins.c */
|
||||||
int init_logger(void); /*!< Provided by logger.c */
|
int init_logger(void); /*!< Provided by logger.c */
|
||||||
void close_logger(void); /*!< Provided by logger.c */
|
void close_logger(void); /*!< Provided by logger.c */
|
||||||
void logger_queue_start(void); /*!< Provided by logger.c */
|
void logger_queue_start(void); /*!< Provided by logger.c */
|
||||||
|
|||||||
@@ -4595,6 +4595,11 @@ static void asterisk_daemon(int isroot, const char *runuser, const char *rungrou
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (load_pbx_builtins()) {
|
||||||
|
printf("Failed: load_pbx_builtins\n%s", term_quit());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (ast_local_init()) {
|
if (ast_local_init()) {
|
||||||
printf("Failed: ast_local_init\n%s", term_quit());
|
printf("Failed: ast_local_init\n%s", term_quit());
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
1484
main/pbx.c
1484
main/pbx.c
File diff suppressed because it is too large
Load Diff
1500
main/pbx_builtins.c
Normal file
1500
main/pbx_builtins.c
Normal file
File diff suppressed because it is too large
Load Diff
37
main/pbx_private.h
Normal file
37
main/pbx_private.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Asterisk -- An open source telephony toolkit.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2015 Fairview 5 Engineering, LLC
|
||||||
|
*
|
||||||
|
* George Joseph <george.joseph@fairview5.com>
|
||||||
|
*
|
||||||
|
* See http://www.asterisk.org for more information about
|
||||||
|
* the Asterisk project. Please do not directly contact
|
||||||
|
* any of the maintainers of this project for assistance;
|
||||||
|
* the project provides a web site, mailing lists and IRC
|
||||||
|
* channels for your use.
|
||||||
|
*
|
||||||
|
* This program is free software, distributed under the terms of
|
||||||
|
* the GNU General Public License Version 2. See the LICENSE file
|
||||||
|
* at the top of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
* \brief Private include file for pbx
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _PBX_PRIVATE_H
|
||||||
|
#define _PBX_PRIVATE_H
|
||||||
|
|
||||||
|
/*! pbx.c functions needed by pbx_builtins.c */
|
||||||
|
int raise_exception(struct ast_channel *chan, const char *reason, int priority);
|
||||||
|
void wait_for_hangup(struct ast_channel *chan, const void *data);
|
||||||
|
void set_ext_pri(struct ast_channel *c, const char *exten, int pri);
|
||||||
|
|
||||||
|
/*! pbx_builtins.c functions needed by pbx.c */
|
||||||
|
int indicate_congestion(struct ast_channel *, const char *);
|
||||||
|
int indicate_busy(struct ast_channel *, const char *);
|
||||||
|
|
||||||
|
#define VAR_BUF_SIZE 4096
|
||||||
|
|
||||||
|
#endif /* _PBX_PRIVATE_H */
|
||||||
Reference in New Issue
Block a user