#endif
#ifdef DEBUGGING
-#define ASSERT(x) do { if (!(x)) bug("Assertion `%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0)
+#define ASSERT(x) do { if (!(x)) bug("Assertion '%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0)
#else
-#define ASSERT(x) do { } while(0)
+#define ASSERT(x) do { if (!(x)) log(L_BUG "Assertion '%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0)
#endif
/* Pseudorandom numbers */
channel_request_reload(struct channel *c)
{
ASSERT(c->channel_state == CS_UP);
- // ASSERT(channel_reloadable(c));
+ ASSERT(channel_reloadable(c));
c->proto->reload_routes(c);
static const char *
rpki_tr_ssh_ident(struct rpki_tr_sock *tr)
{
- ASSERT(tr != NULL);
-
struct rpki_cache *cache = tr->cache;
struct rpki_config *cf = (void *) cache->p->p.cf;
struct rpki_tr_ssh_config *ssh_cf = (void *) cf->tr_config.spec;
static const char *
rpki_tr_tcp_ident(struct rpki_tr_sock *tr)
{
- ASSERT(tr != NULL);
-
struct rpki_cache *cache = tr->cache;
struct rpki_config *cf = (void *) cache->p->p.cf;