25 {
"bad-request",
"modify",
"400" },
26 {
"conflict",
"cancel",
"409" },
27 {
"feature-not-implemented",
"cancel",
"501" },
28 {
"forbidden",
"auth",
"403" },
29 {
"gone",
"modify",
"302" },
30 {
"internal-server-error",
"wait",
"500" },
31 {
"item-not-found",
"cancel",
"404" },
32 {
"jid-malformed",
"modify",
"400" },
33 {
"not-acceptable",
"cancel",
"406" },
34 {
"not-allowed",
"cancel",
"405" },
35 {
"payment-required",
"auth",
"402" },
36 {
"recipient-unavailable",
"wait",
"404" },
37 {
"redirect",
"modify",
"302" },
38 {
"registration-required",
"auth",
"407" },
39 {
"remote-server-not-found",
"cancel",
"404" },
40 {
"remote-server-timeout",
"wait",
"502" },
41 {
"resource-constraint",
"wait",
"500" },
42 {
"service-unavailable",
"cancel",
"503" },
43 {
"subscription-required",
"auth",
"407" },
44 {
"undefined-condition", NULL,
"500" },
45 {
"unexpected-request",
"wait",
"400" },
46 { NULL, NULL,
"401" },
47 {
"unknown-sender",
"modify",
"400" },
55 assert((
int) (nad != NULL));
56 assert((
int) (elem >= 0));
80 char to[3072], from[3072];
82 assert((
int) (nad != NULL));
95 nad_set_attr(nad, elem, -1,
"to", from[0] !=
'\0' ? from : NULL, 0);
96 nad_set_attr(nad, elem, -1,
"from", to[0] !=
'\0' ? to : NULL, 0);
struct _stanza_error_st _stanza_errors[]
if you change these, reflect your changes in the defines in util.h
int nad_find_attr(nad_t nad, unsigned int elem, int ns, const char *name, const char *val)
get a matching attr on this elem, both name and optional val
void nad_set_attr(nad_t nad, unsigned int elem, int ns, const char *name, const char *val, int vallen)
create, update, or zap any matching attr on this elem
int nad_add_namespace(nad_t nad, const char *uri, const char *prefix)
bring a new namespace into scope
int nad_insert_elem(nad_t nad, unsigned int parent, int ns, const char *name, const char *cdata)
shove in a new child elem after the given one
#define stanza_err_BAD_REQUEST
nad_t stanza_tofrom(nad_t nad, int elem)
flip the to and from attributes on this elem
nad_t stanza_error(nad_t nad, int elem, int err)
error the packet