diff --git a/src/main/c/Android/jni/SerialPort_Android.c b/src/main/c/Android/jni/SerialPort_Android.c index eef803e..753d6e3 100644 --- a/src/main/c/Android/jni/SerialPort_Android.c +++ b/src/main/c/Android/jni/SerialPort_Android.c @@ -2,7 +2,7 @@ * SerialPort_Android.c * * Created on: Mar 13, 2015 - * Last Updated on: Oct 15, 2019 + * Last Updated on: Oct 29, 2019 * Author: Will Hedgecock * * Copyright (C) 2012-2019 Fazecast, Inc. @@ -612,7 +612,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_presetRTS(JN const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the RTS mode of the serial port - char commandString[64]; + char commandString[128]; sprintf(commandString, "stty -F %s hupcl >>/dev/null 2>&1", portName); int result = system(commandString); @@ -626,7 +626,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_preclearRTS( const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the RTS mode of the serial port - char commandString[64]; + char commandString[128]; sprintf(commandString, "stty -F %s -hupcl >>/dev/null 2>&1", portName); int result = system(commandString); @@ -656,7 +656,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_presetDTR(JN const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the DTR mode of the serial port - char commandString[64]; + char commandString[128]; sprintf(commandString, "stty -F %s hupcl >>/dev/null 2>&1", portName); int result = system(commandString); @@ -670,7 +670,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_preclearDTR( const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the DTR mode of the serial port - char commandString[64]; + char commandString[128]; sprintf(commandString, "stty -F %s -hupcl >>/dev/null 2>&1", portName); int result = system(commandString); diff --git a/src/main/c/Posix/SerialPort_Posix.c b/src/main/c/Posix/SerialPort_Posix.c index 18df503..bce9719 100644 --- a/src/main/c/Posix/SerialPort_Posix.c +++ b/src/main/c/Posix/SerialPort_Posix.c @@ -2,7 +2,7 @@ * SerialPort_Posix.c * * Created on: Feb 25, 2012 - * Last Updated on: Oct 15, 2019 + * Last Updated on: Oct 29, 2019 * Author: Will Hedgecock * * Copyright (C) 2012-2019 Fazecast, Inc. @@ -722,7 +722,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_presetRTS(JN const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the RTS mode of the serial port - char commandString[64]; + char commandString[128]; #if defined(__linux__) sprintf(commandString, "stty -F %s hupcl >>/dev/null 2>&1", portName); #else @@ -740,7 +740,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_preclearRTS( const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the RTS mode of the serial port - char commandString[64]; + char commandString[128]; #if defined(__linux__) sprintf(commandString, "stty -F %s -hupcl >>/dev/null 2>&1", portName); #else @@ -774,7 +774,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_presetDTR(JN const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the DTR mode of the serial port - char commandString[64]; + char commandString[128]; #if defined(__linux__) sprintf(commandString, "stty -F %s hupcl >>/dev/null 2>&1", portName); #else @@ -792,7 +792,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_preclearDTR( const char *portName = (*env)->GetStringUTFChars(env, portNameJString, NULL); // Send a system command to preset the DTR mode of the serial port - char commandString[64]; + char commandString[128]; #if defined(__linux__) sprintf(commandString, "stty -F %s -hupcl >>/dev/null 2>&1", portName); #else diff --git a/src/main/c/Windows/SerialPort_Windows.c b/src/main/c/Windows/SerialPort_Windows.c index fbb8862..c5e061a 100644 --- a/src/main/c/Windows/SerialPort_Windows.c +++ b/src/main/c/Windows/SerialPort_Windows.c @@ -2,7 +2,7 @@ * SerialPort_Windows.c * * Created on: Feb 25, 2012 - * Last Updated on: Oct 15, 2019 + * Last Updated on: Oct 29, 2019 * Author: Will Hedgecock * * Copyright (C) 2012-2019 Fazecast, Inc. @@ -803,7 +803,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_presetRTS(JN int result = -1; if (comPort != NULL) { - char commandString[32]; + char commandString[64]; sprintf(commandString, "cmd.exe /C \"MODE %s rts=on > nul 2>&1\"", comPort + 1); result = system(commandString); } @@ -822,7 +822,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_preclearRTS( int result = -1; if (comPort != NULL) { - char commandString[32]; + char commandString[64]; sprintf(commandString, "cmd.exe /C \"MODE %s rts=off > nul 2>&1\"", comPort + 1); result = system(commandString); } @@ -857,7 +857,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_presetDTR(JN int result = -1; if (comPort != NULL) { - char commandString[32]; + char commandString[64]; sprintf(commandString, "cmd.exe /C \"MODE %s dtr=on > nul 2>&1\"", comPort + 1); result = system(commandString); } @@ -876,7 +876,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_preclearDTR( int result = -1; if (comPort != NULL) { - char commandString[32]; + char commandString[64]; sprintf(commandString, "cmd.exe /C \"MODE %s dtr=off > nul 2>&1\"", comPort + 1); result = system(commandString); } diff --git a/src/main/resources/Windows/x86/jSerialComm.dll b/src/main/resources/Windows/x86/jSerialComm.dll index 3c80948..7c3af35 100644 Binary files a/src/main/resources/Windows/x86/jSerialComm.dll and b/src/main/resources/Windows/x86/jSerialComm.dll differ diff --git a/src/main/resources/Windows/x86_64/jSerialComm.dll b/src/main/resources/Windows/x86_64/jSerialComm.dll index 2f6aa9e..d559b96 100644 Binary files a/src/main/resources/Windows/x86_64/jSerialComm.dll and b/src/main/resources/Windows/x86_64/jSerialComm.dll differ