add CTY-2409 prefixes
[spider.git] / perl / DXUser.pm
index 6cd6ca4f14bc6df4ba2bb4bd58d8e4f07ca108e9..432507462e5048b51620d271e45307e19300f40c 100644 (file)
@@ -191,7 +191,7 @@ sub del_file
 sub process
 {
        if ($main::systime > $lasttime + 15) {
-               $dbm->sync;
+               $dbm->sync if $dbm;
                $lasttime = $main::systime;
        }
 }
@@ -249,7 +249,7 @@ sub get
        unless ($dbm->get($call, $data)) {
                $ref = decode($data);
                if ($ref) {
-                       if (UNIVERSAL::isa($ref, 'DXUser')) {
+                       if (!UNIVERSAL::isa($ref, 'DXUser')) {
                                dbg("DXUser::get: got strange answer from decode of $call". ref $ref. " ignoring");
                                return undef;
                        }