--- loncom/lonnet/perl/lonnet.pm 2006/02/09 23:22:59 1.683.2.16 +++ loncom/lonnet/perl/lonnet.pm 2006/02/10 10:00:46 1.683.2.17 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.683.2.16 2006/02/09 23:22:59 albertel Exp $ +# $Id: lonnet.pm,v 1.683.2.17 2006/02/10 10:00:46 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3722,6 +3722,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); } @@ -3732,6 +3735,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); } @@ -3744,6 +3750,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); }