]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Adding fwp_endpoint_vres to fwp_mngt
authorMartin Molnar <molnam1@fel.cvut.cz>
Mon, 26 May 2008 22:55:02 +0000 (00:55 +0200)
committerMartin Molnar <molnam1@fel.cvut.cz>
Mon, 26 May 2008 22:55:02 +0000 (00:55 +0200)
fwp/lib/core/fwp_endpoint.c
fwp/lib/core/fwp_endpoint.h
fwp/lib/mngt/fwp_mngt.c
fwp/lib/mngt/fwp_participant.h

index 3c251c82689d3471d84036bd16cdb7ddc5289b03..654c19c59b834e7568ecf3e30a0cde83a75e3a08 100644 (file)
@@ -26,9 +26,9 @@ struct fwp_endpoint{
         */
        struct fwp_sockaddr     peer;   
        /**< source port */
-       int                     sport;  
+       unsigned int            sport;  
        /**< dest port */
-       int                     dport;  
+       unsigned int            dport;  
        /**< dest node */
        int                     node;
        /**< socket descriptor*/
@@ -97,9 +97,9 @@ static inline void fwp_endpoint_free(fwp_endpoint_t *epoint)
  *
  */
 int fwp_endpoint_get_params(unsigned int *node, unsigned int *port, int *flags, 
-                               fwp_endpoint_d_t *epointdp)
+                               fwp_endpoint_d_t epointd)
 {
-       fwp_endpoint_t *epoint = *epointdp;
+       fwp_endpoint_t *epoint = epointd;
 
        *node = epoint->node;
        *port = epoint->sport;
index 2175837d2e2f677e5350fa269531fcc878d6ae42..51b7ef74a486625d37f1d823abffca1f581693da 100644 (file)
@@ -20,7 +20,7 @@ typedef struct fwp_endpoint* fwp_endpoint_d_t;
 
 int fwp_endpoint_table_init(unsigned int nr_endpoints);
 int fwp_endpoint_get_params(unsigned int *node, unsigned int *port, int *flags, 
-                               fwp_endpoint_d_t *epointdp);
+                               fwp_endpoint_d_t epointdp);
 
 int fwp_send_endpoint_create(unsigned int node, unsigned int port, int flags,
                                fwp_endpoint_d_t *epointdp);
index fd19671230d31e64cb445df54cda16e0990775e2..15d81a4845d2f1f0b23a1effd245ad2da7346853 100644 (file)
@@ -108,16 +108,21 @@ void fwp_mngt_connect()
 int fwp_mngt_init()
 {
        fwp_participant_info_t  my_info;
+       int flags;
        
        my_info.id.node_id = inet_addr("127.0.0.1");
        my_info.id.app_id = getpid();
        /* temporarily*/
-       my_info.stream_id = FWP_MNGR_STREAM_ID;
+       my_info.stream_id = 0;
 
        fwp_participant_this = fwp_participant_create(&my_info);        
        
        FWP_DEBUG("Management receive endpoint created\n");
-       fwp_receive_endpoint_create(FWP_MNGR_STREAM_ID, 0, &fwp_mngt_repointd); 
+       fwp_receive_endpoint_create(0, 0, &fwp_mngt_repointd);
+       fwp_endpoint_get_params(&(fwp_participant_this->id.node_id), 
+                               &fwp_participant_this->stream_id,
+                               &flags,
+                               fwp_mngt_repointd);
        
        return 0;
 }
index 6b67e8bc2e2601a28f0b8abcc58153dcd02c79cf..cb0e9d21ab0ed02f5a2dbb4dd9bab3ea38a35cd7 100644 (file)
@@ -5,8 +5,8 @@
 
 typedef 
 struct fwp_participant_id {
-       int     node_id;
-       int     app_id;
+       unsigned int    node_id;
+       unsigned int    app_id;
 } fwp_participant_id_t;
 
 typedef