Lines Matching defs:command
143 * Server may send more than one response for a certain command.
207 static int ftp_send_command(FTPContext *s, const char *command,
212 ff_dlog(s, "%s", command);
220 if ((err = ffurl_write(s->conn_control, command, strlen(command))) < 0)
281 static const char *command = "EPSV\r\n";
284 if (ftp_send_command(s, command, epsv_codes, &res) != 229 || !res)
322 static const char *command = "PASV\r\n";
325 if (ftp_send_command(s, command, pasv_codes, &res) != 227 || !res)
368 static const char *command = "PWD\r\n";
371 if (ftp_send_command(s, command, pwd_codes, &res) != 257 || !res)
404 char command[CONTROL_BUFFER_SIZE];
409 ret = snprintf(command, sizeof(command), "SIZE %s\r\n", s->path);
410 if (ret >= sizeof(command))
413 if (ftp_send_command(s, command, size_codes, &res) == 213 && res && strlen(res) > 4) {
427 char command[CONTROL_BUFFER_SIZE];
431 ret = snprintf(command, sizeof(command), "RETR %s\r\n", s->path);
432 if (ret >= sizeof(command))
435 resp_code = ftp_send_command(s, command, retr_codes, NULL);
446 char command[CONTROL_BUFFER_SIZE];
450 ret = snprintf(command, sizeof(command), "STOR %s\r\n", s->path);
451 if (ret >= sizeof(command))
454 resp_code = ftp_send_command(s, command, stor_codes, NULL);
465 static const char *command = "TYPE I\r\n";
468 if (ftp_send_command(s, command, type_codes, NULL) != 200)
476 char command[CONTROL_BUFFER_SIZE];
479 snprintf(command, sizeof(command), "REST %"PRId64"\r\n", pos);
480 if (ftp_send_command(s, command, rest_codes, NULL) != 350)
489 char command[MAX_URL_SIZE];
492 ret = snprintf(command, sizeof(command), "CWD %s\r\n", s->path);
493 if (ret >= sizeof(command))
496 if (ftp_send_command(s, command, cwd_codes, NULL) != 250)
503 static const char *command = "MLSD\r\n";
506 if (ftp_send_command(s, command, mlsd_codes, NULL) != 150)
514 static const char *command = "NLST\r\n";
517 if (ftp_send_command(s, command, nlst_codes, NULL) != 226)
648 static const char *command = "ABOR\r\n";
654 "ABOR command tells the server to abort the previous FTP
655 service command and any associated transfer of data."
663 if (ftp_send_command(s, command, NULL, NULL) < 0) {
1097 char command[MAX_URL_SIZE];
1105 ret = snprintf(command, sizeof(command), "DELE %s\r\n", s->path);
1106 if (ret >= sizeof(command)) {
1111 if (ftp_send_command(s, command, del_codes, NULL) == 250) {
1116 ret = snprintf(command, sizeof(command), "RMD %s\r\n", s->path);
1117 if (ret >= sizeof(command)) {
1122 if (ftp_send_command(s, command, rmd_codes, NULL) == 250)
1135 char command[MAX_URL_SIZE], path[MAX_URL_SIZE];
1143 ret = snprintf(command, sizeof(command), "RNFR %s\r\n", s->path);
1144 if (ret >= sizeof(command)) {
1149 if (ftp_send_command(s, command, rnfr_codes, NULL) != 350) {
1157 ret = snprintf(command, sizeof(command), "RNTO %s\r\n", path);
1158 if (ret >= sizeof(command)) {
1163 if (ftp_send_command(s, command, rnto_codes, NULL) == 250)