diff options
author | sin <sin@2f30.org> | 2014-10-01 18:00:27 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-10-01 18:00:27 +0100 |
commit | d5338370b57342edea0c97a70035553547acf1d6 (patch) | |
tree | 4f28b0ec9ad16ea9f13e145ec67307be1b9be224 /ratox.c | |
parent | b35b99442c64271effc44e65a9c422042ab5c1b2 (diff) |
Add connection delay enum instead of magic value
Diffstat (limited to 'ratox.c')
-rw-r--r-- | ratox.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -28,6 +28,10 @@ #define DATAFILE ".ratox.data" +enum { + CONNECTDELAY = 5, /* in seconds */ +}; + const char *reqerr[] = { [-TOX_FAERR_TOOLONG] = "Message is too long", [-TOX_FAERR_NOMESSAGE] = "Please add a message to your request", @@ -1409,7 +1413,7 @@ loop(void) connected = 0; } t1 = time(NULL); - if (t1 > t0 + 5) { + if (t1 > t0 + CONNECTDELAY) { t0 = time(NULL); printout("DHT > Connecting\n"); toxconnect(); |