Reset timeout timer when receiving UDP data too. May fix timeout when using push...
authorMartin Johansson <martin@fatbob.nu>
Mon, 10 Sep 2012 20:47:13 +0000 (22:47 +0200)
committerMartin Johansson <martin@fatbob.nu>
Mon, 10 Sep 2012 20:47:13 +0000 (22:47 +0200)
Correct speling error.

src/client.c
src/client.h

index 9f7576eff20051feb3d96ca36fa53ae8c19799c2..189836cc80ec4a1c0c01abed8ccf67a937a446df 100644 (file)
@@ -101,7 +101,7 @@ void Client_janitor()
                if (c->availableBandwidth > bwTop)
                        c->availableBandwidth = bwTop;
                
-               if (Timer_isElapsed(&c->lastActivity, 1000000LL * INACTICITY_TIMEOUT)) {
+               if (Timer_isElapsed(&c->lastActivity, 1000000LL * INACTIVITY_TIMEOUT)) {
                        /* No activity from client - assume it is lost and close. */
                        Log_info_client(c, "Timeout, closing.");
                        Client_free(c);
@@ -817,6 +817,7 @@ int Client_voiceMsg(client_t *client, uint8_t *data, int len)
        client->availableBandwidth -= packetsize;
        
        Timer_restart(&client->idleTime);
+       Timer_restart(&client->lastActivity);
        
        counter = Pds_get_numval(pdi); /* step past session id */
        do {
index 853a076d6252189dfd859e621c3433f97ce091ed..a3ce2c29303bba2f0f419639334fb24120076bdc 100644 (file)
@@ -51,7 +51,7 @@
 
 #define BUFSIZE 8192
 #define UDP_BUFSIZE 512
-#define INACTICITY_TIMEOUT 15 /* Seconds */
+#define INACTIVITY_TIMEOUT 15 /* Seconds */
 #define MAX_CODECS 10
 #define MAX_TOKENSIZE 64
 #define MAX_TOKENS 32