From 69742ac258606e37e170976f11b02ccf5cee8785 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 1 Mar 2013 08:50:10 +0100 Subject: [PATCH 1/3] BUGFIX: If we try to open a non-present device (ie the /dev/ttyXXX doesn't exist), the lock is not cleaned so it prevent any further opening. --- src/SerialImp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SerialImp.c b/src/SerialImp.c index 617eaac..57a48a2 100644 --- a/src/SerialImp.c +++ b/src/SerialImp.c @@ -718,7 +718,10 @@ JNIEXPORT jint JNICALL RXTXPort(open)( } #endif /* OPEN_EXCL */ - if( configure_port( fd ) ) goto fail; + if( configure_port( fd ) ) { + UNLOCK( filename, pid ); // If the device is not present (ie /dev/ttyXXX is not there), the lock file MUST be cleaned tobe able to reconnect witout manually removing /var/lock/LCK...XXXX + goto fail; + } (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); From 0df7a4739655998ce3cb3335e7f301849ace9c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Sall=C3=A9?= Date: Fri, 26 Apr 2013 09:58:16 +0200 Subject: [PATCH 2/3] . --- .classpath | 10 ++++++++ .externalToolBuilders/Create RXTX Jar.launch | 12 +++++++++ .project | 27 ++++++++++++++++++++ build.xml | 7 +++++ 4 files changed, 56 insertions(+) create mode 100644 .classpath create mode 100644 .externalToolBuilders/Create RXTX Jar.launch create mode 100644 .project create mode 100644 build.xml diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..d136716 --- /dev/null +++ b/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.externalToolBuilders/Create RXTX Jar.launch b/.externalToolBuilders/Create RXTX Jar.launch new file mode 100644 index 0000000..bf714e3 --- /dev/null +++ b/.externalToolBuilders/Create RXTX Jar.launch @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..dc68a07 --- /dev/null +++ b/.project @@ -0,0 +1,27 @@ + + + RXTX + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.ui.externaltools.ExternalToolBuilder + full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/Create RXTX Jar.launch + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..160d789 --- /dev/null +++ b/build.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From bbbc7d62b8ecdb3c4f3c4adbf2e1611e6986434a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Sall=C3=A9?= Date: Mon, 29 Apr 2013 11:41:43 +0200 Subject: [PATCH 3/3] . --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3402cf3..72617d2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ libtool stamp-h1 gnu x86_64-unknown-linux-gnu -RXTXcomm.jar \ No newline at end of file +RXTXcomm.jar +/bin/ +/i686-pc-linux-gnu/