obexd: Dealing with folder listings

When the object size is unknown ends the transfer as soon as the first
packet arrives.
This commit is contained in:
Vinicius Costa Gomes 2008-11-10 15:30:27 -03:00 committed by Marcel Holtmann
parent 91b2a8d879
commit 9929152403
2 changed files with 5 additions and 2 deletions

View File

@ -1000,6 +1000,9 @@ static void get_xfer_progress(GwObexXfer *xfer, gpointer user_data)
session->filled = 0;
}
if (session->size == -1)
goto complete;
if (session->transferred == session->size)
goto complete;

View File

@ -46,8 +46,8 @@ struct session_data {
GwObexXfer *xfer;
char buffer[4096];
int filled;
uint64_t size;
uint64_t transferred;
ssize_t size;
size_t transferred;
gchar *filename;
gchar *agent_name;
gchar *agent_path;