Changeset 761

Show
Ignore:
Timestamp:
03/08/07 20:41:52 (2 years ago)
Author:
hachi
Message:

Fix hook call to make it so I can throw an error state from the hook.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/filepaths-20070306/server/lib/MogileFS/Worker/Query.pm

    r728 r761  
    197197 
    198198    # first, pass this to a hook to do any manipulations needed 
    199     MogileFS::run_global_hook('cmd_create_open', $args); 
     199    { 
     200        my $rv = MogileFS::run_global_hook('cmd_create_open', $args); 
     201        return $self->err_line("plugin_aborted") 
     202            if (defined $rv && ! $rv); # undef = no hooks, 1 = success, 0 = failure 
     203    } 
     204 
    200205 
    201206    # validate parameters