From 388c52d82fa6e72949e0bc42f74ffc1ddbdee1e2 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 12 Jan 2009 15:18:37 +0100 Subject: [PATCH] Port is registered using a port reference instead of forb pointer --- src/forb.c | 2 +- src/port.c | 4 +++- src/port.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/forb.c b/src/forb.c index 1c33d95..8dde261 100644 --- a/src/forb.c +++ b/src/forb.c @@ -211,7 +211,7 @@ forb_init(int *argc, char **argv[], const char *orb_id) memset(port, 0, sizeof(*port)); ret = forb_unix_port_init(&port->desc, &forb->server_id); if (ret) goto err_free_unix; - ret = forb_register_port(forb, port); + ret = forb_register_port(orb, port); if (ret) goto err_free_unix; /* TODO: forb_unix_port_done() */ goto unix_ok; } diff --git a/src/port.c b/src/port.c index c22ae6d..9d805e3 100644 --- a/src/port.c +++ b/src/port.c @@ -57,6 +57,7 @@ #include "port.h" #include "proto.h" +#include "object.h" #include #include "iop.h" #include @@ -76,9 +77,10 @@ extern UL_LOG_CUST(ulogd_forb_port); * * @return Zero on success, FOSA error code on error. */ -int forb_register_port(forb_t *forb, forb_port_t *port) +int forb_register_port(forb_orb orb, forb_port_t *port) { int ret; + forb_t *forb = forb_data(orb); port->forb = forb; port->finish = false; diff --git a/src/port.h b/src/port.h index ae3842d..c293dcf 100644 --- a/src/port.h +++ b/src/port.h @@ -99,7 +99,7 @@ UL_LIST_CUST_DEC(forb_port, /* cust_prefix */ ports, /* cust_head_field */ node) /* cust_node_field */ -int forb_register_port(forb_t *forb, forb_port_t *port); +int forb_register_port(forb_orb orb, forb_port_t *port); void forb_destroy_port(forb_port_t *port); -- 2.39.2