Utility functions for reference counting.
This commit is contained in:
@@ -142,7 +142,7 @@ static void outgoing_resolve_wrapper(struct peer *peer) {
|
||||
}
|
||||
|
||||
static void outgoing_del(struct outgoing *outgoing) {
|
||||
(*outgoing->flow->ref_count)--;
|
||||
flow_ref_dec(outgoing->flow);
|
||||
if (outgoing->peer.fd >= 0) {
|
||||
assert(!close(outgoing->peer.fd));
|
||||
}
|
||||
@@ -160,7 +160,7 @@ void outgoing_cleanup() {
|
||||
}
|
||||
|
||||
void outgoing_new(char *node, char *service, struct flow *flow, void *passthrough) {
|
||||
(*flow->ref_count)++;
|
||||
flow_ref_inc(flow);
|
||||
|
||||
struct outgoing *outgoing = malloc(sizeof(*outgoing));
|
||||
uuid_gen(outgoing->id);
|
||||
|
||||
Reference in New Issue
Block a user