summaryrefslogtreecommitdiffstats
path: root/src/methods/common.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-14 21:13:58 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-14 21:13:58 +0100
commitb05b3f32354f7fe9cefee74ea18020fd8069bc10 (patch)
treefc03767e344354a6f8377eb45ce3a597eb69260b /src/methods/common.h
parent2fb08c6455bf6f08209b5993c755c1135611813b (diff)
downloadfastd-b05b3f32354f7fe9cefee74ea18020fd8069bc10.tar
fastd-b05b3f32354f7fe9cefee74ea18020fd8069bc10.zip
Move test for initiator in the session refresh check from protocol to method
Diffstat (limited to 'src/methods/common.h')
-rw-r--r--src/methods/common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/methods/common.h b/src/methods/common.h
index 0a26a32..0769a6c 100644
--- a/src/methods/common.h
+++ b/src/methods/common.h
@@ -59,7 +59,7 @@ static inline bool fastd_method_session_common_is_initiator(const fastd_method_c
}
static inline bool fastd_method_session_common_want_refresh(fastd_context_t *ctx, const fastd_method_common_t *session) {
- return timespec_after(&ctx->now, &session->refresh_after);
+ return fastd_method_session_common_is_initiator(session) && timespec_after(&ctx->now, &session->refresh_after);
}
static inline void fastd_method_session_common_superseded(fastd_context_t *ctx, fastd_method_common_t *session) {