liuzhe02 / bigbluebutton

Automatically exported from code.google.com/p/bigbluebutton
0 stars 0 forks source link

Problem with meetings with big duration time #1680

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a meeting with durationMinutes = 1617054

What is the expected output? What do you see instead?
The meeting should not end, instead of this, the meeting is ended just after 
the start.

It occours because the type of duration variable, as it's an integer, it 
produces a negative value.

Current version (with int):
int duration = 624910;
 long durationMilis = (duration * 60000);
 System.out.println(durationMilis);
-1160105664

Fixed version (with long):
long duration = 624910;
long durationMilis = duration * 60000;
System.out.println(durationMilis);
37494600000

Original issue reported on code.google.com by eu.tdj...@gmail.com on 5 Nov 2013 at 6:21

GoogleCodeExporter commented 9 years ago
Suggested fix: change type of duration attribute of Meeting.java to long.

Original comment by eu.tdj...@gmail.com on 5 Nov 2013 at 6:21

GoogleCodeExporter commented 9 years ago

Original comment by eu.tdj...@gmail.com on 5 Nov 2013 at 6:22

GoogleCodeExporter commented 9 years ago
Fixed in 
https://github.com/bigbluebutton/bigbluebutton/commit/a58120f3227e1f00bccbb45a24
86cdea8280bb2c

Original comment by ritza...@gmail.com on 5 Nov 2013 at 6:28

GoogleCodeExporter commented 9 years ago

Original comment by ffdixon@gmail.com on 5 Nov 2013 at 10:20