diff options
author | Uros Majstorovic <majstor@majstor.org> | 2024-05-23 00:42:25 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2024-05-23 00:42:25 +0200 |
commit | 9c8ae2d28f0c3e75371fbae6e9f688798b44255c (patch) | |
tree | 12d62040b51ac9fbd86fd0259bf4e5f46b2ad801 /ecp/src | |
parent | ea2bfa175c9fcc4c0d4aa708fea6ce497b2c73d6 (diff) |
added multiple server receiver threads; added server dir query
Diffstat (limited to 'ecp/src')
-rw-r--r-- | ecp/src/ecp/dir/dir_client.c | 6 | ||||
-rw-r--r-- | ecp/src/ecp/dir/dir_client.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ecp/src/ecp/dir/dir_client.c b/ecp/src/ecp/dir/dir_client.c index 3b0d39d..defc202 100644 --- a/ecp/src/ecp/dir/dir_client.c +++ b/ecp/src/ecp/dir/dir_client.c @@ -49,7 +49,7 @@ static ssize_t dir_handle_msg(ECPConnection *conn, ecp_seq_t seq, unsigned char unsigned char frag_tot; int is_first, is_last; int i; - int rv; + int rv = ECP_OK; dir_list_fin = NULL; @@ -99,7 +99,7 @@ handle_dir_msg_fin: ecp_frag_end(conn, seq, frag_cnt, rv); if (rv || is_last) { - if (dir_result_f) dir_result_f(dir_list_fin, rv); + if (dir_result_f) dir_result_f(conn->sock, dir_list_fin, rv); ecp_conn_close(conn); } @@ -108,7 +108,7 @@ handle_dir_msg_fin: } static void dir_handle_err(ECPConnection *conn, unsigned char mtype, int err) { - if (dir_result_f) dir_result_f(NULL, err); + if (dir_result_f) dir_result_f(conn->sock, NULL, err); ecp_conn_close(conn); } diff --git a/ecp/src/ecp/dir/dir_client.h b/ecp/src/ecp/dir/dir_client.h index 1977e95..d55b8f6 100644 --- a/ecp/src/ecp/dir/dir_client.h +++ b/ecp/src/ecp/dir/dir_client.h @@ -5,7 +5,7 @@ typedef struct ECPDirList { ECPDirItem *items; } ECPDirList; -typedef void (*ecp_dir_result_t) (ECPDirList *dir_list, int err); +typedef void (*ecp_dir_result_t) (ECPSocket *sock, ECPDirList *dir_list, int err); ECPDirList *ecp_dir_list_create(void); void ecp_dir_list_destroy(ECPDirList *dir_list); |