static void auth_call_scheme_destructor(void *);
static void auth_md5_hmac_key(auth_mod_t *am);
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HTABLE_PROTOS_WITH(auth_htable, aht, auth_passwd_t, usize_t, unsigned);
HTABLE_BODIES_WITH(auth_htable, aht, auth_passwd_t, APW_HASH,
usize_t, unsigned);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
/**Allocate an authentication module instance.
*
* The function auth_mod_alloc() allocates an authentication module object.
static int leg_callback_default(nta_leg_magic_t*, nta_leg_t*,
nta_incoming_t*, sip_t const *);
#define HTABLE_HASH_LEG(leg) ((leg)->leg_hash)
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HTABLE_BODIES_WITH(leg_htable, lht, nta_leg_t, HTABLE_HASH_LEG, size_t, hash_value_t);
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
su_inline
hash_value_t hash_istring(char const *, char const *, hash_value_t);
nta_incoming_destroy(irq);
}
+#if 0
/**Compare two SIP from/to fields.
*
* @retval nonzero if matching.
su_strcmp(a->url_port, b->url_port) ||
su_strcmp(a->url_user, b->url_user);
}
+#endif
/** Get a leg by dialog.
*
#define HTABLE_HASH_ORQ(orq) ((orq)->orq_hash)
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HTABLE_BODIES_WITH(outgoing_htable, oht, nta_outgoing_t, HTABLE_HASH_ORQ,
size_t, hash_value_t);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
static int outgoing_features(nta_agent_t *agent, nta_outgoing_t *orq,
msg_t *msg, sip_t *sip,
tagi_t *tags);
assert(orq->orq_resolver);
- if (sr->sr_query) /* Cancel resolver query */
- sres_query_bind(sr->sr_query, NULL, NULL), sr->sr_query = NULL;
+ outgoing_cancel_resolver(orq);
su_free(orq->orq_agent->sa_home, sr);
HTABLE_PROTOS_WITH(hc_htable, hct, nth_client_t, uintptr_t, size_t);
#define HTABLE_HASH_CLIENT(hc) ((uintptr_t)(hc)->hc_tport)
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HTABLE_BODIES_WITH(hc_htable, hct, nth_client_t, HTABLE_HASH_CLIENT,
uintptr_t, size_t);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
static url_string_t const *hc_request_complete(nth_client_t * hc,
msg_t *msg, http_t * http,
http_method_t method,
static server_t *server_create(url_t const *url,
tag_type_t tag, tag_value_t value, ...);
void server_destroy(server_t *srv);
-su_inline int server_timer_init(server_t *srv);
-static void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv);
-su_inline uint32_t server_now(server_t const *srv);
static void server_request(server_t *srv, tport_t *tport, msg_t *msg,
void *arg, su_time_t now);
static nth_site_t **site_get_host(nth_site_t **, char const *host, char const *port);
su_home_unref(srv->srv_home);
}
-/** Initialize server timer. */
-su_inline
-int server_timer_init(server_t *srv)
-{
- if (0) {
- srv->srv_timer = su_timer_create(su_root_task(srv->srv_root), SERVER_TICK);
- return su_timer_set(srv->srv_timer, server_timer, srv);
- }
- return 0;
-}
-
-/**
- * Server timer routine.
- */
-static
-void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv)
-{
- uint32_t now;
-
- su_timer_set(timer, server_timer, srv);
-
- now = su_time_ms(su_now()); now += now == 0; srv->srv_now = now;
-
- /* Xyzzy */
-
- srv->srv_now = 0;
-}
-
-/** Get current timestamp in milliseconds */
-su_inline
-uint32_t server_now(server_t const *srv)
-{
- if (srv->srv_now)
- return srv->srv_now;
- else
- return su_time_ms(su_now());
-}
-
/** Process incoming request message */
static
void server_request(server_t *srv,
#include <sofia-sip/su_wait.h>
+#if 0
su_inline int can_redirect(sip_contact_t const *m, sip_method_t method);
+#endif
/**@internal
*
return 0; /* This was a final response that cannot be restarted. */
}
+#if 0
su_inline
int can_redirect(sip_contact_t const *m, sip_method_t method)
{
}
return 0;
}
+#endif
/** @internal Add authorization data */
static int nh_authorize(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
}
}
-su_inline int
-session_timer_has_been_set(struct session_timer const *t)
-{
- return t->timer_set;
-}
-
/* ======================================================================== */
/** Get SDP from a SIP message.
res->res_updcb(res->res_async, INVALID_SOCKET, INVALID_SOCKET);
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HTABLE_BODIES_WITH(sres_qtable, qt, sres_query_t, SRES_QUERY_HASH,
unsigned, size_t);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
/** Allocate a query structure */
static
sres_query_t *
return ret;
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HTABLE_BODIES_WITH(sres_htable, ht, sres_rr_hash_entry_t, SRES_HENTRY_HASH,
unsigned, size_t);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
static inline
int sres_heap_earlier_entry(sres_rr_hash_entry_t const *a,
sres_rr_hash_entry_t const *b)
heap[index] = entry;
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HEAP_BODIES(static inline,
sres_heap_t,
sres_heap_,
sres_heap_set_entry,
su_realloc,
NULL);
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
return free(memory), NULL;
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
HEAP_BODIES(su_inline, su_timer_queue_t, timers_, su_timer_t *,
timers_less, timers_set, timers_alloc, NULL);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
/**@internal Set the timer.
*
* @retval 0 when successful (always)
return memcmp(a->tp_addr, b->tp_addr, a->tp_addrlen);
}
-su_inline int tprb_is_inserted(tport_t const *a)
-{
- return a->tp_dad != 0 || a->tp_left != 0 || a->tp_right != 0;
-}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
RBTREE_PROTOS(su_inline, tprb, tport_t);
TP_IS_RED, TP_SET_RED, TP_IS_BLACK, TP_SET_BLACK, TP_COPY_COLOR,
tp_cmp, TP_INSERT, TP_REMOVE);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
static void tplist_insert(tport_t **list, tport_t *tp)
{
if (*list == NULL)
return self->tp_closed || self->tp_send_close || self->tp_recv_close;
}
-/** Test if transport is bound */
-su_inline int tport_is_bound(tport_t const *self)
-{
- return self->tp_protoname != NULL;
-}
-
/** Test if transport connection has been established. @NEW_1_12_5. */
int tport_is_connected(tport_t const *self)
{
return self->tp_params->tpp_mtu;
}
-su_inline
-int tport_has_sigcomp(tport_t const *self)
-{
- return self->tp_name->tpn_comp != NULL;
-}
-
/** Set IP TOS for socket */
void tport_set_tos(su_socket_t socket, su_addrinfo_t *ai, int tos)
{