]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Use more descriptive error numbers
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Aug 2009 13:19:01 +0000 (15:19 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 13 Aug 2009 13:19:41 +0000 (15:19 +0200)
fwp/lib/fwp/fwp_vres.c

index 1bed4c9c5c94ed20b3ae8bbf00396ffdd7c70ff0..7d18567146f305ec121742aef1997e658f6e7a95 100644 (file)
@@ -468,7 +468,7 @@ int fwp_vres_send(fwp_vres_d_t vresd, struct fwp_msgb* msgb)
        if (fwp_vres_is_valid(vres)) {
                return fwp_msgq_enqueue(&vres->tx_queue, msgb);
        } else {
-               errno = EPERM;  /* TODO: Use more appropriate error than EPERM. */
+               errno = EINVAL;
                return -1;
        }
 }
@@ -487,7 +487,7 @@ int fwp_vres_bind(fwp_vres_d_t vresd, int sockd)
        }
        
        if (fwp_vres_get_flag(vres, FWP_VF_BOUND)) { /*if already bounded */
-               errno = EPERM;  
+               errno = EBUSY;
                rv = -1;
                goto err;
        }