26 #define STREAM_ACK_NS_DECL " xmlns:ack='" uri_ACK "'"
30 log_debug(
ZONE,
"hacking ack namespace decl onto stream header");
85 char *buf = (
char *) malloc(
sizeof(
char) * (
NAD_AVAL_L(nad, attr) + 13 + 1));
104 log_debug(
ZONE,
"initialising stanza acknowledgements sx plugin");
static void _sx_ack_features(sx_t s, sx_plugin_t p, nad_t nad)
sx features callback
int sx_ack_init(sx_env_t env, sx_plugin_t p, va_list args)
args: none
void(* features)(sx_t s, sx_plugin_t p, nad_t nad)
int nad_append_elem(nad_t nad, int ns, const char *name, int depth)
create a new elem on the list
void nad_free(nad_t nad)
free that nad
void _sx_buffer_alloc_margin(sx_buf_t buf, int before, int after)
utility: ensure a certain amount of allocated space adjacent to buf->data
holds the state for a single stream
static void _sx_ack_header(sx_t s, sx_plugin_t p, sx_buf_t buf)
#define NAD_ENAME_L(N, E)
void jqueue_push(jqueue_t q, void *data, int priority)
#define NAD_NURI_L(N, NS)
sx_buf_t _sx_buffer_new(const char *data, int len, _sx_notify_t notify, void *notify_arg)
utility: make a new buffer if len>0 but data is NULL, the buffer will contain that many bytes of garb...
static int _sx_ack_process(sx_t s, sx_plugin_t p, nad_t nad)
process handshake packets from the client
#define STREAM_ACK_NS_DECL
int(* process)(sx_t s, sx_plugin_t p, nad_t nad)
int nad_find_attr(nad_t nad, int elem, int ns, const char *name, const char *val)
get a matching attr on this elem, both name and optional val
void(* header)(sx_t s, sx_plugin_t p, sx_buf_t buf)