ConnectionObject *GetIoConnectionForConnectionData( ConnectionObject *connection_object, EipUint16 *extended_error) { ConnectionObject *io_connection = NULL; *extended_error = 0; io_connection = GetExclusiveOwnerConnection(connection_object, extended_error); if (NULL == io_connection) { if (0 == *extended_error) { /* we found no connection and don't have an error so try input only next */ io_connection = GetInputOnlyConnection(connection_object, extended_error); if (NULL == io_connection) { if (0 == *extended_error) { /* we found no connection and don't have an error so try listen only next */ io_connection = GetListenOnlyConnection(connection_object, extended_error); if ((NULL == io_connection) && (0 == *extended_error)) { /* no application connection type was found that suits the given data */ /* TODO check error code VS */ *extended_error = kConnectionManagerStatusCodeInconsistentApplicationPathCombo; } else { connection_object->instance_type = kConnectionTypeIoListenOnly; } } } else { connection_object->instance_type = kConnectionTypeIoInputOnly; } } } else { connection_object->instance_type = kConnectionTypeIoExclusiveOwner; } if (NULL != io_connection) { CopyConnectionData(io_connection, connection_object); } return io_connection; }
output_assembly; g_listen_only_connections[connection_number].input_assembly = input_assembly; g_listen_only_connections[connection_number].config_assembly = config_assembly; } } ConnectionObject *GetIoConnectionForConnectionData( ConnectionObject *const RESTRICT connection_object, EipUint16 *const extended_error) { *extended_error = 0; ConnectionObject *io_connection = GetExclusiveOwnerConnection( connection_object, extended_error); if (NULL == io_connection) { if (0 == *extended_error) { /* we found no connection and don't have an error so try input only next */ io_connection = GetInputOnlyConnection(connection_object, extended_error); if (NULL == io_connection) { if (0 == *extended_error) { /* we found no connection and don't have an error so try listen only next */ io_connection = GetListenOnlyConnection(connection_object, extended_error); if ( (NULL == io_connection) && (0 == *extended_error) ) { /* no application connection type was found that suits the given data */ /* TODO check error code VS */ *extended_error = kConnectionManagerExtendedStatusCodeInconsistentApplicationPathCombo;