35#include "../res/res_aeap/general.h"
36#include "../res/res_aeap/transaction.h"
38#define CATEGORY "/res/aeap/transaction/"
40#define AEAP_TRANSACTION_ID "foo"
52 struct timespec delay = { 1, 0 };
55 while (nanosleep(&delay, &delay));
105 pthread_cancel(thread_id);
106 pthread_join(thread_id,
NULL);
123 info->name = __func__;
124 info->explicit_only = 0;
126 info->summary =
"test creating a basic AEAP transaction request";
145 info->name = __func__;
146 info->explicit_only = 0;
148 info->summary =
"test creating a AEAP transaction request that times out";
178 .
requires =
"res_aeap",
Asterisk main include file. File version handling, generic pbx functions.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
Asterisk locking-related definitions:
#define AST_PTHREADT_NULL
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
Asterisk External Application Protocol API.
Asterisk External Application Protocol Message API.
struct ast_aeap_tsx_params params
Asterisk external application base message.
Parameters to be used when sending a transaction based message.
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
static void * end_transaction(void *data)
static void handle_timeout(struct ast_aeap *aeap, struct ast_aeap_message *msg, void *obj)
AST_TEST_DEFINE(transaction_exec)
static int load_module(void)
#define AEAP_TRANSACTION_ID
static enum ast_test_result_state exec(struct ast_test *test, struct ast_aeap_tsx_params *params)
static int unload_module(void)
void * aeap_transaction_user_obj(struct aeap_transaction *tsx)
Retrieve the user object associated with the transaction.
struct ao2_container * aeap_transactions_create(void)
Create an Asterisk external application transactions container.
struct aeap_transaction * aeap_transaction_create_and_add(struct ao2_container *transactions, const char *id, struct ast_aeap_tsx_params *params, struct ast_aeap *aeap)
Create a transaction object, and add it to the given container.
void aeap_transaction_end(struct aeap_transaction *tsx, int result)
End a transaction, and remove it from the given container.
int aeap_transaction_start(struct aeap_transaction *tsx)
Start the transaction.
#define ast_pthread_create(a, b, c, d)