Fix test client refactor: broken includes, typos, and structural bugs
- Rename include/lib.h to include/toastyfs.h, add -Iinclude to build - Fix build.sh: replace deleted blob_client.c with random_client.c - Fix src/client.c: wrong include (client_lib.h), add missing STEP_FETCH_CHUNK enum, add missing struct fields (bucket, key, blob_size, content_hash, error, file_size, phase_time), fix TRANSFER_WAITING->TRANSFER_PENDING, fix begin_transfers() wrong variable refs, fix reap->resp typo, fix resp.size check inversion, fix state->tfs in process_events, fix tfs->transfer->tfs->transfers, fix tfs->phase->tfs->step, fix function name typos in toastyfs_get_result, fix async_put->async_get in toastyfs_get, fix ReplyMessage->RequestMessage in async_delete, fix put_result/delete_result return types, fix wait_until_result, add leader_idx() and toastyfs_alloc(), add missing MessageHeader casts - Fix src/random_client.c: randm_client.h typo, addrs[i]->addrs[num_addrs], use toastyfs_alloc() for opaque type, fix tfs->state->tfs refs - Fix src/random_client.h: wrong include guard names - Fix src/main.c: replace deleted client.h/blob_client.h with random_client.h, update all client spawn configs to use RandomClient https://claude.ai/code/session_018MRQTdAZoBCXJZgdP4U6V6
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef TOASTYFS_INCLUDED
|
||||
#define TOASTYFS_INCLUDED
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
TOASTYFS_RESULT_VOID,
|
||||
TOASTYFS_RESULT_PUT,
|
||||
@@ -22,8 +24,9 @@ typedef struct {
|
||||
|
||||
typedef struct ToastyFS ToastyFS;
|
||||
|
||||
ToastyFS* toastyfs_init(char *addrs, int num_addrs);
|
||||
void toastyfs_free(ToastyFS *tfs);
|
||||
ToastyFS *toastyfs_alloc(void);
|
||||
int toastyfs_init(ToastyFS *tfs, uint64_t client_id, char **addrs, int num_addrs);
|
||||
void toastyfs_free(ToastyFS *tfs);
|
||||
|
||||
void toastyfs_process_events(ToastyFS *tfs, void **ctxs, struct pollfd *pdata, int pnum);
|
||||
int toastyfs_register_events(ToastyFS *tfs, void **ctxs, struct pollfd *pdata, int pcap);
|
||||
@@ -40,8 +43,8 @@ ToastyFS_Result toastyfs_get_result(ToastyFS *tfs);
|
||||
int toastyfs_put(ToastyFS *tfs, char *key, int key_len,
|
||||
char *data, int data_len, ToastyFS_Result *res);
|
||||
|
||||
int toastyfs_get(ToastyFS *tfs, char *key, int key_len);
|
||||
int toastyfs_get(ToastyFS *tfs, char *key, int key_len, ToastyFS_Result *res);
|
||||
|
||||
int toastyfs_delete(ToastyFS *tfs, char *key, int key_len);
|
||||
int toastyfs_delete(ToastyFS *tfs, char *key, int key_len, ToastyFS_Result *res);
|
||||
|
||||
#endif // TOASTYFS_INCLUDED
|
||||
#endif // TOASTYFS_INCLUDED
|
||||
Reference in New Issue
Block a user