]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
Port is registered using a port reference instead of forb pointer
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 12 Jan 2009 14:18:37 +0000 (15:18 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 12 Jan 2009 14:18:37 +0000 (15:18 +0100)
src/forb.c
src/port.c
src/port.h

index 1c33d95a2665aa05c57e6e412f3957396d3c4b02..8dde2619dbade9b5f0b84c3f9918ad9bdeb25080 100644 (file)
@@ -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;
                }
index c22ae6d9319c80c7d19c693092543bbbff9500c9..9d805e3edfe2e7ada44523cbaaa652764d8e5ace 100644 (file)
@@ -57,6 +57,7 @@
 
 #include "port.h"
 #include "proto.h"
+#include "object.h"
 #include <forb/config.h>
 #include "iop.h"
 #include <ul_log.h>
@@ -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;
index ae3842d36fc108d79c5b2b81b5046d2aefdb3209..c293dcf17fd67215a71a47c786820687ee8dc0d1 100644 (file)
@@ -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);