109 static char *
app =
"System";
111 static char *
app2 =
"TrySystem";
133 if (strchr(
"\"'", cbuf[0]) && cbuf[
ast_str_strlen(buf) - 1] == cbuf[0]) {
136 ast_log(
LOG_NOTICE,
"It is not necessary to quote the argument to the System application.\n");
141 if ((res < 0) && (
errno != ECHILD)) {
145 }
else if (res == 127) {
#define AST_THREADSTORAGE(name)
Define a thread storage variable.
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
int ast_autoservice_start(struct ast_channel *chan)
Automatically service a channel for us...
String manipulation functions.
static int load_module(void)
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
static int unload_module(void)
static int system_exec_helper(struct ast_channel *chan, const char *data, int failmode)
Definitions to aid in the use of thread local storage.
int ast_unregister_application(const char *app)
Unregister an application.
int ast_str_get_encoded_str(struct ast_str **str, int maxlen, const char *stream)
Decode a stream of encoded control or extended ASCII characters.
#define ast_strlen_zero(foo)
General Asterisk PBX channel definitions.
Core PBX routines and definitions.
int ast_autoservice_stop(struct ast_channel *chan)
Stop servicing a channel for us...
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
int ast_safe_system(const char *s)
Safely spawn an OS shell command while closing file descriptors.
static int system_exec(struct ast_channel *chan, const char *data)
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
static int trysystem_exec(struct ast_channel *chan, const char *data)
structure for queuing ARI channel variable setting
static struct ast_threadstorage buf_buf
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.