testing: process_client_command [not finished]

This commit is contained in:
2026-06-29 18:37:37 +03:00
parent 323fd33cbc
commit fd2b54c3c5
6 changed files with 116 additions and 7 deletions
+6 -6
View File
@@ -12,8 +12,8 @@
#include <string.h>
#include <unistd.h>
#define DEF_LIMIT 15
#define DEF_PAGE_NUM 1
#define DIF_LIMIT 15
#define DIF_PAGE_NUM 1
void process_client_command(char *line, session *sess, server_data_t *s_d) {
char arg_1[32];
@@ -32,9 +32,9 @@ void process_client_command(char *line, session *sess, server_data_t *s_d) {
switch (ret) {
case EOF:
case 0:
fl_args.limit = DEF_LIMIT;
fl_args.limit = DIF_LIMIT;
case 1:
fl_args.page = DEF_PAGE_NUM;
fl_args.page = DIF_PAGE_NUM;
}
file_list(sess, &fl_args);
return;
@@ -66,9 +66,9 @@ void process_client_command(char *line, session *sess, server_data_t *s_d) {
switch (ret) {
case 2:
fl_args.limit = DEF_LIMIT;
fl_args.limit = DIF_LIMIT;
case 3:
fl_args.page = DEF_PAGE_NUM;
fl_args.page = DIF_PAGE_NUM;
}
/* by name */
+3
View File
@@ -7,4 +7,7 @@
#include <main.h>
void process_client_command(char *line, session *sess, server_data_t *s_d);
void download_confirm(char *line, session *sess, server_data_t *s_d);
/* TEST */
void process_client_command(char *line, session *sess, server_data_t *s_d);
#endif