]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Merge branch 'master' of molnam1@rtime.felk.cvut.cz:/var/git/frescor/fwp
authorMartin Molnar <molnam1@fel.cvut.cz>
Wed, 27 May 2009 21:56:09 +0000 (23:56 +0200)
committerMartin <molnam1@fel.cvut.cz>
Wed, 27 May 2009 21:56:09 +0000 (23:56 +0200)
Conflicts:

fwp/lib/frsh_fwp/fwp_fra.c

fwp/lib/frsh_fwp/fwp_fra.c
fwp/mngr/fwp_admctrl.c

index 5fd1a36abab45a6a1319fb85ed8e91c0ffdf94b6..451df78e8fa7d75e46a13e80c6ed59dc9747d84b 100644 (file)
@@ -83,7 +83,7 @@ static int create_vres(fres_vres_t *vres, void *priv)
        vres->priv = fwp_vresd;
 
        fres_contract_id_to_string(id, &vres->id, sizeof(id));
-       printf("Creating FWP VRes (id=%s, period=%ld ms, budget=%ld bytes AC=%d)\n",
+       ul_logmsg("Creating FWP VRes (id=%s, period=%ld ms, budget=%ld bytes AC=%d)\n",
                id, fosa_rel_time_to_msec(basic->period), 
                vparams.budget, vparams.ac_id);
        
@@ -101,7 +101,7 @@ static int cancel_vres(fres_vres_t *vres, void *priv)
 
        basic = fres_contract_get_basic(vres->allocated);
        fres_contract_id_to_string(id, &vres->id, sizeof(id));
-       printf("Canceling FWP VRes (id=%s, period=%ld ms, budget=%ld bytes)\n",
+       ul_logmsg("Canceling FWP VRes (id=%s, period=%ld ms, budget=%ld bytes)\n",
               id, fosa_rel_time_to_msec(basic->period), basic->budget.tv_sec);
 
        return 0;
index 3ab53c200dd17a5c3564a2817db36cc23ba5f0a9..62ee83f88b24434a5caeb8c2cf70bb22ecefe231 100644 (file)
 #include "fwp_idl.h"
 #include "fwp_admctrl.h"
 #include <ul_log.h>
+#include <ul_logreg.h>
 
 UL_LOG_CUST(ulogd_fwp_admctrl);
-ul_log_domain_t ulogd_frm_aqcpu = {UL_LOGL_MSG, "fwp_admctrl"};
+ul_log_domain_t ulogd_fwp_admctrl = {UL_LOGL_MSG, "fwp_admctrl"};
+UL_LOGREG_SINGLE_DOMAIN_INIT_FUNCTION(fwp_admctrl_logreg_domains, ulogd_fwp_admctrl);
 
 /* TODO: Find out the real value and determine what influences it (MTU
  *      of the interface minus header sizes?).  */
@@ -168,7 +170,7 @@ int fwp_admctrl_utilization(struct fres_sa_scenario *scenario, void *priv,
                basic = fres_contract_get_basic(c->contract);
 
                frsh_network_budget_to_bytes(FRSH_NETPF_FWP,&basic->budget,&bytes);
-               printf("  processing: id=%s, period=%ld ms, budget=%lu bytes\n",
+               ul_logmsg("processing: id=%s, period=%ld ms, budget=%lu bytes\n",
                       id,
                       fosa_rel_time_to_msec(basic->period),
                       (long unsigned int)bytes);
@@ -237,11 +239,13 @@ int fwp_admctrl_utilization(struct fres_sa_scenario *scenario, void *priv,
                goto not_schedulable;
        }
        scenario->utilization = utilization/100; /* For GUI */
-       
+
+       ul_logmsg("accepted\n");
        *schedulable = true;
        return 0;
 
 not_schedulable:
+       ul_logmsg("rejected\n");
        *schedulable = false;
        return 0;
 }