Merge lp:~abogani/ubuntu/lucid/rxtx/rxtx-fix-361635 into lp:ubuntu/lucid/rxtx

Proposed by Alessio Igor Bogani
Status: Merged
Merge reported by: James Westby
Merged at revision: not available
Proposed branch: lp:~abogani/ubuntu/lucid/rxtx/rxtx-fix-361635
Merge into: lp:ubuntu/lucid/rxtx
Diff against target: 114 lines (+30/-8)
4 files modified
debian/changelog (+12/-0)
debian/control (+2/-1)
src/SerialImp.c (+14/-6)
src/SerialImp.h (+2/-1)
To merge this branch: bzr merge lp:~abogani/ubuntu/lucid/rxtx/rxtx-fix-361635
Reviewer Review Type Date Requested Status
Andrew Starr-Bochicchio Approve
Luke Yelavich Pending
Emmet Hikory Pending
Daniel Holbach Pending
Review via email: mp+15906@code.launchpad.net

This proposal supersedes a proposal from 2009-11-27.

To post a comment you must log in.
Revision history for this message
Alessio Igor Bogani (abogani) wrote : Posted in a previous version of this proposal

Backport from development tree of fix for 64 bit systems

Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

 - Can you please add some documentation in debian/changelog about where exactly the patch is from and which files you changed?
 - Can you run update-maintainer (from ubuntu-dev-tools) to adhere to https://wiki.ubuntu.com/DebianMaintainerField

review: Needs Fixing
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Marking "merged." This has already been uploaded to the archive, and the package importer has added it to lp:ubuntu/rxtx

See this revision:

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/lucid/rxtx/lucid/revision/5

Thanks!

review: Approve
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Hmmm... Not sure how to actually close this out. I can "claim the review" for Ubuntu Sponsors for universe and mark it approved, but I can't seem to change the status from "Needs review" to "Merged."

Revision history for this message
James Westby (james-w) wrote :

On Fri, 29 Jan 2010 01:19:33 -0000, Andrew Starr-Bochicchio <email address hidden> wrote:
> Hmmm... Not sure how to actually close this out. I can "claim the review" for Ubuntu Sponsors for universe and mark it approved, but I can't seem to change the status from "Needs review" to "Merged."

That would seem to be a bug in Launchpad, I'll investigate.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Ah, it's bug 504025.

Thanks,

James

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2008-07-21 18:20:31 +0000
3+++ debian/changelog 2009-12-09 23:12:14 +0000
4@@ -1,3 +1,15 @@
5+rxtx (2.1.7r2-4ubuntu1) lucid; urgency=low
6+
7+ * Backport of fix for 64 bit systems
8+ Source code changes have been backported from development
9+ snapshot tarball (rxtx-2.2pre2.zip) downloaded from
10+ http://rxtx.qbang.org/wiki/index.php/Download
11+ These changes are related to int/long handling into src/SerialImp.c
12+ and src/SerialImp.h
13+ - LP: #361635
14+
15+ -- Alessio Igor Bogani <abogani@ubuntu.com> Tue, 09 Dec 2009 20:46:12 +0100
16+
17 rxtx (2.1.7r2-4) unstable; urgency=low
18
19 * Changed Java build dependency to default-jdk-builddep.
20
21=== modified file 'debian/control'
22--- debian/control 2008-07-21 18:20:31 +0000
23+++ debian/control 2009-12-09 23:12:14 +0000
24@@ -1,7 +1,8 @@
25 Source: rxtx
26 Section: libs
27 Priority: optional
28-Maintainer: Mario Joussen <joussen@debian.org>
29+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
30+XSBC-Original-Maintainer: Mario Joussen <joussen@debian.org>
31 Build-Depends: debhelper (>> 5.0.0), libtool, default-jdk-builddep
32 Standards-Version: 3.8.0
33 Homepage: http://www.rxtx.org
34
35=== modified file 'src/SerialImp.c'
36--- src/SerialImp.c 2007-07-28 16:13:55 +0000
37+++ src/SerialImp.c 2009-12-09 23:12:14 +0000
38@@ -1339,7 +1339,7 @@
39 report("init_threads: get eis\n");
40 jeis = (*eis->env)->GetFieldID( eis->env, eis->jclazz, "eis", "J" );
41 report("init_threads: set eis\n");
42- (*eis->env)->SetIntField(eis->env, *eis->jobj, jeis, ( size_t ) eis );
43+ (*eis->env)->SetLongField(eis->env, *eis->jobj, jeis, ( size_t ) eis );
44 report("init_threads: stop\n");
45 report_time_end( );
46 return( 1 );
47@@ -1532,7 +1532,7 @@
48 jobject jobj, jboolean interrupted )
49 {
50 int fd = get_java_var( env, jobj,"fd","I" );
51- struct event_info_struct *eis = ( struct event_info_struct * ) get_java_var( env, jobj, "eis", "J" );
52+ struct event_info_struct *eis = ( struct event_info_struct * ) get_java_var_long( env, jobj, "eis", "J" );
53 int result, count=0;
54
55 char message[80];
56@@ -2941,7 +2941,7 @@
57 /* TRENT */
58 int flag, count = 0;
59 struct event_info_struct *eis = ( struct event_info_struct * )
60- get_java_var( env, *jobj,"eis","J" );
61+ get_java_var_long( env, *jobj,"eis","J" );
62
63 report_time_start();
64 flag = eis->eventflags[SPE_DATA_AVAILABLE];
65@@ -4875,9 +4875,9 @@
66 exceptions: none
67 comments:
68 ----------------------------------------------------------*/
69-size_t get_java_var( JNIEnv *env, jobject jobj, char *id, char *type )
70+long get_java_var_long( JNIEnv *env, jobject jobj, char *id, char *type )
71 {
72- int result = 0;
73+ long result = 0;
74 jclass jclazz = (*env)->GetObjectClass( env, jobj );
75 jfieldID jfd = (*env)->GetFieldID( env, jclazz, id, type );
76
77@@ -4891,7 +4891,11 @@
78 LEAVE( "get_java_var" );
79 return result;
80 }
81- result = (int)( (*env)->GetIntField( env, jobj, jfd ) );
82+ if ( !strcmp( type, "J" ) ) {
83+ result = (long)( (*env)->GetLongField( env, jobj, jfd ) );
84+ } else {
85+ result = (int) ( (*env)->GetIntField( env, jobj, jfd ) );
86+ }
87 /* ct7 & gel * Added DeleteLocalRef */
88 (*env)->DeleteLocalRef( env, jclazz );
89 if(!strncmp( "fd",id,2) && result == 0)
90@@ -4902,6 +4906,10 @@
91 return result;
92 }
93
94+int get_java_var( JNIEnv *env, jobject jobj, char *id, char *type ) {
95+ return (int) get_java_var_long( env, jobj, id, type );
96+}
97+
98 /*----------------------------------------------------------
99 throw_java_exception
100
101
102=== modified file 'src/SerialImp.h'
103--- src/SerialImp.h 2006-03-01 18:56:52 +0000
104+++ src/SerialImp.h 2009-12-09 23:12:14 +0000
105@@ -413,7 +413,8 @@
106 void system_wait();
107 void finalize_event_info_struct( struct event_info_struct * );
108 int read_byte_array( JNIEnv *, jobject *, int, unsigned char *, int, int );
109-size_t get_java_var( JNIEnv *, jobject, char *, char * );
110+int get_java_var( JNIEnv *, jobject, char *, char * );
111+long get_java_var_long( JNIEnv *, jobject, char *, char * );
112 jboolean is_interrupted( struct event_info_struct * );
113 int send_event(struct event_info_struct *, jint, int );
114 void dump_termios(char *,struct termios *);

Subscribers

People subscribed via source and target branches