Skip to content

Commit eb00827

Browse files
committed
Merge branch 'release-0.23'
2 parents f27cf89 + d238fc1 commit eb00827

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1043
-618
lines changed

.hound.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ java_script:
55

66
scss:
77
enabled: true
8-
config_file: .scss.yml
8+
config_file: src/styles/scss.yml

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ $ make
4343

4444
## Build seperately
4545

46-
Get Go external dependencies first with ``make get``.
46+
There are several make targets available. Get Go external dependencies at
47+
least once with ``make get``, all the other targets depend on this.
4748

4849
```bash
50+
$ make get
4951
$ make assets
5052
$ make binary
5153
```
@@ -121,8 +123,8 @@ Spreed WebRTC should be run through a SSL frontend proxy with
121123
support for Websockets. Example configuration for Nginx can be
122124
found in `doc/NGINX.txt`.
123125

124-
In addion for real work use one also needs a STUN/TURN server
125-
configured with shared secret support.
126+
In addion for real world use, one also needs a STUN/TURN server
127+
configured (with shared secret support).
126128

127129
See https://code.google.com/p/rfc5766-turn-server/ for a free
128130
open source TURN server implementation. Make sure to use a recent

debian/changelog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
spreed-webrtc-server (0.23.7) precise; urgency=low
2+
3+
* Updated SCSS to match coding style.
4+
* Updated sjcl.js to 1.0.2.
5+
* Fixed possible reconnect loop.
6+
* TURN Ttl refresh timer is no longer lost when a room was joined.
7+
* Fixed a possible dead lock when a hanging connection was replaced.
8+
* Fixed authentication id logging.
9+
* Avoid broken local video aspect ratio when camera changes aspect ratio while capturing (Mac OS).
10+
* 1080p and 720p now can fail back to lower resolution when the camera fails to provide the requested resolution.
11+
* Chat messages are now limited to 200k characters in web client.
12+
* Channeling API now discards all incoming messages larger than 1MB.
13+
* Video component now corretly exits from full screen in all cases.
14+
15+
-- Simon Eisenmann <[email protected]> Thu, 05 Mar 2015 18:00:55 +0100
16+
117
spreed-webrtc-server (0.23.6) precise; urgency=low
218

319
* Fixed Youtube module.

src/app/spreed-webrtc-server/channelling_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (api *channellingAPI) OnIncoming(c ResponseSender, session *Session, msg *D
113113
}
114114

115115
if err := api.Authenticate(session, st, ""); err == nil {
116-
log.Println("Authentication success", session.Userid)
116+
log.Println("Authentication success", session.Userid())
117117
api.SendSelf(c, session)
118118
session.BroadcastStatus()
119119
} else {

src/app/spreed-webrtc-server/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ func (client *client) OnText(b Buffer) {
7171
if incoming, err := client.DecodeIncoming(b); err == nil {
7272
client.OnIncoming(client, client.session, incoming)
7373
} else {
74-
log.Println("OnText error while decoding JSON", err)
75-
log.Printf("JSON:\n%s\n", b)
74+
log.Println("OnText error while processing incoming message", err)
7675
}
7776
}
7877

src/app/spreed-webrtc-server/connection.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,12 @@ func (c *connection) Close() {
104104
c.mutex.Unlock()
105105
return
106106
}
107-
c.ws.Close()
108107
c.isClosed = true
108+
c.mutex.Unlock()
109+
// Unlock while we close the websocket connection.
110+
c.ws.Close()
111+
// Lock again to clean up the queue and send out the signal.
112+
c.mutex.Lock()
109113
for {
110114
head := c.queue.Front()
111115
if head == nil {

src/app/spreed-webrtc-server/hub.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,12 @@ func (h *hub) OnConnect(client Client, session *Session) {
154154
log.Printf("Created client %d with id %s\n", client.Index(), session.Id)
155155
// Register connection or replace existing one.
156156
if ec, ok := h.clients[session.Id]; ok {
157-
log.Printf("Closing obsolete client %d with id %s\n", ec.Index(), session.Id)
158-
ec.ReplaceAndClose()
157+
// Clean up old client at the end and make sure to run this in another go routine,
158+
// to avoid blocking the new client if the old one hangs or whatever.
159+
go func() {
160+
log.Printf("Closing obsolete client %d (replaced with %d) with id %s\n", ec.Index(), client.Index(), session.Id)
161+
ec.ReplaceAndClose()
162+
}()
159163
}
160164
h.clients[session.Id] = client
161165
h.mutex.Unlock()

src/app/spreed-webrtc-server/incoming_codec.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ package main
2424
import (
2525
"bytes"
2626
"encoding/json"
27+
"errors"
2728
"log"
2829
)
2930

@@ -42,18 +43,23 @@ type Codec interface {
4243
}
4344

4445
type incomingCodec struct {
45-
buffers BufferCache
46+
buffers BufferCache
47+
incomingLimit int
4648
}
4749

48-
func NewCodec() Codec {
49-
return &incomingCodec{NewBufferCache(1024, bytes.MinRead)}
50+
func NewCodec(incomingLimit int) Codec {
51+
return &incomingCodec{NewBufferCache(1024, bytes.MinRead), incomingLimit}
5052
}
5153

5254
func (codec incomingCodec) NewBuffer() Buffer {
5355
return codec.buffers.New()
5456
}
5557

5658
func (codec incomingCodec) DecodeIncoming(b Buffer) (*DataIncoming, error) {
59+
length := b.GetBuffer().Len()
60+
if length > codec.incomingLimit {
61+
return nil, errors.New("Incoming message size limit exceeded")
62+
}
5763
incoming := &DataIncoming{}
5864
return incoming, json.Unmarshal(b.Bytes(), incoming)
5965
}

src/app/spreed-webrtc-server/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ func runner(runtime phoenix.Runtime) error {
280280
log.Printf("Loaded extra templates from: %s", extraFolder)
281281
}
282282

283+
// Define incoming channeling API limit it byte. Larger messages will be discarded.
284+
incomingCodecLimit := 1024 * 1024 // 1MB
285+
283286
// Create realm string from config.
284287
computedRealm := fmt.Sprintf("%s.%s", serverRealm, config.Token)
285288

@@ -336,7 +339,7 @@ func runner(runtime phoenix.Runtime) error {
336339

337340
// Add handlers.
338341
buddyImages := NewImageCache()
339-
codec := NewCodec()
342+
codec := NewCodec(incomingCodecLimit)
340343
roomManager := NewRoomManager(config, codec)
341344
hub := NewHub(config, sessionSecret, encryptionSecret, turnSecret, codec)
342345
tickets := NewTickets(sessionSecret, encryptionSecret, computedRealm)

src/styles/_shame.scss

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,54 +23,60 @@
2323

2424
// Remove boostrap 3 modal scroll bar.
2525
.modal {
26-
overflow-y: auto;
26+
overflow-y: auto;
2727
}
2828

2929
// Toastr fontawesome support.
3030
#toast-container > .toast {
31-
background-image: none !important;
31+
background-image: none !important;
3232
}
33+
3334
#toast-container > .toast:before {
34-
position: fixed;
35-
font-family: FontAwesome;
36-
font-size: 20px;
37-
line-height: 20px;
38-
float: left;
39-
color: #fff;
40-
padding-right: 0.5em;
41-
margin: auto 0.5em auto -1.5em;
35+
color: #fff;
36+
float: left;
37+
font-family: FontAwesome;
38+
font-size: 20px;
39+
line-height: 20px;
40+
margin: auto .5em auto -1.5em;
41+
padding-right: .5em;
42+
position: fixed;
4243
}
44+
4345
#toast-container > .toast-warning:before {
44-
content: "\f05a";
46+
content: '\f05a';
4547
}
48+
4649
#toast-container > .toast-error:before {
47-
content: "\f05a";
50+
content: '\f05a';
4851
}
52+
4953
#toast-container > .toast-info:before {
50-
content: "\f05a";
54+
content: '\f05a';
5155
}
56+
5257
#toast-container > .toast-success:before {
53-
content: "\f05a";
58+
content: '\f05a';
5459
}
5560

5661
// No shadows for toastr.
57-
#toast-container > :hover, #toast-container > div {
58-
box-shadow: none !important;
62+
#toast-container > :hover,
63+
#toast-container > div {
64+
box-shadow: none !important;
5965
}
6066

6167
// Update colors for toaster.
6268
.toast-info {
63-
background-color: #5bc0de;
69+
background-color: #5bc0de;
6470
}
6571

6672
// Update position of toastr close icon.
6773
.toast-close-button {
68-
top: -0.6em;
69-
font-size: 1em;
74+
font-size: 1em;
75+
top: -.6em;
7076
}
7177

7278
// No opacity for toastr.
7379
#toast-container > div {
74-
opacity: 1;
75-
filter: alpha(opacity=100);
76-
}
80+
filter: alpha(opacity=100);
81+
opacity: 1;
82+
}

0 commit comments

Comments
 (0)