[omniNotify] org.omg.CosNotifyComm.InvalidEventType

Robert E. Gruber gruber@research.att.com
Mon Oct 7 18:04:00 2002


Janet, thanks for pointing this out, I think you found
something that is not implemented correctly.

offer_change/subscription_change both check
that the lists of added/deleted event types
are 'valid'.  Currently this check is probably too restrictive:
other than special forms (such as '*', '%ALL', '%TYPED') 
only names that consist of alphanumerics and underscore are accepted.
I believe the main issue is that wildcards together 
with other chars (such as "foo*" or "*foo" or "foo*bar") should be rejected
because the only wildcard support at the moment is when just
'*' by itself is used.  

I think dot notation *should* be allowed, and probably any string
that does not include a wildcard (plus other chars) should be allowed.

(I could not find any restrictions on the strings used as domain/type
name in the spec, but I only scanned it for about 10 minutes before
giving up.  If someone knows of any restrictions, please let me know.)

So, I will make an update and post something when it is available.

-- Bob

P.S. Not tested yet, but I am 99% sure
the fix is to remove these 30 lines from RDIEvent.h:

    if ( RDI_STR_NEQ(tseq[ix].type_name, "*") && 
	 RDI_STR_NEQ(tseq[ix].type_name, "%ANY") && 
	 RDI_STR_NEQ(tseq[ix].type_name, "%TYPED") ) {
      // first char must be alpha or underscore
      if (!RDI_IS_ALPHA_OR_UNDERSCORE(tseq[ix].type_name[(CORBA::ULong)0])) {
	invalid_index = ix;
	return 0;
      }
      // remaining chars must be alphanum or underscore
      for (i = 1; i < RDI_STRLEN(tseq[ix].type_name); i++) {
	if ( !RDI_IS_ALPHANUM_OR_UNDERSCORE(tseq[ix].type_name[i]) ) {
	  invalid_index = ix;
	  return 0;
	}
      }
    }
    if ( RDI_STR_NEQ(tseq[ix].domain_name, "*") ) {
      // first char must be alpha or underscore
      if (!RDI_IS_ALPHA_OR_UNDERSCORE(tseq[ix].domain_name[(CORBA::ULong)0])) {
	invalid_index = ix;
	return 0;
      }
      // remaining chars must be alphanum or underscore
      for (i = 1; i < RDI_STRLEN(tseq[ix].domain_name); i++) {
	if ( !RDI_IS_ALPHANUM_OR_UNDERSCORE(tseq[ix].domain_name[i]) ) {
	  invalid_index = ix;
	  return 0;
	}
      }
    }

-----Original Message-----
From: omninotify-list-admin@omniorb-support.com
[mailto:omninotify-list-admin@omniorb-support.com]On Behalf Of Janet
Tvedt
Sent: Friday, October 04, 2002 8:36 PM
To: omninotify-list@realvnc.com
Subject: [omniNotify] org.omg.CosNotifyComm.InvalidEventType


I am getting an org.omg.CosNotifyComm.InvalidEventType exception when 
a StructuredPushSupplier calls offer_change with an 
EventType("foo.bar", "baz").  However, EventType("foo", "baz") works
fine.

This dotted naming scheme is working fine for sending/receiving
structured events, even with filters.  So I am puzzled as to why
it doesn't work in this context.
    
Any ideas?

--------------------------------------------------------------------------
Janet Tvedt, National Solar Observatory/SOLIS   Email: tvedt@noao.edu
P.O. Box 26732, Tucson, AZ  85732-6732          Phone: (520) 318-8388
950 N. Cherry Ave., Tucson, AZ  85719           FAX:   (520) 318-8278

_______________________________________________
omninotify-list mailing list
omninotify-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omninotify-list