Skip to content

Commit

Permalink
use long timeout for DeleteObject
Browse files Browse the repository at this point in the history
  • Loading branch information
whoozle committed Feb 25, 2017
1 parent 3eb5268 commit 6a5de27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mtp/ptp/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ namespace mtp
return Get(transaction.Id, timeout);
}

void Session::DeleteObject(ObjectId objectId)
void Session::DeleteObject(ObjectId objectId, int timeout)
{
scoped_mutex_lock l(_mutex);
Transaction transaction(this);
Send(OperationRequest(OperationCode::DeleteObject, transaction.Id, objectId.Id, 0));
Send(OperationRequest(OperationCode::DeleteObject, transaction.Id, objectId.Id, 0), timeout);
Get(transaction.Id);
}

Expand Down
2 changes: 1 addition & 1 deletion mtp/ptp/Session.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace mtp
ByteArray GetPartialObject(ObjectId objectId, u64 offset, u32 size);
NewObjectInfo SendObjectInfo(const msg::ObjectInfo &objectInfo, StorageId storageId = AnyStorage, ObjectId parentObject = Device);
void SendObject(const IObjectInputStreamPtr &inputStream, int timeout = LongTimeout);
void DeleteObject(ObjectId objectId);
void DeleteObject(ObjectId objectId, int timeout = LongTimeout);

bool EditObjectSupported() const
{ return _editObjectSupported; }
Expand Down

0 comments on commit 6a5de27

Please sign in to comment.