Boris Grozev
568ace382b
Fixes a failure to close a Socket instance.
...
Makes sure that Socket instances which are discarded because
they are only added after the corresponding ICE Agent has
moved away from the WAITING or RUNNING state are closed. This
prevents a file descriptor leak, since Socket instances which are
not closed (even after they are garbage collected) leave behind
sockets in state CLOSE_WAIT.
2016-05-20 11:38:22 -05:00
Boris Grozev
e4f5534b3d
Minor fixes to the documentation.
2016-05-20 11:35:00 -05:00
champtar
7312077fd9
Ensure tieBreaker is positive ( #71 )
...
Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE
http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-05-09 15:12:19 +02:00
champtar
164ca04236
Drop MessageQueue, use a LinkedBlockingQueue instead ( #63 )
...
LinkedBlockingQueue are available since java 5
This is a bit more efficient as we were calling notifyAll()
instead of notify() in add(), thus waking up too much
This also remove 'logger.finest("Adding raw message to queue.");'
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-05-06 20:03:52 +02:00
champtar
a363a973eb
Use an ArrayList instead of reimplementing it ( #62 )
...
This should not change performance but is way more readable
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-05-06 19:54:50 +02:00
Ingo Bauersachs
a51af3f90f
Merge pull request #68 from champtar/ChannelData_padding
...
ChannelData: fix padding
2016-05-06 19:42:04 +02:00
Etienne CHAMPETIER
b76f9abfc9
ChannelData: fix decode()
...
I haven't found any user of this method.
This method was only working if offset == 0
and binMessage isn't a padded message.
arrayLen is useless as we have msgLen, so remove it,
and introduce a deprecated decode() to keep same api
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-05-03 11:25:03 +02:00
Etienne CHAMPETIER
84bd07c665
Use new ChannelData.encode(pad)
...
Padding is mandatory for TCP and TLS
See https://tools.ietf.org/html/rfc5766#section-11.5
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-05-03 11:25:03 +02:00
Etienne CHAMPETIER
d33d8b87e4
ChannelData: rework padding
...
getDataLength() was returning data length without
padding, so keep current behavior and update the javadoc.
(spotted with findbugs because length in
getDataLength was a dead store)
Introduce padTo4() to round up a number to the next
multiple of 4.
Deprecate encode() and introduce encode(boolean pad)
so we can let the caller decide if he wants padding
(mandatory when using tcp or tls)
See https://tools.ietf.org/html/rfc5766#section-11.5
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-05-03 11:25:03 +02:00
Emil Ivov
b877467bc4
Merge pull request #58 from jitsi/remove-ant
...
Remove obsolete Ant-build and the embedded libraries
2016-05-02 17:44:41 -05:00
bgrozev
249ebb913a
Merge pull request #65 from jitsi/fix-javadoc
...
Fix Javadoc formatting and missing parameters
2016-04-25 13:26:57 -05:00
Ingo Bauersachs
de1260610d
Merge pull request #69 from champtar/nullequals
...
Remove unneeded null checks & fix MagicCookieAttribute equals
2016-04-20 22:15:05 +02:00
champtar
caa313739a
Remove uneeded boxing/unboxing ( #70 )
...
http://findbugs.sourceforge.net/bugDescriptions.html#DM_BOXED_PRIMITIVE_FOR_PARSING
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-04-20 22:12:53 +02:00
champtar
08f6ee8c64
org.ice4j.attribute: fix bytes conversion bugs ( #67 )
...
http://findbugs.sourceforge.net/bugDescriptions.html#BIT_IOR_OF_SIGNED_BYTE
http://findbugs.sourceforge.net/bugDescriptions.html#BIT_ADD_OF_SIGNED_BYTE
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-04-20 22:02:15 +02:00
champtar
ce4126701e
NetworkUtils: fix IndexOutOfBoundsException ( #66 )
...
http://findbugs.sourceforge.net/bugDescriptions.html#RANGE_ARRAY_LENGTH
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-04-20 21:54:04 +02:00
Etienne CHAMPETIER
9155707329
Remove unneeded null checks in equals
...
instanceof already check for null
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-04-19 10:41:20 +02:00
Etienne CHAMPETIER
af8c32ecd7
Fix MagicCookieAttribute equals
...
this looks like a copy/paste error
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2016-04-19 10:41:18 +02:00
Ingo Bauersachs
71b2874d46
Remove obsolete Ant-build and the embedded libraries
2016-04-18 22:14:02 +02:00
Ingo Bauersachs
02e1217144
Fix Javadoc formatting and missing parameters
...
This now satisfies Java 8's Javadoc compiler with it's default options.
2016-04-16 00:11:00 +02:00
Ingo Bauersachs
9cbedb3a95
Use only OSS components for jain-sdp
...
The embedded jain-sdp library includes some interface-files that are
covered by a non-free license. Remove them and use a free version instead
that is published on Maven Central.
2016-04-02 15:01:37 +02:00
Lyubomir Marinov
945c0ccd65
Implements Agent#isOver() in IceProcessingState (like isEstablished()).
2016-03-25 20:35:20 -05:00
Lyubomir Marinov
eb0e3d3fb8
Implements (poor) hashCode() for CandidatePair and Candidate so they may at least be added to HashMap.
2016-03-25 20:35:20 -05:00
Lyubomir Marinov
8230c3d69f
Reduces assignments and adds final in search of constants suitable for a hashCode implementation.
2016-03-25 20:35:20 -05:00
Lyubomir Marinov
edd325a973
Manually formats (while reading the source code in the context of early DTLS support) for consistency.
2016-03-25 20:35:20 -05:00
Lyubomir Marinov
ed15e98916
Introduces a CandidatePair factory method in Agent (to facilitate the tracking of the former's initialization).
2016-03-25 20:35:20 -05:00
Lyubomir Marinov
ecc9e59564
Fixes (simple) warnings issued by IntelliJ IDEA's 'Analyze > Inspect Code...' feature.
2016-03-25 20:35:20 -05:00
Boris Grozev
ed6f261f6f
Increases the size of the SinglePort sockets' queue to 128.
2016-03-25 11:50:17 -05:00
Boris Grozev
063767227e
Adds a missing header.
2016-03-23 16:18:39 -05:00
Boris Grozev
98dedf374c
Removes the cache as it is not in a working state.
2016-03-23 16:18:34 -05:00
Boris Grozev
e793404f7c
Enables statistics for the packet queue in SinglePortUdpHarvester's candidates' sockets.
2016-03-23 12:53:25 -05:00
Boris Grozev
0eb62c3931
Adds some utilities and the PacketQueue abstract class.
2016-03-23 12:53:20 -05:00
Lyubomir Marinov
779086c9df
More quickly deliver (control over) accepted sockets in simple cases.
2016-03-08 14:15:49 -06:00
Lyubomir Marinov
7e4f410287
Quickly closes client sockets which do not communicate in the format expected by the server.
2016-03-08 11:21:05 -06:00
Lyubomir Marinov
be1b937ba1
More aggressively weeds out abandoned sockets (in MuxServerSocketChannel scenarios).
2016-03-08 11:21:05 -06:00
Lyubomir Marinov
20f39c0037
De-duplicates a couple of methods (which I suspect are buggy and I expect it to be easier to fix the bugs if there is no duplication).
2016-03-08 11:21:05 -06:00
Lyubomir Marinov
91c7888085
Fixes warnings.
2016-03-08 11:20:58 -06:00
Lyubomir Marinov
902321c4e1
Splits a file into multiple files (for the purposes of readability).
2016-03-04 20:09:20 -06:00
damencho
8b70299567
Changes the behaviour of the harvester to work with tcp checks and at the same time with ssltcp checks which are sending pseudo SSL ClientHello. Checks for hello and if its missing continue processing as it is a tcp probe.
2015-12-02 17:29:48 -06:00
Ingo Bauersachs
88135aad3f
Merge pull request #34 from dpocock/dpocock-use-candidate-issue
...
Remove some hacks that call setUseCandidateReceived
2015-11-20 17:28:36 +01:00
Boris Grozev
c5866ca317
Decreases the log level of messages for unexpected packets, checks
...
expected STUN packets more thoroughly.
2015-11-17 21:21:56 -06:00
Ingo Bauersachs
5f0bf2090b
Merge pull request #44 from mondain/master
...
Added setting of packet port to 0 to prevent out-of-range error.
2015-11-12 13:53:34 +01:00
damencho
399ebcdf3b
Fixes SinglePort, broken after removing unused public address field.
2015-11-10 10:45:19 -06:00
Boris Grozev
bd55b3645b
Simplify.
2015-11-08 10:09:56 -06:00
Boris Grozev
7a8b7ec2c3
Returns immediately if checks have already been done.
2015-11-08 10:05:18 -06:00
Boris Grozev
3a49e56475
Simplify code.
2015-11-07 12:12:11 -06:00
Boris Grozev
b228636412
Make the obtain*Addresses methods static again, because they modify
...
static fields and should obtain the lock on the class.
2015-11-07 12:08:51 -06:00
damencho
947f06ae22
Fixes some warnings.
2015-11-06 15:45:15 -06:00
damencho
6296d8dd4a
Adds stun mapping candidate harvester, that can be used to discover public address using a pre-configured stun server.
2015-11-06 15:28:31 -06:00
damencho
23fb8e1776
Removes commented code that was left behind in previous commits.
2015-11-06 14:21:55 -06:00
Paul Gregoire
39466ac70c
Added warning log entry for out of range port on packet
2015-11-06 08:43:58 -05:00