[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Feb 28 21:11:50 UTC 2003


mwilkinson
Fri Feb 28 16:11:50 EST 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv10752/MOBY

Modified Files:
	Central.pm 
Log Message:
added new error message to registerService if there is a malformed payload; used to default to saying that you had not included category.
moby-live/Perl/MOBY Central.pm,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/02/21 04:10:25	1.7
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/02/28 21:11:49	1.8
@@ -1088,6 +1088,15 @@
 	my ($pkg,  $payload) = @_;
 	my ($serviceName, $serviceType, $AuthURI, $URL, $desc, $Category) = &_registerServicePayload($payload);
 
+	unless ($serviceName || $serviceType){
+		$debug && &_LOG("malformed payload  $payload\n");
+		my $reg = &Registration({
+			success => 0,
+			error_message => "malformed payload\n\n$payload",
+			registration_id => "",
+									  });
+		return $reg;
+	}
 	unless ($Category){  # throw error if parameter missing
 		$debug && &_LOG("Category missing from $payload\n");
 		my $reg = &Registration({



More information about the MOBY-guts mailing list