Compare commits

..

11 Commits

Author SHA1 Message Date
Denny
0e321bdaa3 Updates build to 0.3.2 (final) 2017-12-02 03:25:41 -05:00
Denny Sheirer
f191d28c98 Merge pull request #295 from DSheirer/241-lj1200-error-check-to-0-3-2-branch
241 LJ1200 Error Correction (v0.3.2 branch)
2017-12-02 03:19:12 -05:00
Denny
afc3d299b6 #241 Resolves issue with error correction routine introducing invalid messages
(cherry picked from commit 910a08f)
2017-12-02 03:18:12 -05:00
Denny
0471d90b54 Updates build to 0.3.2 Beta #3 2017-11-23 07:32:24 -05:00
Denny
8f68967b6c #289 resolves issue with encrypting username and password with XTEA
algorithm using credential values longer than 8 characters/bytes.

(cherry picked from commit 1ddc0a3)
2017-11-23 07:31:52 -05:00
Denny
91b950c13d Updates build version to 0.3.2-beta2 2017-11-04 09:42:27 -04:00
Denny
581ff9f449 Updates CHANGELOG
(cherry picked from commit 64688a3)
2017-11-04 09:41:36 -04:00
Denny
67c3cb9639 Issue #283
Updates Icecast TCP broadcaster to correctly handle content type:text/html
message that normally follows mount point in use error received from
broadcastify.

Changes mount point in use broadcast state to be a temporary error so that
the stream will attempt to reconnect after receiving this error.

Updates logging to include memory allocation/usage metrics with each
logging entry in order to support debugging issues related to high
memory usage situations.  Updates initial application logging to better
identify the host system operating environment.

(cherry picked from commit 8be3399)
2017-11-04 09:41:23 -04:00
Denny
cebd2da89f Updates build to v0.3.2-beta1 2017-10-21 09:47:58 -04:00
Denny Sheirer
73b6ef164f Merge pull request #280 from DSheirer/276-tuner-controller-issue-cherry-pick
Resolves #276 Traffic Channel threads locking in overflow state.  Issue
2017-10-21 09:46:30 -04:00
Denny
b2c7ac8c66 Resolves #276 Traffic Channel threads locking in overflow state. Issue
occured when the ChannelProcessionManager was allocating a new channel
causing the tuner to invoke the updateLOFrequency() method that was
trying to find a center tune frequency that would accommodate all of the
channels, specifically in the instance where the distance between the
highest channel and the middle channel was exactly one-half of the
tuner's bandwidth.  This situation would cause the calculated adjustment
to be zero and would cause an infinite loop, locking all channels from
accessing the any channel startup/teardown events and causing running
channels to block with buffer overflows. Added 1 to the adjustment to
ensure that the initial adjustment placed the center overlapping channel
fully to the left of the center DC spike so that on the next iteration
that channel would no longer be overlapping.

(cherry picked from commit f3d3a81)
2017-10-21 09:45:51 -04:00
3 changed files with 39 additions and 40 deletions

View File

@@ -6,8 +6,8 @@
<!-- version properties -->
<property name="major" value="0"/>
<property name="minor" value="3"/>
<property name="patch" value="1"/>
<property name="release" value=""/> <!-- Use dash (-) prefix (e.g. -beta1) -->
<property name="patch" value="2"/>
<property name="release" value=""/>
<property name="filename" value="sdrtrunk_${major}.${minor}.${patch}${release}"/>
<!-- Build properties -->
@@ -34,7 +34,7 @@
<mkdir dir="${output.classes}"/>
<!-- Create version file -->
<echo message="${major}.${minor}.${patch}${release}" file="${output.classes}/sdrtrunk-version"/>
<echo message="${major}.${minor}.${patch}-${release}" file="${output.classes}/sdrtrunk-version"/>
</target>
<target name="compile" depends="clean,init,compile-java-8,compile-java-9"

View File

@@ -71,6 +71,40 @@ public class AuthenticateBroadcast extends UltravoxMessage
setPayload(sb.toString());
}
/**
* Encrypts the value using the XTEA block cipher algorithm. The byte array is sliced into 8-byte chunks and each
* chunk is encrypted into a 16 hexadecimal character string. All encrypted chunks are concatenated and returned
* as a single string. If the value byte array is not an even multiple of 8 characters, it will be padded with
* zero valued bytes to make it an even multiple of eight.
*
* @param xtea instance of the XTEA algorithm with a loaded encryption key
* @param value to encode
* @return value encrypted into one or more multiples of 16 hexadecimal characters
*/
private static String encrypt(XTEA xtea, byte[] value)
{
if(value.length % 8 != 0 || value.length == 0)
{
int newLength = ((value.length / 8) + 1) * 8;
value = Arrays.copyOf(value, newLength);
}
StringBuilder sb = new StringBuilder();
for(int x = 0; x < value.length; x += 8)
{
byte[] plaintext = Arrays.copyOfRange(value, x, x + 8);
byte[] encrypted = xtea.encrypt(plaintext);
for(byte b: encrypted)
{
sb.append(String.format("%02x", b));
}
}
return sb.toString();
}
/**
* Encrypts the value using the XTEA block cipher algorithm and returns the encrypted value as a 16 hex value
*
@@ -80,23 +114,6 @@ public class AuthenticateBroadcast extends UltravoxMessage
*/
private static String encrypt(XTEA xtea, String value)
{
byte[] valueBytes = value.getBytes();
if(valueBytes.length % 8 != 0 || valueBytes.length == 0)
{
int newLength = ((valueBytes.length / 8) + 1) * 8;
valueBytes = Arrays.copyOf(valueBytes, newLength);
}
byte[] encrypted = xtea.encrypt(valueBytes);
StringBuilder sb = new StringBuilder();
for(byte b: encrypted)
{
sb.append(String.format("%02x", b));
}
return sb.toString();
return encrypt(xtea, value.getBytes());
}
}

View File

@@ -163,7 +163,7 @@ public class CRCLJ
}
/**
* Identifies 1 or 2 bit error positions that match the checksum error value.
* Identifies 1 bit error positions that match the checksum error value.
*/
public static int[] findBitErrors( int checksumError )
{
@@ -180,24 +180,6 @@ public class CRCLJ
}
}
/* Two bit errors */
for( int x = 0; x < 48; x++ )
{
for( int y = 0; y < 48; y++ )
{
if( x != y &&
( CHECKSUMS[ x ] ^ CHECKSUMS[ y ] ) == checksumError )
{
int[] errors = new int[ 2 ];
errors[ 0 ] = x;
errors[ 1 ] = y;
return errors;
}
}
}
return null;
}