Asterisk - The Open Source Telephony Project GIT-master-b023714
|
HTTP POST upload support for Asterisk HTTP server. More...
#include "asterisk.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <gmime/gmime.h>
#include "asterisk/linkedlists.h"
#include "asterisk/http.h"
#include "asterisk/paths.h"
#include "asterisk/tcptls.h"
#include "asterisk/manager.h"
#include "asterisk/cli.h"
#include "asterisk/module.h"
#include "asterisk/ast_version.h"
Go to the source code of this file.
Data Structures | |
struct | mime_cbinfo |
Macros | |
#define | MAX_PREFIX 80 |
Functions | |
static int | __ast_http_post_load (int reload) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | find_sequence (char *inbuf, int inlen, char *matchbuf, int matchlen) |
static int | http_post_callback (struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *get_vars, struct ast_variable *headers) |
static int | load_module (void) |
static GMimeMessage * | parse_message (FILE *f) |
static void | post_raw (GMimePart *part, const char *post_dir, const char *fn) |
static int | process_message (GMimeMessage *message, const char *post_dir) |
static void | process_message_callback (GMimeObject *part, gpointer user_data) |
static int | readmimefile (struct ast_iostream *in, FILE *fout, char *boundary, int contentlen) |
static int | reload (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "HTTP POST support" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .requires = "http", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static char | prefix [MAX_PREFIX] |
HTTP POST upload support for Asterisk HTTP server.
AMI over HTTP support - AMI over the http protocol
Definition in file res_http_post.c.
#define MAX_PREFIX 80 |
Definition at line 52 of file res_http_post.c.
|
static |
Definition at line 429 of file res_http_post.c.
References ast_calloc, ast_config_destroy(), ast_config_load2(), ast_copy_string(), ast_free, ast_http_uri_link(), ast_http_uri_unlink_all_with_key(), ast_str_create, ast_str_set(), ast_strdup, ast_variable_browse(), ast_http_uri::callback, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, ast_http_uri::data, ast_http_uri::description, ast_http_uri::dmallocd, ast_http_uri::has_subtree, http_post_callback(), ast_http_uri::key, ast_http_uri::mallocd, ast_variable::name, ast_variable::next, prefix, reload(), ast_http_uri::uri, and ast_variable::value.
Referenced by load_module(), and reload().
|
static |
Definition at line 517 of file res_http_post.c.
|
static |
Definition at line 517 of file res_http_post.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 517 of file res_http_post.c.
|
static |
Definition at line 189 of file res_http_post.c.
References current, and inbuf().
Referenced by readmimefile().
|
static |
Definition at line 323 of file res_http_post.c.
References ast_debug, ast_http_body_read_status(), ast_http_error(), ast_http_manid_from_vars(), AST_HTTP_POST, ast_http_request_close_on_completion(), ast_log, ast_str_buffer(), astman_is_authed(), astman_verify_session_writepermissions(), ast_http_uri::data, EVENT_FLAG_CONFIG, LOG_ERROR, method, ast_variable::next, NULL, parse_message(), process_message(), readmimefile(), ast_tcptls_session_instance::stream, and var.
Referenced by __ast_http_post_load().
|
static |
Definition at line 498 of file res_http_post.c.
References __ast_http_post_load(), and AST_MODULE_LOAD_SUCCESS.
|
static |
Definition at line 104 of file res_http_post.c.
References NULL.
Referenced by http_post_callback().
|
static |
Definition at line 71 of file res_http_post.c.
References ast_debug, ast_log, LOG_WARNING, and PATH_MAX.
Referenced by process_message_callback().
|
static |
Definition at line 172 of file res_http_post.c.
References mime_cbinfo::count, mime_cbinfo::post_dir, and process_message_callback().
Referenced by http_post_callback().
|
static |
Definition at line 131 of file res_http_post.c.
References ast_debug, ast_log, ast_strlen_zero(), mime_cbinfo::count, LOG_ERROR, LOG_WARNING, mime_cbinfo::post_dir, post_raw(), and process_message_callback().
Referenced by process_message(), and process_message_callback().
|
static |
Definition at line 225 of file res_http_post.c.
References ast_iostream_read(), ast_log, buf, errno, find_sequence(), in, LOG_WARNING, and NULL.
Referenced by http_post_callback().
|
static |
Definition at line 491 of file res_http_post.c.
References __ast_http_post_load(), and AST_MODULE_LOAD_SUCCESS.
Referenced by __ast_http_post_load().
|
static |
Definition at line 484 of file res_http_post.c.
References ast_http_uri_unlink_all_with_key().
|
static |
Definition at line 517 of file res_http_post.c.
|
static |
Definition at line 517 of file res_http_post.c.
|
static |
Definition at line 69 of file res_http_post.c.
Referenced by __ast_http_post_load().