]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/blobdiff - src/fwp/fwp/mngr/wifi_agent.c
Added debugging outputs
[frescor/frsh-forb.git] / src / fwp / fwp / mngr / wifi_agent.c
index 97bb2246a53d550f9a280014c44d3728a7a03d36..52395b3ce603848f45c18feda5f6eed857437c45 100644 (file)
@@ -64,8 +64,10 @@ CORBA_long wifi_agent_idl_add(wifi_agent_idl _obj, const CORBA_long rate, const
                if(sta->client_mac_addr == client_mac_addr) {
                        /*mac address is the same change only rate*/
                        pthread_mutex_lock( &frm_fwp_state->mutex );
+                       ul_logmsg("Mutex: locked - update station\n");
                        sta->rate = rate;
                        pthread_mutex_unlock( &frm_fwp_state->mutex );
+                       ul_logmsg("Mutex: unlocked - update station\n");
                        //TODO: debug
                        fres_contract_broker_redistribute_spare_capacity(frm_fwp_state->fcb, restype, resid, &env);
                        if (forb_exception_occurred(&env)) {
@@ -80,8 +82,10 @@ CORBA_long wifi_agent_idl_add(wifi_agent_idl _obj, const CORBA_long rate, const
        new_to_add->rate = rate;
        new_to_add->client_mac_addr = client_mac_addr;
        pthread_mutex_lock( &frm_fwp_state->mutex );
+       ul_logmsg("Mutex: locked - add new station\n");
        sta_list_ins_tail(&frm_fwp_state->sta_list, new_to_add);
        pthread_mutex_unlock( &frm_fwp_state->mutex );
+       ul_logmsg("Mutex: unlocked - add new station\n");
 
        return 0;
 }