Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Done some optimizations for buffer expanding. | 0fa9c81dc4ded2296c1825c5ccd3b264995962aa | Catalin(ux) M. BOIE | 2009-09-17 12:02:46 |
Do not wrongly set connection type to P2P! | ccb997058dedaa139cf12e30eb8547f2dd99993e | Catalin(ux) M. BOIE | 2009-09-17 11:17:31 |
Bumped version to 1.0.23. | b79fc6931982e2389f1b29b91d2386eaa779c143 | Catalin(ux) M. BOIE | 2009-09-17 09:43:00 |
Duilder updates. | 534af0dbaf993201b588d463f58e64401ccc7d85 | Catalin(ux) M. BOIE | 2009-09-17 09:42:45 |
Fixed triggers. | 6a95b877268bbf4522c53398e29c3dab1a8f22d1 | Catalin(ux) M. BOIE | 2009-09-17 09:41:44 |
Bumped version to 1.0.22. | 0efd6d2a3787fe9a3f2c963bbcc85c95d44b954a | Catalin(ux) M. BOIE | 2009-09-02 16:23:25 |
Updated duilder. | 8bfb064fb40b962a0ed18f3af21fbfd0289672dd | Catalin(ux) M. BOIE | 2009-09-02 15:48:51 |
Added latency reporting. | 218047bf22e2804a585703751b51c6b2d54c59ad | Catalin(ux) M. BOIE | 2009-09-02 16:29:44 |
TODO in/out. | d56467202a5a6823716ae3e6e3e15cee93fe86d1 | Catalin(ux) M. BOIE | 2009-09-02 16:29:07 |
Ignore EMPTY state. | ef0dbfef5db779a9bb3cb1782e00c62d1abc1b07 | Catalin(ux) M. BOIE | 2009-08-31 20:54:13 |
Increment Conn_pending only on success. | e2bacc2941cb07836973f881d060e05018f28c62 | Catalin(ux) M. BOIE | 2009-08-31 20:53:53 |
Cosmetic changes. | f09c89986ade60ff5f9a79f6080783acff11c3d5 | Catalin(ux) M. BOIE | 2009-08-31 20:53:33 |
Set start values for enums. | f2d6b05dce0e058323101a4d6f159c0c4172941a | Catalin(ux) M. BOIE | 2009-08-31 20:52:41 |
Call close callback, even if state is ERROR. | 58e96228277c188b7b072496e337be9c94f56eb1 | Catalin(ux) M. BOIE | 2009-08-31 20:52:17 |
Added Conn_work_to_do to signal when we can exit. | 492d960bf3e5b3718fe69ffc8ef30fbe344a805f | Catalin(ux) M. BOIE | 2009-08-31 20:50:56 |
Splited reporting of error types. | 2d28a3be0ebb1f5e3f548d2523ac591af7dee3b9 | Catalin(ux) M. BOIE | 2009-08-31 20:08:54 |
Conn_commit will return error, so, do not call error callback. | c97f8be6cfd55c32d78e62a30375d7c014dc0e0a | Catalin(ux) M. BOIE | 2009-08-31 20:08:17 |
Cosmetic changes. | 54a9e723c3a958e69f491b55df83f96b6814af44 | Catalin(ux) M. BOIE | 2009-08-31 20:07:51 |
Raised default listen para to 4096 from 128. somaxconn still has prio. | af39935492f39786879ea6ced9f7dfe929c4879d | Catalin(ux) M. BOIE | 2009-08-31 19:56:36 |
Store in time_open the accept timestamp so Conn_lifetime will work on srv side. | 0522d638872644d7bd6490027a7ae99b1fb4b16f | Catalin(ux) M. BOIE | 2009-08-31 19:55:44 |
File | Lines added | Lines deleted |
---|---|---|
Conn_engine_core.c | 10 | 4 |
Conn_engine_core.h | 1 | 1 |
File Conn_engine_core.c changed (mode: 100644) (index 9da01aa..f97cdfc) | |||
... | ... | char *Conn_state(const struct Conn *C) | |
266 | 266 | * what = 0 for out buffer, what = 1 for input buffer | * what = 0 for out buffer, what = 1 for input buffer |
267 | 267 | * returns 0 if OK, -1 on error | * returns 0 if OK, -1 on error |
268 | 268 | */ | */ |
269 | int Conn_try_expand_buf(struct Conn *C, const int what, const int needed) | ||
269 | int Conn_try_expand_buf(struct Conn *C, const int what, const unsigned int needed) | ||
270 | 270 | { | { |
271 | 271 | char *p; | char *p; |
272 | 272 | unsigned int hm; | unsigned int hm; |
... | ... | int Conn_try_expand_buf(struct Conn *C, const int what, const int needed) | |
294 | 294 | pbuf = Conns[slot].ibuf; | pbuf = Conns[slot].ibuf; |
295 | 295 | } | } |
296 | 296 | ||
297 | /* Do we have enough room? */ | ||
298 | if (buf_size - tail >= needed) | ||
299 | return 0; | ||
300 | |||
297 | 301 | Log(10, "\tTry to expand buffer on slot %u for [%s] needed=%d head=%u tail=%u.\n", | Log(10, "\tTry to expand buffer on slot %u for [%s] needed=%d head=%u tail=%u.\n", |
298 | 302 | slot, what == 0 ? "o" : "i", needed, | slot, what == 0 ? "o" : "i", needed, |
299 | 303 | head, tail); | head, tail); |
300 | 304 | ||
301 | amount = needed; | ||
302 | if (amount < default_buf) | ||
303 | amount = default_buf; | ||
305 | amount = needed - (buf_size - tail); | ||
306 | |||
307 | /* Do not alloc less than 128 bytes */ | ||
308 | if (amount < 128) | ||
309 | amount = 128; | ||
304 | 310 | ||
305 | 311 | hm = buf_size + amount; | hm = buf_size + amount; |
306 | 312 | if (hm > max_buf) | if (hm > max_buf) |
File Conn_engine_core.h changed (mode: 100644) (index 94b3b4c..79781cb) | |||
... | ... | extern char *Conn_errno(const struct Conn *C); | |
265 | 265 | extern char *Conn_status_slot(struct Conn *C); | extern char *Conn_status_slot(struct Conn *C); |
266 | 266 | extern char *Conn_status(const unsigned int flags); | extern char *Conn_status(const unsigned int flags); |
267 | 267 | extern int Conn_try_expand_buf(struct Conn *C, const int what, | extern int Conn_try_expand_buf(struct Conn *C, const int what, |
268 | const int needed); | ||
268 | const unsigned int needed); | ||
269 | 269 | extern char *Conn_state(const struct Conn *C); | extern char *Conn_state(const struct Conn *C); |
270 | 270 | ||
271 | 271 | extern long long Conn_time_diff(const struct timeval *t1, | extern long long Conn_time_diff(const struct timeval *t1, |