Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package galene for openSUSE:Factory checked 
in at 2022-05-15 19:00:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/galene (Old)
 and      /work/SRC/openSUSE:Factory/.galene.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "galene"

Sun May 15 19:00:28 2022 rev:19 rq:977310 version:0.5.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/galene/galene.changes    2022-04-21 
15:48:47.464324721 +0200
+++ /work/SRC/openSUSE:Factory/.galene.new.1538/galene.changes  2022-05-15 
19:00:33.054419356 +0200
@@ -1,0 +2,18 @@
+Fri May 06 15:37:46 UTC 2022 - mich...@stroeder.com
+
+- Update to version 0.5.4:
+  * Fix username check when a token is present.
+  * Improve the performance of AES in CTR mode.
+  * Tweak detection of keyframes with H.264.
+
+-------------------------------------------------------------------
+Mon Apr 25 14:58:48 UTC 2022 - mich...@stroeder.com
+
+- Update to version 0.5.3:
+  * Remove a forgotten "replace" that prevented 0.5.2 from compiling
+    unless "pion/ice" was downloaded manually.
+  * Fix a race condition in the rate estimator.
+  * Update pion/ice to a version that handles aggressive nomination; this
+    avoids broken connection in some (fairly rare) cases.
+
+-------------------------------------------------------------------

Old:
----
  galene-0.5.2.tar.gz

New:
----
  galene-0.5.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ galene.spec ++++++
--- /var/tmp/diff_new_pack.8EiJ3O/_old  2022-05-15 19:00:34.006420485 +0200
+++ /var/tmp/diff_new_pack.8EiJ3O/_new  2022-05-15 19:00:34.010420490 +0200
@@ -25,7 +25,7 @@
 %bcond_without  apparmor
 
 Name:           galene
-Version:        0.5.2
+Version:        0.5.4
 Release:        0
 Summary:        Gal??ne videoconferencing server
 License:        MIT

++++++ _service ++++++
--- /var/tmp/diff_new_pack.8EiJ3O/_old  2022-05-15 19:00:34.046420533 +0200
+++ /var/tmp/diff_new_pack.8EiJ3O/_new  2022-05-15 19:00:34.046420533 +0200
@@ -3,8 +3,8 @@
     <param name="url">https://github.com/jech/galene.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">galene-0.5.2</param>
-    <param name="version">0.5.2</param>
+    <param name="revision">galene-0.5.4</param>
+    <param name="version">0.5.4</param>
     <param name="changesgenerate">enable</param>
     <!--param name="versionrewrite-pattern">galene-(\d+)</param>
     <param name="versionrewrite-replacement">\1</param-->

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.8EiJ3O/_old  2022-05-15 19:00:34.070420562 +0200
+++ /var/tmp/diff_new_pack.8EiJ3O/_new  2022-05-15 19:00:34.070420562 +0200
@@ -3,6 +3,6 @@
                 <param name="url">git://github.com/jech/galene.git</param>
               <param 
name="changesrevision">ba75bfeb3acd33f92084fa0eb88be9aee824badf</param></service><service
 name="tar_scm">
                 <param name="url">https://github.com/jech/galene.git</param>
-              <param 
name="changesrevision">474c58cc7dcf39b39af52e679d4ca1dcc8466673</param></service></servicedata>
+              <param 
name="changesrevision">4c8fdb8ea83057c1457b3681d667e1aec992550e</param></service></servicedata>
 (No newline at EOF)
 

++++++ galene-0.5.2.tar.gz -> galene-0.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/CHANGES new/galene-0.5.4/CHANGES
--- old/galene-0.5.2/CHANGES    2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/CHANGES    2022-05-05 13:43:09.000000000 +0200
@@ -1,3 +1,17 @@
+5 May 2022: Galene 0.5.4
+
+  * Fix username check when a token is present.
+  * Improve the performance of AES in CTR mode.
+  * Tweak detection of keyframes with H.264.
+
+25 April 2022: Galene 0.5.3
+
+  * Remove a forgotten "replace" that prevented 0.5.2 from compiling
+    unless "pion/ice" was downloaded manually.
+  * Fix a race condition in the rate estimator.
+  * Update pion/ice to a version that handles aggressive nomination; this
+    avoids broken connection in some (fairly rare) cases.
+
 20 April 2022: Galene 0.5.2
 
   * Implement audio-video sync in the diskwriter.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/codecs/codecs.go 
new/galene-0.5.4/codecs/codecs.go
--- old/galene-0.5.2/codecs/codecs.go   2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/codecs/codecs.go   2022-05-05 13:43:09.000000000 +0200
@@ -9,7 +9,6 @@
 )
 
 var errTruncated = errors.New("truncated packet")
-var errUnsupportedCodec = errors.New("unsupported codec")
 
 // Keyframe determines if packet is the start of a keyframe.
 // It returns (true, true) if that is the case, (false, true) if that is
@@ -126,7 +125,7 @@
                        return false, false
                } else if nalu <= 23 {
                        // simple NALU
-                       return nalu == 5, true
+                       return nalu == 7, true
                } else if nalu == 24 || nalu == 25 || nalu == 26 || nalu == 27 {
                        // STAP-A, STAP-B, MTAP16 or MTAP24
                        i := 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/estimator/estimator.go 
new/galene-0.5.4/estimator/estimator.go
--- old/galene-0.5.2/estimator/estimator.go     2022-04-20 19:55:33.000000000 
+0200
+++ new/galene-0.5.4/estimator/estimator.go     2022-05-05 13:43:09.000000000 
+0200
@@ -3,65 +3,85 @@
 package estimator
 
 import (
-       "sync/atomic"
+       "sync"
        "time"
 
        "github.com/jech/galene/rtptime"
 )
 
 type Estimator struct {
-       interval     uint64
+       interval uint64
+
+       mu           sync.Mutex
        time         uint64
        bytes        uint32
        packets      uint32
-       totalBytes   uint32
-       totalPackets uint32
+       totalBytes   uint64
+       totalPackets uint64
        rate         uint32
        packetRate   uint32
 }
 
 // New creates a new estimator that estimates rate over the last interval.
 func New(interval time.Duration) *Estimator {
+       return new(rtptime.Now(rtptime.JiffiesPerSec), interval)
+}
+
+func new(now uint64, interval time.Duration) *Estimator {
        return &Estimator{
                interval: uint64(
                        rtptime.FromDuration(interval, rtptime.JiffiesPerSec),
                ),
-               time: rtptime.Now(rtptime.JiffiesPerSec),
+               time: now,
        }
 }
 
+// called locked
 func (e *Estimator) swap(now uint64) {
-       tm := atomic.LoadUint64(&e.time)
-       jiffies := now - tm
-       bytes := atomic.SwapUint32(&e.bytes, 0)
-       packets := atomic.SwapUint32(&e.packets, 0)
-       atomic.AddUint32(&e.totalBytes, bytes)
-       atomic.AddUint32(&e.totalPackets, packets)
+       jiffies := now - e.time
+       bytes := e.bytes
+       e.bytes = 0
+       packets := e.packets
+       e.packets = 0
+       e.totalBytes += uint64(bytes)
+       e.totalPackets += uint64(packets)
 
        var rate, packetRate uint32
        if jiffies >= rtptime.JiffiesPerSec/1000 {
-               rate = uint32(uint64(bytes) * rtptime.JiffiesPerSec / jiffies)
-               packetRate =
-                       uint32(uint64(packets) * rtptime.JiffiesPerSec / 
jiffies)
+               rate = uint32((uint64(bytes)*rtptime.JiffiesPerSec + jiffies/2) 
/ jiffies)
+               packetRate = uint32((uint64(packets)*rtptime.JiffiesPerSec + 
jiffies/2) / jiffies)
        }
-       atomic.StoreUint32(&e.rate, rate)
-       atomic.StoreUint32(&e.packetRate, packetRate)
-       atomic.StoreUint64(&e.time, now)
+       e.rate = rate
+       e.packetRate = packetRate
+       e.time = now
 }
 
 // Accumulate records one packet of size bytes
 func (e *Estimator) Accumulate(bytes uint32) {
-       atomic.AddUint32(&e.bytes, bytes)
-       atomic.AddUint32(&e.packets, 1)
+       e.mu.Lock()
+       if e.bytes < ^uint32(0)-bytes {
+               e.bytes += bytes
+       }
+       if e.packets < ^uint32(0)-1 {
+               e.packets += 1
+       }
+       e.mu.Unlock()
 }
 
+// called locked
 func (e *Estimator) estimate(now uint64) (uint32, uint32) {
-       tm := atomic.LoadUint64(&e.time)
-       if now < tm || now-tm > e.interval {
+       if now < e.time {
+               // time went backwards
+               if e.time-now > e.interval {
+                       e.time = now
+                       e.packets = 0
+                       e.bytes = 0
+               }
+       } else if now-e.time >= e.interval {
                e.swap(now)
        }
 
-       return atomic.LoadUint32(&e.rate), atomic.LoadUint32(&e.packetRate)
+       return e.rate, e.packetRate
 }
 
 // Estimate returns an estimate of the rate over the last interval.
@@ -69,12 +89,15 @@
 // passed to New.  It returns the byte rate and the packet rate, in units
 // per second.
 func (e *Estimator) Estimate() (uint32, uint32) {
+       e.mu.Lock()
+       defer e.mu.Unlock()
        return e.estimate(rtptime.Now(rtptime.JiffiesPerSec))
 }
 
 // Totals returns the total number of bytes and packets accumulated.
-func (e *Estimator) Totals() (uint32, uint32) {
-       b := atomic.LoadUint32(&e.totalBytes) + atomic.LoadUint32(&e.bytes)
-       p := atomic.LoadUint32(&e.totalPackets) + atomic.LoadUint32(&e.packets)
-       return p, b
+func (e *Estimator) Totals() (uint64, uint64) {
+       e.mu.Lock()
+       defer e.mu.Unlock()
+       return e.totalPackets + uint64(e.packets),
+               e.totalBytes + uint64(e.bytes)
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/estimator/estimator_test.go 
new/galene-0.5.4/estimator/estimator_test.go
--- old/galene-0.5.2/estimator/estimator_test.go        2022-04-20 
19:55:33.000000000 +0200
+++ new/galene-0.5.4/estimator/estimator_test.go        2022-05-05 
13:43:09.000000000 +0200
@@ -2,13 +2,16 @@
 
 import (
        "testing"
+       "time"
+       "sync"
+       "sync/atomic"
 
        "github.com/jech/galene/rtptime"
 )
 
 func TestEstimator(t *testing.T) {
        now := rtptime.Jiffies()
-       e := New(rtptime.JiffiesPerSec)
+       e := new(now, time.Second)
 
        e.estimate(now)
        e.Accumulate(42)
@@ -43,3 +46,97 @@
        }
 
 }
+
+func TestEstimatorMany(t *testing.T) {
+       now := rtptime.Jiffies()
+       e := new(now, time.Second)
+
+       for i := 0; i < 10000; i++ {
+               e.Accumulate(42)
+               now += rtptime.JiffiesPerSec / 1000
+               b, p := e.estimate(now)
+               if i >= 1000 {
+                       if p != 1000 || b != p*42 {
+                               t.Errorf("Got %v %v (%v), expected %v %v",
+                                       p, b, 1000, i, p*42,
+                               )
+                       }
+               }
+       }
+}
+
+func TestEstimatorParallel(t *testing.T) {
+       now := make([]uint64, 1)
+       now[0] = rtptime.Jiffies()
+       getNow := func() uint64 {
+               return atomic.LoadUint64(&now[0])
+       }
+       addNow := func(v uint64) {
+               atomic.AddUint64(&now[0], v)
+       }
+       e := new(getNow(), time.Second)
+       estimate := func() (uint32, uint32) {
+               e.mu.Lock()
+               defer e.mu.Unlock()
+               return e.estimate(getNow())
+       }
+
+       f := func(n int) {
+               for i := 0; i < 10000; i++ {
+                       e.Accumulate(42)
+                       addNow(rtptime.JiffiesPerSec / 1000)
+                       b, p := estimate()
+                       if i >= 1000 {
+                               if b != p * 42 {
+                                       t.Errorf("%v: Got %v %v (%v), expected 
%v %v",
+                                               n, p, b, i, 1000, p*42,
+                                       )
+                               }
+                       }
+               }
+       }
+
+       var wg sync.WaitGroup
+       for i := 0; i < 16; i++ {
+               wg.Add(1)
+               go func(i int) {
+                       f(i)
+                       wg.Done()
+               }(i)
+       }
+       wg.Wait()
+}
+
+func BenchmarkEstimator(b *testing.B) {
+       e := New(time.Second)
+
+       e.Estimate()
+       time.Sleep(time.Millisecond)
+       e.Estimate()
+       b.ResetTimer()
+
+       for i := 0; i < 1000 * b.N; i++ {
+               e.Accumulate(100)
+
+       }
+       e.Estimate()
+}
+
+func BenchmarkEstimatorParallel(b *testing.B) {
+       e := New(time.Second)
+
+       e.Estimate()
+       time.Sleep(time.Millisecond)
+       e.Estimate()
+       b.ResetTimer()
+
+       b.RunParallel(func (pb *testing.PB) {
+               for pb.Next() {
+                       for i := 0; i < 1000; i++ {
+                               e.Accumulate(100)
+                       }
+               }
+
+       })
+       e.Estimate()
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/go.mod new/galene-0.5.4/go.mod
--- old/galene-0.5.2/go.mod     2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/go.mod     2022-05-05 13:43:09.000000000 +0200
@@ -8,14 +8,15 @@
        github.com/gorilla/websocket v1.5.0
        github.com/jech/cert v0.0.0-20210819231831-aca735647728
        github.com/jech/samplebuilder v0.0.0-20220417174833-7353a593563a
-       github.com/pion/ice/v2 v2.2.4
+       github.com/pion/ice/v2 v2.2.6
        github.com/pion/rtcp v1.2.9
        github.com/pion/rtp v1.7.13
        github.com/pion/sdp/v3 v3.0.4
+       github.com/pion/srtp/v2 v2.0.6 // indirect
        github.com/pion/turn/v2 v2.0.8
-       github.com/pion/webrtc/v3 v3.1.32
+       github.com/pion/webrtc/v3 v3.1.34
        golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4
-       golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2 // indirect
-       golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
+       golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 // indirect
+       golang.org/x/sys v0.0.0-20220422013727-9388b58f7150
        golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/go.sum new/galene-0.5.4/go.sum
--- old/galene-0.5.2/go.sum     2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/go.sum     2022-05-05 13:43:09.000000000 +0200
@@ -54,8 +54,8 @@
 github.com/pion/dtls/v2 v2.1.3 h1:3UF7udADqous+M2R5Uo2q/YaP4EzUoWKdfX2oscCUio=
 github.com/pion/dtls/v2 v2.1.3/go.mod 
h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus=
 github.com/pion/ice/v2 v2.1.12/go.mod 
h1:ovgYHUmwYLlRvcCLI67PnQ5YGe+upXZbGgllBDG/ktU=
-github.com/pion/ice/v2 v2.2.4 h1:sTHT39ywr5uqzyEMT7thEhOWsNOcdkHSZBbgQohFuZU=
-github.com/pion/ice/v2 v2.2.4/go.mod 
h1:SWuHiOGP17lGromHTFadUe1EuPgFh/oCU6FCMZHooVE=
+github.com/pion/ice/v2 v2.2.6 h1:R/vaLlI1J2gCx141L5PEwtuGAGcyS6e7E0hDeJFq5Ig=
+github.com/pion/ice/v2 v2.2.6/go.mod 
h1:SWuHiOGP17lGromHTFadUe1EuPgFh/oCU6FCMZHooVE=
 github.com/pion/interceptor v0.1.0/go.mod 
h1:j5NIl3tJJPB3u8+Z2Xz8MZs/VV6rc+If9mXEKNuFmEM=
 github.com/pion/interceptor v0.1.10 
h1:DJ2GjMGm4XGIQgMJxuEpdaExdY/6RdngT7Uh4oVmquU=
 github.com/pion/interceptor v0.1.10/go.mod 
h1:Lh3JSl/cbJ2wP8I3ccrjh1K/deRGRn3UlSPuOTiHb6U=
@@ -81,8 +81,9 @@
 github.com/pion/sctp v1.8.2/go.mod 
h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
 github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
 github.com/pion/sdp/v3 v3.0.4/go.mod 
h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
-github.com/pion/srtp/v2 v2.0.5 h1:ks3wcTvIUE/GHndO3FAvROQ9opy0uLELpwHJaQ1yqhQ=
 github.com/pion/srtp/v2 v2.0.5/go.mod 
h1:8k6AJlal740mrZ6WYxc4Dg6qDqqhxoRG2GSjlUhDF0A=
+github.com/pion/srtp/v2 v2.0.6 h1:sTS0ptsREtS+XJIagwPYMCFQPKE7TpYTz8BDTXcn0y8=
+github.com/pion/srtp/v2 v2.0.6/go.mod 
h1:5TtM9yw6lsH0ppNCehB/EjEUli7VkUgKSPJqWVqbhQ4=
 github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
 github.com/pion/stun v0.3.5/go.mod 
h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
 github.com/pion/transport v0.10.1/go.mod 
h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
@@ -96,8 +97,8 @@
 github.com/pion/udp v0.1.1 h1:8UAPvyqmsxK8oOjloDk4wUt63TzFe9WEJkg5lChlj7o=
 github.com/pion/udp v0.1.1/go.mod 
h1:6AFo+CMdKQm7UiA0eUPA8/eVCTx8jBIITLZHc9DWX5M=
 github.com/pion/webrtc/v3 v3.1.0/go.mod 
h1:t51XSam1k56eYLuO1Ubxjs3pDBfGYxkGBFhYf55Mn/s=
-github.com/pion/webrtc/v3 v3.1.32 
h1:FtHxI4F8mMbpdn2L5GXUqgzRkP5e9CIlcSQFgOFRebw=
-github.com/pion/webrtc/v3 v3.1.32/go.mod 
h1:NduZ5Q+rc1y8Zf81WOuNyV8WTBKOfBLhJQ045Z3qP+E=
+github.com/pion/webrtc/v3 v3.1.34 
h1:GUfv2zxWge77x1FhZ6Fge8KQd3bTzvX1CMN1/LmTazM=
+github.com/pion/webrtc/v3 v3.1.34/go.mod 
h1:jClfnbJzt8wtmewGxhPzgE5wZ0U/gNB78XCtmc/uz3k=
 github.com/pkg/errors v0.9.1/go.mod 
h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 
h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod 
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -135,8 +136,8 @@
 golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod 
h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod 
h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/net v0.0.0-20220401154927-543a649e0bdd/go.mod 
h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2 
h1:6mzvA99KwZxbOrxww4EvWVQUnN1+xEu9tafK5ZxkYeA=
-golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2/go.mod 
h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 
h1:yssD99+7tqHWO5Gwh81phT+67hg+KttniBr6UnEXOY8=
+golang.org/x/net v0.0.0-20220421235706-1d1ef9303861/go.mod 
h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod 
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -154,8 +155,8 @@
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod 
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220412211240-33da011f77ad 
h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
-golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 
h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc=
+golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod 
h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod 
h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod 
h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/group/client.go 
new/galene-0.5.4/group/client.go
--- old/galene-0.5.2/group/client.go    2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/group/client.go    2022-05-05 13:43:09.000000000 +0200
@@ -46,7 +46,7 @@
                theirKey := pbkdf2.Key(
                        []byte(pw), salt, p.Iterations, len(key), h,
                )
-               return bytes.Compare(key, theirKey) == 0, nil
+               return bytes.Equal(key, theirKey), nil
        default:
                return false, errors.New("unknown password type")
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/group/group.go 
new/galene-0.5.4/group/group.go
--- old/galene-0.5.2/group/group.go     2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/group/group.go     2022-05-05 13:43:09.000000000 +0200
@@ -1075,11 +1075,10 @@
 }
 
 func (desc *Description) GetPermission(group string, creds ClientCredentials) 
(string, []string, error) {
-       if !desc.AllowAnonymous && creds.Username == "" {
-               return "", nil, ErrAnonymousNotAuthorised
-       }
-
        if creds.Token == "" {
+               if !desc.AllowAnonymous && creds.Username == "" {
+                       return "", nil, ErrAnonymousNotAuthorised
+               }
                if found, good := matchClient(group, creds, desc.Op); found {
                        if good {
                                var p []string
@@ -1111,6 +1110,9 @@
                log.Printf("Token authentication: %v", err)
                return "", nil, ErrNotAuthorised
        }
+       if !desc.AllowAnonymous && sub == "" {
+               return "", nil, ErrAnonymousNotAuthorised
+       }
        conf, err := GetConfiguration()
        if err != nil {
                log.Printf("Read config.json: %v", err)
@@ -1154,7 +1156,7 @@
        ClientCount *int   `json:"clientCount,omitempty"`
 }
 
-func (g *Group) Status (authentified bool) Status {
+func (g *Group) Status(authentified bool) Status {
        desc := g.Description()
        d := Status{
                Name:        g.name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/ice/ice.go new/galene-0.5.4/ice/ice.go
--- old/galene-0.5.2/ice/ice.go 2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/ice/ice.go 2022-05-05 13:43:09.000000000 +0200
@@ -1,7 +1,6 @@
 package ice
 
 import (
-       "bytes"
        "crypto/hmac"
        "crypto/sha1"
        "encoding/base64"
@@ -10,6 +9,7 @@
        "fmt"
        "log"
        "os"
+       "strings"
        "sync/atomic"
        "time"
 
@@ -63,12 +63,12 @@
                }
                mac := hmac.New(sha1.New, []byte(cred))
                mac.Write([]byte(username))
-               buf := bytes.Buffer{}
+               buf := strings.Builder{}
                e := base64.NewEncoder(base64.StdEncoding, &buf)
                e.Write(mac.Sum(nil))
                e.Close()
                s.Username = username
-               s.Credential = string(buf.Bytes())
+               s.Credential = buf.String()
                s.CredentialType = webrtc.ICECredentialTypePassword
        default:
                return webrtc.ICEServer{}, errors.New("unsupported credential 
type")
@@ -245,7 +245,7 @@
                if err != nil {
                        return 0, err
                }
-               return time.Now().Sub(tm), nil
+               return time.Since(tm), nil
        case <-timer.C:
                return 0, errTimeout
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/ice/ice_test.go 
new/galene-0.5.4/ice/ice_test.go
--- old/galene-0.5.2/ice/ice_test.go    2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/ice/ice_test.go    2022-05-05 13:43:09.000000000 +0200
@@ -1,7 +1,6 @@
 package ice
 
 import (
-       "bytes"
        "crypto/hmac"
        "crypto/sha1"
        "encoding/base64"
@@ -57,11 +56,11 @@
 
        mac := hmac.New(sha1.New, []byte(s.Credential.(string)))
        mac.Write([]byte(sss.Username))
-       buf := bytes.Buffer{}
+       buf := strings.Builder{}
        e := base64.NewEncoder(base64.StdEncoding, &buf)
        e.Write(mac.Sum(nil))
        e.Close()
-       ss.Credential = string(buf.Bytes())
+       ss.Credential = buf.String()
 
        if err != nil || !reflect.DeepEqual(sss, ss) {
                t.Errorf("Got %v, expected %v", sss, ss)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/jitter/jitter.go 
new/galene-0.5.4/jitter/jitter.go
--- old/galene-0.5.2/jitter/jitter.go   2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/jitter/jitter.go   2022-05-05 13:43:09.000000000 +0200
@@ -1,3 +1,4 @@
+// package jitter implements a jitter estimator
 package jitter
 
 import (
@@ -14,6 +15,7 @@
        jitter uint32 // atomic
 }
 
+// New returns a new jitter estimator that uses units of 1/hz seconds.
 func New(hz uint32) *Estimator {
        return &Estimator{hz: hz}
 }
@@ -36,10 +38,13 @@
        e.time = now
 }
 
+// Accumulate accumulates a new sample for the jitter estimator.
 func (e *Estimator) Accumulate(timestamp uint32) {
        e.accumulate(timestamp, uint32(rtptime.Now(e.hz)))
 }
 
+// Jitter returns the estimated jitter, in units of 1/hz seconds.
+// This function is safe to call concurrently.
 func (e *Estimator) Jitter() uint32 {
        return atomic.LoadUint32(&e.jitter)
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/packetcache/packetcache.go 
new/galene-0.5.4/packetcache/packetcache.go
--- old/galene-0.5.2/packetcache/packetcache.go 2022-04-20 19:55:33.000000000 
+0200
+++ new/galene-0.5.4/packetcache/packetcache.go 2022-05-05 13:43:09.000000000 
+0200
@@ -12,9 +12,6 @@
 // a multiple of 8.
 const BufSize = 1504
 
-// The maximum number of packets that constitute a keyframe.
-const maxFrame = 1024
-
 // entry represents a cached packet.
 type entry struct {
        seqno           uint16
@@ -118,7 +115,6 @@
        }
 
        bitmap.bitmap |= (1 << uint16(seqno-bitmap.first))
-       return
 }
 
 // BitmapGet shifts up to 17 bits out of the bitmap.  It returns a boolean
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/rtpconn/rtpconn.go 
new/galene-0.5.4/rtpconn/rtpconn.go
--- old/galene-0.5.2/rtpconn/rtpconn.go 2022-04-20 19:55:33.000000000 +0200
+++ new/galene-0.5.4/rtpconn/rtpconn.go 2022-05-05 13:43:09.000000000 +0200
@@ -410,7 +410,6 @@
        srTime        uint64
        srNTPTime     uint64
        srRTPTime     uint32
-       maxLayer      uint8
        local         []conn.DownTrack
        bufferedNACKs []uint16
        actions       []trackAction
@@ -1070,8 +1069,8 @@
                                        SSRC:        uint32(t.ssrc),
                                        NTPTime:     nowNTP,
                                        RTPTime:     nowRTP,
-                                       PacketCount: p,
-                                       OctetCount:  b,
+                                       PacketCount: uint32(p),
+                                       OctetCount:  uint32(b),
                                })
                        t.setSRTime(jiffies, nowNTP)
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/rtpconn/webclient.go 
new/galene-0.5.4/rtpconn/webclient.go
--- old/galene-0.5.2/rtpconn/webclient.go       2022-04-20 19:55:33.000000000 
+0200
+++ new/galene-0.5.4/rtpconn/webclient.go       2022-05-05 13:43:09.000000000 
+0200
@@ -165,7 +165,7 @@
                c.up = make(map[string]*rtpUpConnection)
        }
        if c.down != nil && c.down[id] != nil {
-               return nil, false, errors.New("Adding duplicate connection")
+               return nil, false, errors.New("adding duplicate connection")
        }
 
        old := c.up[id]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/turnserver/turnserver.go 
new/galene-0.5.4/turnserver/turnserver.go
--- old/galene-0.5.2/turnserver/turnserver.go   2022-04-20 19:55:33.000000000 
+0200
+++ new/galene-0.5.4/turnserver/turnserver.go   2022-05-05 13:43:09.000000000 
+0200
@@ -17,9 +17,11 @@
 var password string
 var Address string
 
-var mu sync.Mutex
-var addresses []net.Addr
-var server *turn.Server
+var server struct {
+       mu        sync.Mutex
+       addresses []net.Addr
+       server    *turn.Server
+}
 
 func publicAddresses() ([]net.IP, error) {
        addrs, err := net.InterfaceAddrs()
@@ -91,10 +93,10 @@
 }
 
 func Start() error {
-       mu.Lock()
-       defer mu.Unlock()
+       server.mu.Lock()
+       defer server.mu.Unlock()
 
-       if server != nil {
+       if server.server != nil {
                return nil
        }
 
@@ -111,8 +113,6 @@
                return err
        }
 
-       log.Printf("Starting built-in TURN server on %v", addr.String())
-
        username = "galene"
        buf := make([]byte, 6)
        _, err = rand.Read(buf)
@@ -135,14 +135,14 @@
                pcc, lc := listener(net.IP{0, 0, 0, 0}, addr.Port, a)
                if pcc != nil {
                        pccs = append(pccs, *pcc)
-                       addresses = append(addresses, &net.UDPAddr{
+                       server.addresses = append(server.addresses, 
&net.UDPAddr{
                                IP:   a,
                                Port: addr.Port,
                        })
                }
                if lc != nil {
                        lcs = append(lcs, *lc)
-                       addresses = append(addresses, &net.TCPAddr{
+                       server.addresses = append(server.addresses, 
&net.TCPAddr{
                                IP:   a,
                                Port: addr.Port,
                        })
@@ -161,17 +161,21 @@
                        pcc, lc := listener(a, addr.Port, nil)
                        if pcc != nil {
                                pccs = append(pccs, *pcc)
-                               addresses = append(addresses, &net.UDPAddr{
-                                       IP:   a,
-                                       Port: addr.Port,
-                               })
+                               server.addresses = append(server.addresses,
+                                       &net.UDPAddr{
+                                               IP:   a,
+                                               Port: addr.Port,
+                                       },
+                               )
                        }
                        if lc != nil {
                                lcs = append(lcs, *lc)
-                               addresses = append(addresses, &net.TCPAddr{
-                                       IP:   a,
-                                       Port: addr.Port,
-                               })
+                               server.addresses = append(server.addresses,
+                                       &net.TCPAddr{
+                                               IP:   a,
+                                               Port: addr.Port,
+                                       },
+                               )
                        }
                }
        }
@@ -180,7 +184,9 @@
                return errors.New("couldn't establish any listeners")
        }
 
-       server, err = turn.NewServer(turn.ServerConfig{
+       log.Printf("Starting built-in TURN server on %v", addr.String())
+
+       server.server, err = turn.NewServer(turn.ServerConfig{
                Realm: "galene.org",
                AuthHandler: func(u, r string, src net.Addr) ([]byte, bool) {
                        if u != username || r != "galene.org" {
@@ -193,7 +199,7 @@
        })
 
        if err != nil {
-               addresses = nil
+               server.addresses = nil
                return err
        }
 
@@ -201,15 +207,15 @@
 }
 
 func ICEServers() []webrtc.ICEServer {
-       mu.Lock()
-       defer mu.Unlock()
+       server.mu.Lock()
+       defer server.mu.Unlock()
 
-       if len(addresses) == 0 {
+       if len(server.addresses) == 0 {
                return nil
        }
 
        var urls []string
-       for _, a := range addresses {
+       for _, a := range server.addresses {
                switch a := a.(type) {
                case *net.UDPAddr:
                        urls = append(urls, "turn:"+a.String())
@@ -231,16 +237,16 @@
 }
 
 func Stop() error {
-       mu.Lock()
-       defer mu.Unlock()
+       server.mu.Lock()
+       defer server.mu.Unlock()
 
-       addresses = nil
-       if server == nil {
+       server.addresses = nil
+       if server.server == nil {
                return nil
        }
        log.Printf("Stopping built-in TURN server")
-       err := server.Close()
-       server = nil
+       err := server.server.Close()
+       server.server = nil
        return err
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/galene-0.5.2/webserver/webserver.go 
new/galene-0.5.4/webserver/webserver.go
--- old/galene-0.5.2/webserver/webserver.go     2022-04-20 19:55:33.000000000 
+0200
+++ new/galene-0.5.4/webserver/webserver.go     2022-05-05 13:43:09.000000000 
+0200
@@ -123,7 +123,6 @@
        log.Printf("HTTP server error: %v", err)
        http.Error(w, "500 Internal Server Error",
                http.StatusInternalServerError)
-       return
 }
 
 const (
@@ -352,7 +351,6 @@
 
        e := json.NewEncoder(w)
        e.Encode(d)
-       return
 }
 
 func publicHandler(w http.ResponseWriter, r *http.Request) {
@@ -366,7 +364,6 @@
        g := group.GetPublic()
        e := json.NewEncoder(w)
        e.Encode(g)
-       return
 }
 
 func adminMatch(username, password string) (bool, error) {
@@ -418,7 +415,6 @@
        if err != nil {
                log.Printf("stats.json: %v", err)
        }
-       return
 }
 
 var wsUpgrader = websocket.Upgrader{

++++++ vendor.tar.gz ++++++
++++ 3593 lines of diff (skipped)

Reply via email to