Merge branch 'master' into develop

This commit is contained in:
Mark Haines 2014-10-24 10:57:38 +01:00
commit be6d41ffe5
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class VoipRestServlet(RestServlet):
if not turnUris or not turnSecret or not userLifetime: if not turnUris or not turnSecret or not userLifetime:
defer.returnValue( (200, {}) ) defer.returnValue( (200, {}) )
expiry = self.hs.get_clock().time_msec() + userLifetime expiry = (self.hs.get_clock().time_msec() + userLifetime) / 1000
username = "%d:%s" % (expiry, auth_user.to_string()) username = "%d:%s" % (expiry, auth_user.to_string())
mac = hmac.new(turnSecret, msg=username, digestmod=hashlib.sha1) mac = hmac.new(turnSecret, msg=username, digestmod=hashlib.sha1)