Return PRECONDITION_NOT_MET if security not supported
As opposed to NOT_ALLOWED_BY_SECURITY. There is a meaningful difference between something being disallowed and something being impossible. Co-Authored-By: Kyle Fazzari <github@status.e4ward.com> Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									ecbd585f12
								
							
						
					
					
						commit
						d82b7fdd73
					
				
					 2 changed files with 16 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -739,8 +739,22 @@ dds_set_listener(dds_entity_t entity, const dds_listener_t * listener);
 | 
			
		|||
 *
 | 
			
		||||
 * @retval >0
 | 
			
		||||
 *             A valid participant handle.
 | 
			
		||||
 * @retval DDS_RETCODE_NOT_ALLOWED_BY_SECURITY
 | 
			
		||||
 *             An invalid DDS Security configuration was specified (whether
 | 
			
		||||
 *             that be missing or incorrect entries, expired certificates,
 | 
			
		||||
 *             or anything else related to the security settings and
 | 
			
		||||
 *             implementation).
 | 
			
		||||
 * @retval DDS_RETCODE_PRECONDITION_NOT_MET
 | 
			
		||||
 *             Some security properties specified in the QoS, but the Cyclone
 | 
			
		||||
 *             build does not include support for DDS Security.
 | 
			
		||||
 * @retval DDS_RETCODE_OUT_OF_RESOURCES
 | 
			
		||||
 *             Some resource limit (maximum participants, memory, handles,
 | 
			
		||||
 *             &c.) prevented creation of the participant.
 | 
			
		||||
 * @retval DDS_RETCODE_ERROR
 | 
			
		||||
 *             An internal error has occurred.
 | 
			
		||||
 *             The "CYCLONEDDS_URI" environment variable lists non-existent
 | 
			
		||||
 *             or invalid configuration files, or contains invalid embedded
 | 
			
		||||
 *             configuration items; or an unspecified internal error has
 | 
			
		||||
 *             occurred.
 | 
			
		||||
 */
 | 
			
		||||
DDS_EXPORT dds_entity_t
 | 
			
		||||
dds_create_participant(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -966,7 +966,7 @@ dds_return_t new_participant_guid (ddsi_guid_t *ppguid, struct ddsi_domaingv *gv
 | 
			
		|||
  {
 | 
			
		||||
    /* disallow creating a participant with a security configuration if there is support for security
 | 
			
		||||
       has been left out */
 | 
			
		||||
    ret = DDS_RETCODE_NOT_ALLOWED_BY_SECURITY;
 | 
			
		||||
    ret = DDS_RETCODE_PRECONDITION_NOT_MET;
 | 
			
		||||
    goto not_allowed;
 | 
			
		||||
  }
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue