--- loncom/lonnet/perl/lonnet.pm 2006/02/08 23:47:00 1.708 +++ loncom/lonnet/perl/lonnet.pm 2006/02/10 10:01:32 1.709 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.708 2006/02/08 23:47:00 raeburn Exp $ +# $Id: lonnet.pm,v 1.709 2006/02/10 10:01:32 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3737,6 +3737,9 @@ sub auto_photo_permission { my $homeserver = &homeserver($cnum,$cdom); my ($outcome,$perm_reqd,$conditions) = split(/:/,&unescape(&reply('autophotopermission:'.$cdom,$homeserver)),3); + if ($outcome =~ /^(con_lost|unknown_cmd|no_such_host)$/) { + return (undef,undef); + } return ($outcome,$perm_reqd,$conditions); } @@ -3747,6 +3750,9 @@ sub auto_checkphotos { my $outcome = &unescape(&reply('autophotocheck:'.&escape($udom).':'. &escape($uname).':'.&escape($pid), $homeserver)); + if ($outcome =~ /^(con_lost|unknown_cmd|no_such_host)$/) { + return (undef,undef); + } if ($outcome) { ($result,$resulttype) = split(/:/,$outcome); } @@ -3759,6 +3765,9 @@ sub auto_photochoice { my ($update,$comment) = split(/:/,&unescape(&reply('autophotochoice:'. &escape($cdom), $homeserver))); + if ($update =~ /^(con_lost|unknown_cmd|no_such_host)$/) { + return (undef,undef); + } return ($update,$comment); }