]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Merge branch 'master' of frsh-forb.git.sourceforge.net:/gitroot/frsh-forb/fwp
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 10 Nov 2009 08:32:37 +0000 (09:32 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 10 Nov 2009 08:32:37 +0000 (09:32 +0100)
fwp/Makefile.omk
fwp/lib/fwp/fwp_endpoint.c
fwp/lib/fwp/fwp_vres.c
fwp/lib/fwp/fwp_vres.h

index 186f16387432e0926a90941ae768847ae09924e3..b51c919f7eaa39bf70469965b2d05c86efe36185 100644 (file)
@@ -1,6 +1,6 @@
 default_CONFIG = CONFIG_FWP=y
 
 ifeq ($(CONFIG_FWP),y)
-SUBDIRS = lib mngr wme_test
+SUBDIRS = lib mngr wme_test tests
 CFLAGS+= -Wall -Wextra -D_REENTRANT
 endif
index 7eb7d0b7fb70086f3e71b25c44580bb6b5f3da84..93756afc15a62bc914b8c967d6e11248071d7f23 100644 (file)
@@ -397,7 +397,7 @@ int fwp_send_endpoint_bind(struct fwp_endpoint *ep, fwp_vres_t *vres)
                return FRSH_ERR_ALREADY_BOUND;
        
        ep->vres = vres;
-       rv = fwp_vres_bind(vres, ep, ep->sockd);
+       rv = fwp_vres_bind(vres, ep, ep->sockd, &ep->src);
 
        return rv;
 }
index 5f1394dc97e4717eefb78228de3d5864bfa0c75d..1a4de36588a577119b9b42da65525bcc059d5743 100644 (file)
@@ -230,7 +230,7 @@ fwp_vres_t *fwp_vres_alloc()
 
 static int apply_params(fwp_vres_t *vres)
 {
-       int rv;
+       int rv = 0;
        vres->period = vres->params.period;
        vres->budget = vres->params.budget;
        set_flag(vres, UNTOUCHED);
@@ -509,7 +509,7 @@ static void* fwp_vres_tx_thread(void *_vres)
 }
 
 /*int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *epoint)*/
-int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd)
+int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd, struct in_addr  *src)
 {
        int rv = 0;
 
@@ -526,6 +526,7 @@ int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd)
        }
 
        vres->ac_sockd = sockd;
+       *src = vres->params.src;
        rv = fwp_vres_set_ac(vres->ac_sockd, vres->params.ac_id);
        if (rv)
                goto err;
index 40958ccb7775209b49caa2528f32c421cd6f4a90..f6a9b0629c8599a9bfd0f3074bc048c7abae3887 100644 (file)
@@ -96,7 +96,7 @@ int fwp_vres_consume_budget(struct fwp_vres *vres, size_t size, bool can_block);
 struct fwp_endpoint;
 int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep,
                     const void *msg, size_t size);
-int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd);
+int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd, struct in_addr *src);
 int fwp_vres_unbind(fwp_vres_t *vres);
 
 extern fwp_vres_params_t fwp_vres_params_default;