Bug 205587 - [discovery][jmdns] registerService impl should be more robust
Summary: [discovery][jmdns] registerService impl should be more robust
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.providers (show other bugs)
Version: 1.1.0   Edit
Hardware: All Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-05 12:42 EDT by Scott Lewis CLA
Modified: 2008-05-23 15:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Lewis CLA 2007-10-05 12:42:07 EDT
Currently the jmdns provider implementation of registerService fails to detect inappropriate IServiceID.getServiceName() values.  It should check for valid information in the IServiceInfo provided to registerService, and throw exceptions if invalid data are provided.
Comment 1 Scott Lewis CLA 2007-10-05 13:03:31 EDT
Added following check to JMDSN registerService(svcInfo) implementation:

protected void checkServiceInfo(ServiceInfo serviceInfo) throws ECFException {
	final String serviceName = serviceInfo.getName();
	if (serviceName == null)
	throw new ECFException(Messages.JMDNSDiscoveryContainer_SERVICE_NAME_NOT_NULL);
}

This checks for null service names.  Additional checks to follow (for valid JMDNS names).
Comment 2 Scott Lewis CLA 2008-05-23 15:26:11 EDT
Resolving as robustness has been added via comment #1.  Also ID creation now does more syntax checking.