mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-04-19 18:39:32 +08:00
Compare commits
No commits in common. "branch_libev" and "20230206.0" have entirely different histories.
branch_lib
...
20230206.0
@ -1,6 +1,4 @@
|
||||
#note: experimental
|
||||
# currently only used for generating `compile_commands.json` for clangd
|
||||
# to build this project, it's suggested to use `makefile` instead
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(speederv2)
|
||||
|
@ -1 +1 @@
|
||||
English Only.
|
||||
English Only (except for bug reporting).
|
||||
|
@ -895,8 +895,8 @@ int new_connected_socket2(int &fd, address_t &addr, address_t *bind_addr, char *
|
||||
u32_t djb2(unsigned char *str, int len) {
|
||||
u32_t hash = 5381;
|
||||
int c;
|
||||
for (int i=0; i<len ;i++) {
|
||||
c = *(str++);
|
||||
int i = 0;
|
||||
while (c = *str++, i++ != len) {
|
||||
hash = ((hash << 5) + hash) ^ c; /* (hash * 33) ^ c */
|
||||
}
|
||||
|
||||
@ -907,15 +907,14 @@ u32_t djb2(unsigned char *str, int len) {
|
||||
u32_t sdbm(unsigned char *str, int len) {
|
||||
u32_t hash = 0;
|
||||
int c;
|
||||
for (int i=0; i<len ;i++) {
|
||||
c = *(str++);
|
||||
int i = 0;
|
||||
while (c = *str++, i++ != len) {
|
||||
hash = c + (hash << 6) + (hash << 16) - hash;
|
||||
}
|
||||
// hash=htonl(hash);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
vector<string> string_to_vec(const char *s, const char *sp) {
|
||||
vector<string> res;
|
||||
string str = s;
|
||||
|
@ -413,7 +413,7 @@ class fec_decode_manager_t : not_copy_able_t {
|
||||
mylog(log_debug, "fec_decode_manager destroyed\n");
|
||||
if (fec_data != 0) {
|
||||
mylog(log_debug, "fec_data freed\n");
|
||||
delete[] fec_data;
|
||||
delete fec_data;
|
||||
}
|
||||
}
|
||||
int clear() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user