]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/fwp/fwp_vres.c
Merge branch 'master' of frsh-forb.git.sourceforge.net:/gitroot/frsh-forb/fwp
[frescor/fwp.git] / fwp / lib / fwp / fwp_vres.c
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;