Open GoogleCodeExporter opened 8 years ago
This seems to be handled in
http://code.google.com/p/android-vnc-viewer/source/browse/trunk/eclipse_projects
/androidVNC/src/android/androidVNC/VncCanvasActivity.java
in the OnCreate method
Original comment by nito.mar...@gmail.com
on 23 Mar 2012 at 5:13
I think the problem is in that file on line 558
http://code.google.com/p/android-vnc-viewer/source/browse/trunk/eclipse_projects
/androidVNC/src/android/androidVNC/VncCanvasActivity.java#558
it appears that for make an update instead of an insert, it compares the host
requested with a constant which is : "android.androidVNC.CONNECTION"
of course that never will be true. However, in the code apparently tries to
update the most recent connection record instead the record with the same host
and port.
if (host.equals(VncConstants.CONNECTION))
{
if (connection.Gen_read(database.getReadableDatabase(), port))
{
MostRecentBean bean = androidVNC.getMostRecent(database.getReadableDatabase());
if (bean != null)
{
bean.setConnectionId(connection.get_Id());
bean.Gen_update(database.getWritableDatabase());
}
}
}
else
{
connection.setAddress(host);
connection.setNickname(connection.getAddress());
connection.setPort(port);
List<String> path = data.getPathSegments();
if (path.size() >= 1) {
connection.setColorModel(path.get(0));
}
if (path.size() >= 2) {
connection.setPassword(path.get(1));
}
connection.save(database.getWritableDatabase());
}
Original comment by victor.h...@gmail.com
on 10 Jul 2012 at 8:46
Original issue reported on code.google.com by
nito.mar...@gmail.com
on 23 Mar 2012 at 5:09