Skip to content
Snippets Groups Projects
Unverified Commit 02321779 authored by Jayaram Sreevalsan's avatar Jayaram Sreevalsan Committed by GitHub
Browse files

Merge pull request #2856 from sleuthkit/ct-3.8.0

Sync Changes from CT 3.8.0 to develop
parents bb056c41 2327c7c2
No related branches found
No related tags found
No related merge requests found
...@@ -295,7 +295,7 @@ public List<DataSource> getDataSourcesForHost(Host host) throws TskCoreException ...@@ -295,7 +295,7 @@ public List<DataSource> getDataSourcesForHost(Host host) throws TskCoreException
return dataSources; return dataSources;
} catch (SQLException | TskDataException ex) { } catch (SQLException | TskDataException ex) {
throw new TskCoreException(String.format("Error getting data sources for host " + host.getName()), ex); throw new TskCoreException(String.format("Error getting data sources for host %s", host.getName()), ex);
} finally { } finally {
db.releaseSingleUserCaseReadLock(); db.releaseSingleUserCaseReadLock();
} }
......
...@@ -117,7 +117,7 @@ public class SlackFile extends FsContent { ...@@ -117,7 +117,7 @@ public class SlackFile extends FsContent {
*/ */
@Override @Override
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
protected int readInt(byte[] buf, long offset, long len) throws TskCoreException { protected synchronized int readInt(byte[] buf, long offset, long len) throws TskCoreException {
if (offset == 0 && size == 0) { if (offset == 0 && size == 0) {
//special case for 0-size file //special case for 0-size file
return 0; return 0;
......
...@@ -10090,16 +10090,16 @@ public void setImagePaths(long obj_id, List<String> paths) throws TskCoreExcepti ...@@ -10090,16 +10090,16 @@ public void setImagePaths(long obj_id, List<String> paths) throws TskCoreExcepti
* within tsk core and the update fails * within tsk core and the update fails
*/ */
@Beta @Beta
public void setImagePaths(long obj_id, List<String> paths, CaseDbTransaction trans) throws TskCoreException { public void setImagePaths(long objId, List<String> paths, CaseDbTransaction trans) throws TskCoreException {
try { try {
PreparedStatement statement = trans.getConnection().getPreparedStatement(PREPARED_STATEMENT.DELETE_IMAGE_NAME); PreparedStatement statement = trans.getConnection().getPreparedStatement(PREPARED_STATEMENT.DELETE_IMAGE_NAME);
statement.clearParameters(); statement.clearParameters();
statement.setLong(1, obj_id); statement.setLong(1, objId);
trans.getConnection().executeUpdate(statement); trans.getConnection().executeUpdate(statement);
for (int i = 0; i < paths.size(); i++) { for (int i = 0; i < paths.size(); i++) {
statement = trans.getConnection().getPreparedStatement(PREPARED_STATEMENT.INSERT_IMAGE_NAME); statement = trans.getConnection().getPreparedStatement(PREPARED_STATEMENT.INSERT_IMAGE_NAME);
statement.clearParameters(); statement.clearParameters();
statement.setLong(1, obj_id); statement.setLong(1, objId);
statement.setString(2, paths.get(i)); statement.setString(2, paths.get(i));
statement.setLong(3, i); statement.setLong(3, i);
trans.getConnection().executeUpdate(statement); trans.getConnection().executeUpdate(statement);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment