]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
FWP clean-up. CONFIG_WITH_CONTNEGT changed to CONFIG_WITHOUT_CONNEGT.
authorMartin <molnam1@fel.cvut.cz>
Fri, 14 Nov 2008 18:31:04 +0000 (19:31 +0100)
committerMartin <molnam1@fel.cvut.cz>
Fri, 14 Nov 2008 18:31:04 +0000 (19:31 +0100)
fwp/lib/frsh_fwp/fwp_fra.c
fwp/lib/fwp/Makefile.omk
fwp/lib/fwp/fwp_endpoint.c
fwp/lib/fwp/fwp_vres.c

index e1ec819c5ba9c3b04b4ea22c90f5d9160f71454d..4f1938d5ca221c3b11e413d6c10dfd2390c838b6 100644 (file)
@@ -25,7 +25,7 @@ static int create_vres(fres_vres_t *vres, void *priv)
        fwp_sched = fres_contract_get_block(vres->new, FRES_BLOCK_FWP_SCHED);
 
        //fwp_fna_network_budget_to_bytes(FRSH_NETPF_FWP, &basic->budget, &vparams.budget);
-       vparams.budget = basic->budget.tv_nsec;
+       vparams.budget = basic->budget.tv_nsec/1000000;
        vparams.period = basic->period;
        vparams.ac_id = fwp_sched->ac_id;       
        /* Create vres */
index 6d4798ead287ad23fb3eef8696474b8bf6e8d16b..d47d69d3ec01768ceed3ef71f1cea9ab903c6ce8 100644 (file)
@@ -1,6 +1,6 @@
 #lib_LIBRARIES = fwp
 shared_LIBRARIES = fwp
-CFLAGS += -D_FWP_INTERNALS_ -DFWP_WITH_CONTNEGT
+CFLAGS += -D_FWP_INTERNALS_ #-DFWP_WITHOUT_CONTNEGT
 SUBDIRS = tests 
 #LDFLAGS = -lpthread  -lrt
 fwp_SOURCES = fwp_utils.c fwp_vres.c fwp_msgb.c fwp_msgq.c fwp_endpoint.c fwp.c
index 008e669ab093fa0eb8bb89162013e682d054926f..1b08738c8a679db28b9ae3f80b0c057bfb89537a 100644 (file)
@@ -43,7 +43,6 @@ struct fwp_endpoint{
        unsigned int            nr_connections;
        /** client fdset */
        fd_set                  fdset;
-       fd_set                  testfds;
        /** specific operation options*/
        int                     flags;  
 };
@@ -197,7 +196,7 @@ int fwp_send_endpoint_create(unsigned int node,
        
        FWP_DEBUG("FWP Send endpoint created.\n"); 
 
-#ifndef FWP_WITH_CONTNEGT
+#ifdef FWP_WITHOUT_CONTNEGT
        /* Create vres with default parameters */
        FWP_DEBUG("Creating default vres\n");
        if (fwp_vres_create(&fwp_vres_params_default, &fwp_epoint->vresd)) {
@@ -280,7 +279,6 @@ int fwp_receive_endpoint_create(unsigned int port,
                FD_ZERO(&fwp_epoint->fdset);
                /*add listen socket */
                FD_SET(fwp_epoint->sockd, &fwp_epoint->fdset); 
-               fwp_epoint->testfds = fwp_epoint->fdset;
                fwp_epoint->c_sockd = 
                                (int*)malloc(fwp_epoint->attr.max_connections);
                bzero(fwp_epoint->c_sockd, fwp_epoint->attr.max_connections);
@@ -339,7 +337,7 @@ err:
 int fwp_send_endpoint_bind(fwp_endpoint_d_t epointd, fwp_vres_d_t vresd)
 {
        int rv = 0;
-#ifdef FWP_WITH_CONTNEGT
+#ifndef FWP_WITHOUT_CONTNEGT
        fwp_endpoint_t *fwp_epoint = epointd;
        
        fwp_epoint->vresd = vresd;      
index 42305748281ddc562242b1c11417eb3d08fa3683..9206a42f0e03170687f1864582059fbb8222087a 100644 (file)
@@ -31,13 +31,12 @@ struct fwp_vres{
        /* consideration: move tx_queue to endpoint */
        /**< queue for messages to send */
        struct fwp_msgq                 tx_queue;   
-       int                             flags;
+       fwp_vres_flag_t                 flags;
        /**< endpoint bounded to this vres */
        /*fwp_endpoint_t                *epoint; */
        pthread_t                       tx_thread; /**< tx_thread id*/
        pthread_attr_t                  tx_thread_attr;
        int                             ac_sockd;  /**< ac socket descriptor */
-       fwp_sockaddr_t                  addr;   /**< dest addr,for effectivness*/
 };
 
 typedef
@@ -158,7 +157,7 @@ static inline int fwp_vres_is_valid(fwp_vres_t *vres)
 
 /*inline int fwp_vres_get(fwp_vres_id_t vres_id, fwp_vres_t **vres )
 {
-       3if ((vres_id < 0) || (vres_id > fwp_vres_table.nr_vres - 1))
+       if ((vres_id < 0) || (vres_id > fwp_vres_table.nr_vres - 1))
                return -EINVAL;
        *vres = &fwp_vres_table.entry[vres_id];
        return 0;