aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p/p2p.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2p/p2p.c')
-rw-r--r--src/p2p/p2p.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 30042b0..e905e77 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2382,6 +2382,9 @@ struct p2p_data * p2p_init(const struct p2p_config *cfg)
eloop_register_timeout(P2P_PEER_EXPIRATION_INTERVAL, 0,
p2p_expiration_timeout, p2p, NULL);
+ p2p->go_timeout = 100;
+ p2p->client_timeout = 20;
+
return p2p;
}
@@ -4105,3 +4108,13 @@ int p2p_non_idle(struct p2p_data *p2p)
return 0;
return p2p->state != P2P_IDLE;
}
+
+
+void p2p_set_config_timeout(struct p2p_data *p2p, u8 go_timeout,
+ u8 client_timeout)
+{
+ if (p2p) {
+ p2p->go_timeout = go_timeout;
+ p2p->client_timeout = client_timeout;
+ }
+}