diff options
author | Emile Joubert <emile@rabbitmq.com> | 2013-03-14 14:01:55 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2013-03-14 14:01:55 +0000 |
commit | ce6f87461544756bd8ca0f5235b7ebec7e9422a8 (patch) | |
tree | bfb8b5ab30031ccbe1f35b3064cbfc390396f9a5 | |
parent | 3356b11127663b75359de18873496793e83829ee (diff) | |
parent | 6d45903f4e9a3f22b2f472adbd6bcafe14d32b90 (diff) | |
download | rabbitmq-server-ce6f87461544756bd8ca0f5235b7ebec7e9422a8.tar.gz |
Merged stable into default
-rw-r--r-- | src/rabbit_disk_monitor.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_disk_monitor.erl b/src/rabbit_disk_monitor.erl index b396b289..3bb163a1 100644 --- a/src/rabbit_disk_monitor.erl +++ b/src/rabbit_disk_monitor.erl @@ -31,6 +31,7 @@ -record(state, {dir, limit, + actual, timeout, timer, alarmed @@ -106,8 +107,8 @@ handle_call({set_check_interval, Timeout}, _From, State) -> {ok, cancel} = timer:cancel(State#state.timer), {reply, ok, State#state{timeout = Timeout, timer = start_timer(Timeout)}}; -handle_call(get_disk_free, _From, State = #state { dir = Dir }) -> - {reply, get_disk_free(Dir), State}; +handle_call(get_disk_free, _From, State = #state { actual = Actual }) -> + {reply, Actual, State}; handle_call(_Request, _From, State) -> {noreply, State}. @@ -156,7 +157,7 @@ internal_update(State = #state { limit = Limit, _ -> ok end, - State #state {alarmed = NewAlarmed}. + State #state {alarmed = NewAlarmed, actual = CurrentFreeBytes}. get_disk_free(Dir) -> get_disk_free(Dir, os:type()). |