diff options
| author | root <[email protected]> | 2023-12-06 08:36:47 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2023-12-06 08:36:47 +0000 |
| commit | 29cd6942c133fad7c38a75e22e1cadea726ec89f (patch) | |
| tree | 6ef77e9a4b8c54a515928bc7f5c19fd5527e775f /shaping/test/stub.cpp | |
| parent | a5923348e98e0a312826d12c92beef20f702a0ca (diff) | |
1.fix bug fairness profile can't limit rate
2.add corresponding test case
Diffstat (limited to 'shaping/test/stub.cpp')
| -rw-r--r-- | shaping/test/stub.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shaping/test/stub.cpp b/shaping/test/stub.cpp index 293ef3c..f3c89e5 100644 --- a/shaping/test/stub.cpp +++ b/shaping/test/stub.cpp @@ -84,6 +84,12 @@ void stub_refresh_token_bucket(int profile_id) return; } +void stub_set_profile_type(int profile_id, enum shaping_profile_type type) +{ + pf_array[profile_id].type = type; + return; +} + void stub_set_async_token_get_times(int profile_id, int times) { pf_async_times[profile_id] = times; @@ -419,6 +425,7 @@ void swarmkv_tconsume(struct swarmkv * db, const char * key, size_t keylen, long void swarmkv_ftconsume(struct swarmkv * db, const char * key, size_t keylen, const char * member, size_t member_len, long long weight, long long tokens, swarmkv_on_reply_callback_t *cb, void *cb_arg) { + swarmkv_tconsume(db, key, keylen, tokens, cb, cb_arg); return; } |
