Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Use fd -1 to signal that the socket is closed. | 66c44cbeb5672fae1bea46260adbae06a3562d88 | Catalin(ux) M. BOIE | 2010-05-06 16:08:59 |
Better error logging in xbind example. | dac03d74521e751de9d900ea115ad2fbd2deba6e | Catalin(ux) M. BOIE | 2010-02-16 20:22:05 |
Fixed some stupid choices regarding storage type for the output of snprintf. | 3cddc7934c4fc2640e4a60d408e98c45acef48c9 | Catalin(ux) M. BOIE | 2010-02-05 00:12:13 |
First round of memory status. | 9e267dc05ec2c0b1e50288a6d9a5db5d3677e82e | Catalin(ux) M. BOIE | 2010-02-04 23:46:48 |
Do not overwrite Conn_error in Conn_free_intern. | 380c378dd92e7a797f0dfec99bed7ce77034933c | Catalin(ux) M. BOIE | 2010-02-04 23:31:50 |
No need to remove fd from epoll just before closing it. | bf7e91a441314a37f5f8a2430645c913b953499f | Catalin(ux) M. BOIE | 2010-02-04 23:17:05 |
Log status at the end for xbind example. | 2caa2d8a3dc509e91235fd23c396061931ae1ef8 | Catalin(ux) M. BOIE | 2010-02-04 23:11:39 |
Log also fd in Conn_free_intern. | 2e12c2ed0b4c39341ec3da3c6fc52d32f4a351eb | Catalin(ux) M. BOIE | 2010-02-04 23:11:09 |
In shutdown, close the file descriptors. | 8bf16a0b5413d8f99cb466b52efcbd12318e958d | Catalin(ux) M. BOIE | 2010-01-27 18:51:36 |
Added xbind example. | 1cdf8e8fd7ba9049eafef8f136d6b4e5e870b0ff | Catalin(ux) M. BOIE | 2009-12-30 22:37:01 |
TODO in/out. | b0d7ba7f8abe58861a47586d767ff35bc1f0961d | Catalin(ux) M. BOIE | 2009-12-30 22:35:55 |
Stop Conn if nothing to do. | 7f13d71774792aa97b341a2e69bb557d15b6c74a | Catalin(ux) M. BOIE | 2009-12-06 01:38:12 |
Improved Conn_split_* and removed a bad leak! | f47f85c65ac5781d9419b58b20db632772947c64 | Catalin(ux) M. BOIE | 2009-12-06 01:24:58 |
Bump up the version. | 4788a6979d84939cc7aaf824ef8e0b7357cab6cc | Catalin(ux) M. BOIE | 2009-12-07 12:50:16 |
Duilder updates. | 1b717c718189468006ff0e7fb228571e76fb97e6 | Catalin(ux) M. BOIE | 2009-12-07 12:49:55 |
Exported Conn_engine_set function. | 1c69de5306d302fcd6b3e6351d3e28771b08bb05 | Catalin(ux) M. BOIE | 2009-11-12 15:18:40 |
Bumped up the version to 1.0.29. | ee219d6016983a64187cfe0866c597419f464535 | Catalin(ux) M. BOIE | 2009-09-18 12:07:41 |
Fix Conn_poll(-1)! Stupid me! | 4ce77092baec7cbbfcd8d943838aa7eeefedbc8e | Catalin(ux) M. BOIE | 2009-09-18 12:07:04 |
Bump up the version to 1.0.28. | deea1515d967c7b0708e25fe146799a09c5c2dc8 | Catalin(ux) M. BOIE | 2009-09-18 11:15:46 |
Do poll in 1000ms steps, even if Conn_poll is called with != 1 value. Else, triggers are not called! | 59b4d5d8db5a4a9048f61ad836e67c824bb1ac95 | Catalin(ux) M. BOIE | 2009-09-18 11:15:04 |
File | Lines added | Lines deleted |
---|---|---|
Conn.c | 10 | 3 |
File Conn.c changed (mode: 100644) (index 0c34f15..e3b5a5d) | |||
... | ... | int Conn_shutdown(void) | |
223 | 223 | return ret; | return ret; |
224 | 224 | ||
225 | 225 | /* Free all buffers */ | /* Free all buffers */ |
226 | Log(5, "Freeing %u slots...\n", Conn_allocated); | ||
226 | 227 | for (slot = 0; slot < Conn_allocated - 1; slot++) { | for (slot = 0; slot < Conn_allocated - 1; slot++) { |
227 | 228 | if (Conns[slot].ibuf) | if (Conns[slot].ibuf) |
228 | 229 | free(Conns[slot].ibuf); | free(Conns[slot].ibuf); |
229 | 230 | if (Conns[slot].obuf) | if (Conns[slot].obuf) |
230 | 231 | free(Conns[slot].obuf); | free(Conns[slot].obuf); |
231 | 232 | ||
232 | if (Conns[slot].fd != -1) | ||
233 | if (Conns[slot].fd != -1) { | ||
234 | Log(6, "Closing slot %u, fd %d...\n", | ||
235 | slot, Conns[slot].fd); | ||
233 | 236 | close(Conns[slot].fd); | close(Conns[slot].fd); |
237 | } | ||
234 | 238 | } | } |
235 | 239 | ||
236 | 240 | free(Conns); | free(Conns); |
... | ... | static void Conn_free_intern(const unsigned int slot) | |
336 | 340 | static int Conn_grow(void) | static int Conn_grow(void) |
337 | 341 | { | { |
338 | 342 | int ret; | int ret; |
339 | unsigned int alloc, increment = 128; | ||
343 | unsigned int alloc, increment = 128, i; | ||
340 | 344 | struct Conn *p, *set; | struct Conn *p, *set; |
341 | 345 | ||
342 | 346 | Log(10, "%s() Try to grow cells from %d to %d.\n", | Log(10, "%s() Try to grow cells from %d to %d.\n", |
... | ... | static int Conn_grow(void) | |
357 | 361 | ||
358 | 362 | set = p + Conn_allocated; | set = p + Conn_allocated; |
359 | 363 | memset(set, 0, increment * sizeof(struct Conn)); | memset(set, 0, increment * sizeof(struct Conn)); |
360 | Conns = p; | ||
364 | /* Some inits */ | ||
365 | for (i = 0; i < 128; i++) | ||
366 | set[i].fd = -1; | ||
361 | 367 | ||
368 | Conns = p; | ||
362 | 369 | Conn_allocated = alloc; | Conn_allocated = alloc; |
363 | 370 | ||
364 | 371 | return 0; | return 0; |