mirror of https://github.com/schoebel/mars
all: use new wrapper
This commit is contained in:
parent
e370af69e1
commit
1080474ecc
|
@ -377,7 +377,7 @@ int handler_thread(void *data)
|
||||||
if (!mars_socket_is_alive(sock) &&
|
if (!mars_socket_is_alive(sock) &&
|
||||||
atomic_read(&brick->in_flight) <= 0 &&
|
atomic_read(&brick->in_flight) <= 0 &&
|
||||||
brick->conn_brick) {
|
brick->conn_brick) {
|
||||||
if (generic_disconnect((void*)brick->inputs[0]) >= 0)
|
if (mars_disconnect((void*)brick->inputs[0]) >= 0)
|
||||||
brick->conn_brick = NULL;
|
brick->conn_brick = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ int handler_thread(void *data)
|
||||||
(const char *[]){},
|
(const char *[]){},
|
||||||
0);
|
0);
|
||||||
if (likely(prev)) {
|
if (likely(prev)) {
|
||||||
status = generic_connect((void*)brick->inputs[0], (void*)prev->outputs[0]);
|
status = mars_connect((void *)brick->inputs[0], prev->outputs[0]);
|
||||||
if (unlikely(status < 0)) {
|
if (unlikely(status < 0)) {
|
||||||
MARS_ERR("#%d cannot connect to '%s'\n", sock->s_debug_nr, path);
|
MARS_ERR("#%d cannot connect to '%s'\n", sock->s_debug_nr, path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3427,7 +3427,7 @@ void _rotate_trans(struct mars_rotate *rot)
|
||||||
atomic_read(&trans_input->log_ref_count) <= 0) {
|
atomic_read(&trans_input->log_ref_count) <= 0) {
|
||||||
int status;
|
int status;
|
||||||
MARS_INF("cleanup old transaction log (%d -> %d)\n", old_nr, log_nr);
|
MARS_INF("cleanup old transaction log (%d -> %d)\n", old_nr, log_nr);
|
||||||
status = generic_disconnect((void*)trans_input);
|
status = mars_disconnect((void*)trans_input);
|
||||||
if (unlikely(status < 0)) {
|
if (unlikely(status < 0)) {
|
||||||
MARS_ERR("disconnect failed\n");
|
MARS_ERR("disconnect failed\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -3475,7 +3475,7 @@ void _rotate_trans(struct mars_rotate *rot)
|
||||||
|
|
||||||
_init_trans_input(trans_input, rot->next_relevant_log, rot);
|
_init_trans_input(trans_input, rot->next_relevant_log, rot);
|
||||||
|
|
||||||
status = generic_connect((void*)trans_input, (void*)rot->next_relevant_brick->outputs[0]);
|
status = mars_connect((void *)trans_input, rot->next_relevant_brick->outputs[0]);
|
||||||
if (unlikely(status < 0)) {
|
if (unlikely(status < 0)) {
|
||||||
MARS_ERR_TO(rot->log_say, "internal connect failed\n");
|
MARS_ERR_TO(rot->log_say, "internal connect failed\n");
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -3590,7 +3590,7 @@ int _start_trans(struct mars_rotate *rot)
|
||||||
|
|
||||||
/* Connect to new transaction log
|
/* Connect to new transaction log
|
||||||
*/
|
*/
|
||||||
status = generic_connect((void*)trans_input, (void*)rot->relevant_brick->outputs[0]);
|
status = mars_connect((void *)trans_input, rot->relevant_brick->outputs[0]);
|
||||||
if (unlikely(status < 0)) {
|
if (unlikely(status < 0)) {
|
||||||
MARS_ERR("initial connect failed\n");
|
MARS_ERR("initial connect failed\n");
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -3633,8 +3633,7 @@ int _stop_trans(struct mars_rotate *rot, const char *parent_path)
|
||||||
struct trans_logger_input *trans_input;
|
struct trans_logger_input *trans_input;
|
||||||
trans_input = trans_brick->inputs[i];
|
trans_input = trans_brick->inputs[i];
|
||||||
if (trans_input && !trans_input->is_operating) {
|
if (trans_input && !trans_input->is_operating) {
|
||||||
if (trans_input->connect)
|
(void)mars_disconnect((void*)trans_input);
|
||||||
(void)generic_disconnect((void*)trans_input);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue