rtsp-auth: Don't remove digest-auth nonces that already/still have a client connected
authorSebastian Dröge <sebastian@centricular.com>
Fri, 2 Dec 2016 12:36:50 +0000 (14:36 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 2 Dec 2016 12:36:50 +0000 (14:36 +0200)
gst/rtsp-server/rtsp-auth.c

index 5bca6f6..85758c4 100644 (file)
@@ -831,7 +831,8 @@ default_generate_authenticate_header (GstRTSPAuth * auth, GstRTSPContext * ctx)
       while (g_hash_table_iter_next (&iter, &key, &value)) {
         GstRTSPDigestNonce *tmp = value;
 
-        if (nonce->timestamp - tmp->timestamp >= 30 * G_USEC_PER_SEC)
+        if (!tmp->client
+            && nonce->timestamp - tmp->timestamp >= 30 * G_USEC_PER_SEC)
           g_hash_table_iter_remove (&iter);
       }
       auth->priv->last_nonce_check = nonce->timestamp;