diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-20 04:36:34 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-20 04:36:34 +0200 |
commit | b9c8603931203f5d94091f7a05a5967304b62fbd (patch) | |
tree | b10ed1db8d2a34561f0f50488af73d820ecae019 /src/methods/common.c | |
parent | ab4ca17ba3dfc92932834b09afc83cf7fe002a14 (diff) | |
download | fastd-b9c8603931203f5d94091f7a05a5967304b62fbd.tar fastd-b9c8603931203f5d94091f7a05a5967304b62fbd.zip |
Make conf global
Diffstat (limited to 'src/methods/common.c')
-rw-r--r-- | src/methods/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/methods/common.c b/src/methods/common.c index 26bdf2e..166d3ab 100644 --- a/src/methods/common.c +++ b/src/methods/common.c @@ -30,8 +30,8 @@ void fastd_method_common_init(fastd_context_t *ctx, fastd_method_common_t *session, bool initiator) { memset(session, 0, sizeof(*session)); - session->valid_till = fastd_in_seconds(ctx, ctx->conf->key_valid); - session->refresh_after = fastd_in_seconds(ctx, ctx->conf->key_refresh - fastd_rand(ctx, 0, ctx->conf->key_refresh_splay)); + session->valid_till = fastd_in_seconds(ctx, conf.key_valid); + session->refresh_after = fastd_in_seconds(ctx, conf.key_refresh - fastd_rand(ctx, 0, conf.key_refresh_splay)); if (initiator) { session->send_nonce[COMMON_NONCEBYTES-1] = 3; @@ -79,7 +79,7 @@ bool fastd_method_reorder_check(fastd_context_t *ctx, fastd_peer_t *peer, fastd_ session->receive_reorder_seen |= (1 << (shift-1)); memcpy(session->receive_nonce, nonce, COMMON_NONCEBYTES); - session->reorder_timeout = fastd_in_seconds(ctx, ctx->conf->reorder_time); + session->reorder_timeout = fastd_in_seconds(ctx, conf.reorder_time); return true; } else if (age == 0 || session->receive_reorder_seen & (1 << (age-1))) { |