|
@@ -340,15 +340,12 @@ static void ftp_data_newdata ( struct tcp_application *app,
|
340
|
340
|
|
341
|
341
|
/* Fill data buffer */
|
342
|
342
|
if ( ( rc = fill_buffer ( ftp->buffer, data,
|
343
|
|
- ftp->data_rcvd, len ) ) != 0 ){
|
|
343
|
+ ftp->buffer->fill, len ) ) != 0 ){
|
344
|
344
|
DBGC ( ftp, "FTP %p failed to fill data buffer: %s\n",
|
345
|
345
|
ftp, strerror ( rc ) );
|
346
|
346
|
ftp_done ( ftp, rc );
|
347
|
347
|
return;
|
348
|
348
|
}
|
349
|
|
-
|
350
|
|
- /* Update received data total */
|
351
|
|
- ftp->data_rcvd += len;
|
352
|
349
|
}
|
353
|
350
|
|
354
|
351
|
/** FTP data channel operations */
|
|
@@ -377,7 +374,6 @@ struct async_operation * ftp_get ( struct ftp_request *ftp ) {
|
377
|
374
|
ftp->already_sent = 0;
|
378
|
375
|
ftp->recvbuf = ftp->status_text;
|
379
|
376
|
ftp->recvsize = sizeof ( ftp->status_text ) - 1;
|
380
|
|
- ftp->data_rcvd = 0;
|
381
|
377
|
ftp->tcp.tcp_op = &ftp_tcp_operations;
|
382
|
378
|
ftp->tcp_data.tcp_op = &ftp_data_tcp_operations;
|
383
|
379
|
if ( ( rc = tcp_connect ( &ftp->tcp, &ftp->server, 0 ) ) != 0 )
|