|
@@ -58,19 +58,13 @@ static void ftp_closed ( struct tcp_connection *conn ) {
|
58
|
58
|
ftp_complete ( ftp, 1 );
|
59
|
59
|
}
|
60
|
60
|
|
61
|
|
-static void ftp_connected ( struct tcp_connection *conn ) {
|
62
|
|
- struct ftp_request *ftp = tcp_to_ftp ( conn );
|
63
|
|
-
|
64
|
|
- /* Nothing to do */
|
65
|
|
-}
|
66
|
|
-
|
67
|
61
|
static void ftp_acked ( struct tcp_connection *conn, size_t len ) {
|
68
|
62
|
struct ftp_request *ftp = tcp_to_ftp ( conn );
|
69
|
63
|
|
70
|
64
|
ftp->already_sent += len;
|
71
|
65
|
}
|
72
|
66
|
|
73
|
|
-static int ftp_open_passive ( struct ftp_request *ftp ) {
|
|
67
|
+int ftp_open_passive ( struct ftp_request *ftp ) {
|
74
|
68
|
char *ptr = ftp->passive_text;
|
75
|
69
|
uint8_t *byte = ( uint8_t * ) ( &ftp->tcp_data.sin );
|
76
|
70
|
int i;
|
|
@@ -90,7 +84,7 @@ static int ftp_open_passive ( struct ftp_request *ftp ) {
|
90
|
84
|
return 0;
|
91
|
85
|
}
|
92
|
86
|
|
93
|
|
-static void ftp_reply ( struct ftp_request *ftp ) {
|
|
87
|
+void ftp_reply ( struct ftp_request *ftp ) {
|
94
|
88
|
char status_major = ftp->status_text[0];
|
95
|
89
|
int success;
|
96
|
90
|
|
|
@@ -190,7 +184,6 @@ static struct tcp_operations ftp_tcp_operations = {
|
190
|
184
|
.aborted = ftp_aborted,
|
191
|
185
|
.timedout = ftp_timedout,
|
192
|
186
|
.closed = ftp_closed,
|
193
|
|
- .connected = ftp_connected,
|
194
|
187
|
.acked = ftp_acked,
|
195
|
188
|
.newdata = ftp_newdata,
|
196
|
189
|
.senddata = ftp_senddata,
|
|
@@ -208,24 +201,6 @@ static void ftp_data_timedout ( struct tcp_connection *conn ) {
|
208
|
201
|
ftp_complete ( ftp, -ETIMEDOUT );
|
209
|
202
|
}
|
210
|
203
|
|
211
|
|
-static void ftp_data_closed ( struct tcp_connection *conn ) {
|
212
|
|
- struct ftp_request *ftp = tcp_to_ftp_data ( conn );
|
213
|
|
-
|
214
|
|
- /* Nothing to do */
|
215
|
|
-}
|
216
|
|
-
|
217
|
|
-static void ftp_data_connected ( struct tcp_connection *conn ) {
|
218
|
|
- struct ftp_request *ftp = tcp_to_ftp_data ( conn );
|
219
|
|
-
|
220
|
|
- /* Nothing to do */
|
221
|
|
-}
|
222
|
|
-
|
223
|
|
-static void ftp_data_acked ( struct tcp_connection *conn, size_t len ) {
|
224
|
|
- struct ftp_request *ftp = tcp_to_ftp_data ( conn );
|
225
|
|
-
|
226
|
|
- /* Nothing to do */
|
227
|
|
-}
|
228
|
|
-
|
229
|
204
|
static void ftp_data_newdata ( struct tcp_connection *conn,
|
230
|
205
|
void *data, size_t len ) {
|
231
|
206
|
struct ftp_request *ftp = tcp_to_ftp_data ( conn );
|
|
@@ -233,20 +208,10 @@ static void ftp_data_newdata ( struct tcp_connection *conn,
|
233
|
208
|
ftp->callback ( data, len );
|
234
|
209
|
}
|
235
|
210
|
|
236
|
|
-static void ftp_data_senddata ( struct tcp_connection *conn ) {
|
237
|
|
- struct ftp_request *ftp = tcp_to_ftp_data ( conn );
|
238
|
|
-
|
239
|
|
- /* Nothing to do */
|
240
|
|
-}
|
241
|
|
-
|
242
|
211
|
static struct tcp_operations ftp_data_tcp_operations = {
|
243
|
212
|
.aborted = ftp_data_aborted,
|
244
|
213
|
.timedout = ftp_data_timedout,
|
245
|
|
- .closed = ftp_data_closed,
|
246
|
|
- .connected = ftp_data_connected,
|
247
|
|
- .acked = ftp_data_acked,
|
248
|
214
|
.newdata = ftp_data_newdata,
|
249
|
|
- .senddata = ftp_data_senddata,
|
250
|
215
|
};
|
251
|
216
|
|
252
|
217
|
/**
|