Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Fixed a bug regarding work_to_do (decrementing on bind errors). | 8b8585685bdd07d0e1df9a7ca9e41ecca9cc73bf | Catalin(ux) M. BOIE | 2009-09-18 08:30:10 |
Log also commit function. | c920c0191bebc71b18bc318803db7f02ddc7b77f | Catalin(ux) M. BOIE | 2009-09-18 08:21:53 |
Log also work_to_do. | a7c800b63e6ca4384726c7269e097c4f76f9991e | Catalin(ux) M. BOIE | 2009-09-18 07:51:26 |
Conn_eat logs also the slot. | f65411260656b348ea34da12e7bbcbe62d7350f6 | Catalin(ux) M. BOIE | 2009-09-18 07:47:10 |
More logging in hang-up case. | 325c292c46f8deb6e621836f16dec2d43cc5aea9 | Catalin(ux) M. BOIE | 2009-09-18 07:30:39 |
Bumbed up the version to 1.0.25. | 379d8e2aa9df2b504cc5f539981fecf0d882c509 | Catalin(ux) M. BOIE | 2009-09-17 14:47:48 |
Lots of bulk changes to work-around C pointer change. | bf3d2ae7af927b3624c4685c72ca6fa812bca640 | Catalin(ux) M. BOIE | 2009-09-17 14:47:19 |
Bumped version to 1.0.24. | 77e8249758effc45a86d66f8edc5973f11a5b6f9 | Catalin(ux) M. BOIE | 2009-09-17 12:20:16 |
Allow chg function to fail. Problem needs more thinking. | a01999f729b0afd5891dcd538c91e564c274ce69 | Catalin(ux) M. BOIE | 2009-09-17 12:19:24 |
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 |
File | Lines added | Lines deleted |
---|---|---|
Conn.c | 7 | 5 |
Conn_engine_core.c | 1 | 1 |
File Conn.c changed (mode: 100644) (index cd6686c..ce307c8) | |||
... | ... | int Conn_commit(struct Conn *C) | |
531 | 531 | ||
532 | 532 | Log(10, "%s: slot=%u...\n", __FUNCTION__, slot); | Log(10, "%s: slot=%u...\n", __FUNCTION__, slot); |
533 | 533 | ||
534 | /* Be optimistical and increment here, in 'free' we will decrement. */ | ||
535 | /* So, in error case, we will only decrement this thing! */ | ||
536 | Conn_work_to_do++; | ||
537 | |||
534 | 538 | /* Try to figure what kind of socket is: client or master */ | /* Try to figure what kind of socket is: client or master */ |
535 | 539 | if (Conns[slot].type == CONN_TYPE_UNK) { | if (Conns[slot].type == CONN_TYPE_UNK) { |
536 | 540 | if (strlen(Conns[slot].addr) > 0) { | if (strlen(Conns[slot].addr) > 0) { |
... | ... | int Conn_commit(struct Conn *C) | |
647 | 651 | if (Conns[slot].fd == -1) { | if (Conns[slot].fd == -1) { |
648 | 652 | snprintf(Conn_error, sizeof(Conn_error), | snprintf(Conn_error, sizeof(Conn_error), |
649 | 653 | "Cannot create socket (%s, %s, %s) [%s]", | "Cannot create socket (%s, %s, %s) [%s]", |
650 | Conn_domain(C), Conn_type(C), | ||
651 | Conn_get_socket_protocol(C), | ||
654 | Conn_domain(&Conns[slot]), Conn_type(&Conns[slot]), | ||
655 | Conn_get_socket_protocol(&Conns[slot]), | ||
652 | 656 | strerror(errno)); | strerror(errno)); |
653 | 657 | return -1; | return -1; |
654 | 658 | } | } |
... | ... | int Conn_commit(struct Conn *C) | |
688 | 692 | Conns[slot].events |= CONN_POLLOUT; | Conns[slot].events |= CONN_POLLOUT; |
689 | 693 | } | } |
690 | 694 | ||
691 | ret = Conn_engine_add_obj(C); | ||
695 | ret = Conn_engine_add_obj(&Conns[slot]); | ||
692 | 696 | if (ret != 0) | if (ret != 0) |
693 | 697 | goto out_free_fd; | goto out_free_fd; |
694 | 698 | ||
... | ... | int Conn_commit(struct Conn *C) | |
697 | 701 | ||
698 | 702 | Conns[slot].state = first_state; | Conns[slot].state = first_state; |
699 | 703 | ||
700 | Conn_work_to_do++; | ||
701 | |||
702 | 704 | return 0; | return 0; |
703 | 705 | ||
704 | 706 | out_free_fd: | out_free_fd: |
File Conn_engine_core.c changed (mode: 100644) (index 754b936..727bb83) | |||
... | ... | void Conn_set(struct Conn *C, const unsigned int var, const int val) | |
1029 | 1029 | ||
1030 | 1030 | slot = C->slot; | slot = C->slot; |
1031 | 1031 | ||
1032 | fd = Conn_get_fd(C); | ||
1032 | fd = Conn_get_fd(&Conns[slot]); | ||
1033 | 1033 | ||
1034 | 1034 | switch (var) { | switch (var) { |
1035 | 1035 | case CONN_PARA_AUTO_RECONNECT: | case CONN_PARA_AUTO_RECONNECT: |