IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13228


Ignore:
Timestamp:
May 3, 2007, 5:10:29 PM (19 years ago)
Author:
jhoblitt
Message:

fix a nasty logic bug in Nebulous::Client->replicate()

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Changes

    r13208 r13228  
    22
    330.05
     4    - fix a nasty logic bug in Nebulous::Client->replicate()
    45    - break 1:1 relationship between key names and on disk file names
    56    - overhaul Nebulous::Client->cull()
  • trunk/Nebulous/Changes

    r13208 r13228  
    22
    330.05
     4    - fix a nasty logic bug in Nebulous::Client->replicate()
    45    - break 1:1 relationship between key names and on disk file names
    56    - overhaul Nebulous::Client->cull()
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r13180 r13228  
    11# Copyright (c) 2004  Joshua Hoblitt
    22#
    3 # $Id: Client.pm,v 1.30 2007-05-03 03:21:28 jhoblitt Exp $
     3# $Id: Client.pm,v 1.31 2007-05-04 03:10:17 jhoblitt Exp $
    44
    55package Nebulous::Client;
     
    183183    $log->debug( "entered - @_" );
    184184
     185    # We have to open the instance that weren't going to copy from first.  If
     186    # we don't do this, it's possible that open will find & open the new
     187    # instance that we're in the process of creating
     188    my $fh  = $self->open( $key, 'read' );
     189    unless ( $fh ) {
     190        $log->debug( "can't open $key" );
     191        $log->debug( "leaving" );
     192
     193        return undef;
     194    }
     195
     196    # ask the server for a new instance attached to our key
    185197    my $response = $self->{ 'server' }->replicate_object( $key, @params );
    186198    if ( $response->fault ) {
     
    192204
    193205    my $res = $response->result;
    194     $log->debug( "server respone $res" );
     206    $log->debug( "server response $res" );
    195207
    196208    my $uri = URI->new($res);
    197209    my $filename = $uri->file;
    198210    $log->debug( "local filename is $filename" );
    199 
    200     my $fh  = $self->open( $key, 'read' );
    201     unless ( $fh ) {
    202         $log->debug( "can't open $key" );
    203         $log->debug( "leaving" );
    204 
    205         return undef;
    206     }
    207211
    208212    my $new_fh;
Note: See TracChangeset for help on using the changeset viewer.