% cd /usr/local/ilu/src % patch -p0 < /usr/local/ilu/src/this-patch [...various output from the patch program...] %
*** 1.3 1996/06/12 23:05:27 --- GSS/kernel/makefile.default 1997/11/27 03:23:45 *************** *** 1,6 **** --- 1,11 ---- ## This is a hand-edited version of an automatically-generated Makefile. ## Edit at your peril! ## + ########################################################################## + # + # The following should be changed to suit your machine and installation + # + ########################################################################## DESTDIR = /usr/local/lib CDEBUGFLAGS = -g *************** *** 12,17 **** --- 17,28 ---- RM = rm -f SED = sed + ########################################################################## + # + # Nothing below this should need to be changed + # + ########################################################################## + ALL_INCLUDES = -I. $(LOCALINCLUDES) $(INCLUDES) ALL_DEFINES = $(STD_DEFINES) $(DEFINES) $(BSDDEFINE) $(POSIXDEFINE) CFLAGS = $(COMPILERFLAGS) $(CDEBUGFLAGS) $(ALL_INCLUDES) $(ALL_DEFINES) *************** *** 37,43 **** $(RM) $@ $(ANSI_C_COMPILER) -c $(CFLAGS) $*.c ! GSSOBJS = gss_impl.o gss_util.o gss_opaque.o gss_oidtbl.o gss_asn1.o gss_debug.o nil_scheme.o gss_x500_ns.o rfc822_ns.o gss_ext.o anon_ns.o libgss.a: $(GSSOBJS) $(RM) $@ --- 48,54 ---- $(RM) $@ $(ANSI_C_COMPILER) -c $(CFLAGS) $*.c ! GSSOBJS = gss_impl.o gss_util.o gss_oidtbl.o gss_asn1.o gss_debug.o nil_scheme.o gss_x500_ns.o rfc822_ns.o gss_ext.o anon_ns.o libgss.a: $(GSSOBJS) $(RM) $@
*** 1.50 1997/11/19 05:20:54 --- runtime/python/iluRt.py 1997/11/27 04:02:21 *************** *** 118,127 **** return '<%s:%s>' % (self.__ilu_type_name__, self.__dict__) def __cmp__(self, other): ! if (self.__dict__ < other.__dict__): ! return -1 ! elif (self.__dict__ == other.__dict__): ! return 0 else: return 1 --- 118,130 ---- return '<%s:%s>' % (self.__ilu_type_name__, self.__dict__) def __cmp__(self, other): ! if (type(self) == type(other)): ! if (self.__dict__ < other.__dict__): ! return -1 ! elif (self.__dict__ == other.__dict__): ! return 0 ! else: ! return 1 else: return 1 *************** *** 245,254 **** self.__typecode = typecode self.__pickled_value = PickleValue(value[0], typecode.id()) def __cmp__(self, other): ! if (self.__pickled_value < other.__pickled_value): ! return -1 ! elif (self.__pickled_value == other.__pickled_value): ! return 0 else: return 1 def __str__(self): --- 248,260 ---- self.__typecode = typecode self.__pickled_value = PickleValue(value[0], typecode.id()) def __cmp__(self, other): ! if (type(other) == type(self)): ! if (self.__pickled_value < other.__pickled_value): ! return -1 ! elif (self.__pickled_value == other.__pickled_value): ! return 0 ! else: ! return 1 else: return 1 def __str__(self):
*** 1.224 1997/11/25 22:18:42 --- runtime/python/iluPrmodule.c 1997/12/12 21:36:21 *************** *** 127,132 **** --- 127,135 ---- static bootstrap_rock gc_alarm_rock = { cleanupUninterestingObjects, ILU_NIL }; + static ilu_Mutex ilupython_MainLoopMutex = ILU_NIL; + static ilu_Condition ilupython_MainLoopCondition = ILU_NIL; + #define current_thread_id() PyInt_FromLong(get_thread_ident()) #endif /* ILU_PYTHON_THREADS */ *************** *** 2571,2581 **** #ifdef ILU_PYTHON_THREADS if (ilupython_threaded_operation) { ! indicator->val = 0; ! while (!indicator->val) ! { ! CALL_KERNEL(ilupython_threaded_operation, OS_SLEEP(30)); ! } } else #endif /* ILU_PYTHON_THREADS */ --- 2574,2596 ---- #ifdef ILU_PYTHON_THREADS if (ilupython_threaded_operation) { ! ilu_AcquireMutex(ilupython_MainLoopMutex); ! while (!indicator->val) { ! CALL_KERNEL(ilupython_threaded_operation, ! ilu_CMWait1(ilupython_MainLoopCondition, ilupython_MainLoopMutex, &lerr)); ! if (ILU_ERRNOK(lerr)) ! { ! char msg[256]; ! ! sprintf(msg, "ILU internal error on " ! "ilu_CMWait1(ilupython_MainLoopCondition, ilupython_MainLoopMutex): %s", ! ILU_ERR_NAME(lerr)); ! ILU_HANDLED(lerr); ! PyErr_SetString(_ilupython_GeneralError, msg); ! return 0; ! } ! } ! ilu_ReleaseMutex(ilupython_MainLoopMutex); } else #endif /* ILU_PYTHON_THREADS */ *************** *** 2604,2609 **** --- 2619,2625 ---- ilumod_ExitMainLoop(PyObject *self, PyObject *args) { IlulpObject *indicator; + ilu_Error lerr; if (!PyArg_Parse(args, "O", &indicator)) return 0; *************** *** 2612,2618 **** PyErr_SetString(PyExc_TypeError, "arg1 should be ILU loop handle"); return 0; } ! ilu_ExitMainLoop(&indicator->val); Py_INCREF(Py_None); return Py_None; } --- 2628,2648 ---- PyErr_SetString(PyExc_TypeError, "arg1 should be ILU loop handle"); return 0; } ! #ifdef ILU_PYTHON_THREADS ! if (ilupython_threaded_operation) { ! ilu_AcquireMutex(ilupython_MainLoopMutex); ! indicator->val = 1; ! ilu_ReleaseMutex(ilupython_MainLoopMutex); ! ilu_CondNotify (ilupython_MainLoopCondition, &lerr); ! if (ILU_ERRNOK(lerr)) { ! char buf[1000]; ! _ilupython_formErrDescription (buf, &lerr); ! ilu_DebugPrintf ("ilu: Problem notifying main loop condition variable: %s\n", buf); ! ILU_HANDLED(lerr); ! } ! } else ! #endif /* ILU_PYTHON_THREADS */ ! ilu_ExitMainLoop(&indicator->val); Py_INCREF(Py_None); return Py_None; } *************** *** 7419,7429 **** PyDict_SetItemString(reset, "MaxSimultaneousConnections", PyInt_FromLong(MaxSimultaneousConnections)); return reset; #else /* def ENABLE_DEBUGGING */ ! PyErr_SetString(IluGeneralError, "Compiled without support for debugging"); return 0; #endif /* def ENABLE_DEBUGGING */ #else /* def TCPIP_TRANSPORT */ ! PyErr_SetString(IluGeneralError, "TCP/IP support not configured in"); return 0; #endif /* TCPIP_TRANSPORT */ } --- 7449,7459 ---- PyDict_SetItemString(reset, "MaxSimultaneousConnections", PyInt_FromLong(MaxSimultaneousConnections)); return reset; #else /* def ENABLE_DEBUGGING */ ! PyErr_SetString(_ilupython_GeneralError, "Compiled without support for debugging"); return 0; #endif /* def ENABLE_DEBUGGING */ #else /* def TCPIP_TRANSPORT */ ! PyErr_SetString(_ilupython_GeneralError, "TCP/IP support not configured in"); return 0; #endif /* TCPIP_TRANSPORT */ } *************** *** 7439,7445 **** oldsize = ilu_tcp_SetDefaultBuffersize(size); return PyInt_FromLong(oldsize); #else ! PyErr_SetString(IluGeneralError, "TCP/IP support not configured in"); return 0; #endif /* TCPIP_TRANSPORT */ } --- 7469,7475 ---- oldsize = ilu_tcp_SetDefaultBuffersize(size); return PyInt_FromLong(oldsize); #else ! PyErr_SetString(_ilupython_GeneralError, "TCP/IP support not configured in"); return 0; #endif /* TCPIP_TRANSPORT */ } *************** *** 8043,8048 **** --- 8073,8093 ---- sprintf(msg, "failed to initialize kernel threads: %s", ILU_ERR_NAME(err)); ILU_HANDLED(err); + PyErr_SetString(_ilupython_GeneralError, msg); + return 0; + } + + if ((ilupython_MainLoopMutex = ilu_CreateMutex("Python", "main loop")) == ILU_NIL) + { + PyErr_SetString(_ilupython_GeneralError, "failed to create ilupython_MainLoopMutex"); + return 0; + } + if (ilupython_MainLoopCondition = ilu_CreateCondition("Python", "main loop", &err), ILU_ERRNOK(err)) + { + char msg[1000]; + strcpy (msg, "failed to create ilupython_MainLoopCondition: "); + _ilupython_formErrDescription(msg + strlen(msg), &err); + ILU_HANDLED(err); PyErr_SetString(_ilupython_GeneralError, msg); return 0; }
*** 1.18 1997/11/26 20:00:50 --- runtime/c/ilucstub.h 1997/12/03 07:07:30 *************** *** 274,281 **** ILU_RUNTIME_PUBLIC void * _ILU_C_Enumeration__Input (ilu_Call, void *, ilu_Error *); ILU_RUNTIME_PUBLIC void _ILU_C_Enumeration__Output (ilu_Call, void *, ilu_Error *); /* Main invariant holds */ ! ILU_RUNTIME_PUBLIC void _ILU_C_SetProtocolError (CORBA_Environment *, ilu_ProtocolException, ilu_Error *); /* Main invariant holds */ ILU_RUNTIME_PUBLIC ilu_boolean _ILU_C_CheckSibling (ILU_C_Object *disc, --- 274,296 ---- ILU_RUNTIME_PUBLIC void * _ILU_C_Enumeration__Input (ilu_Call, void *, ilu_Error *); ILU_RUNTIME_PUBLIC void _ILU_C_Enumeration__Output (ilu_Call, void *, ilu_Error *); + ILU_RUNTIME_PUBLIC ilu_cardinal _ILU_C_SizeExtensibleRecord (ilu_Call, void *, ilu_Error *); + ILU_RUNTIME_PUBLIC void _ILU_C_OutputExtensibleRecord (ilu_Call, void *, ilu_Error *); + ILU_RUNTIME_PUBLIC void _ILU_C_InputExtensibleRecord (ilu_Call, void **, ilu_Error *); + /* Main invariant holds */ ! ILU_RUNTIME_PUBLIC void ! _ILU_C_SetProtocolError(CORBA_Environment *, ! ilu_ProtocolException); ! /* ! * Set the given CORBA_Environment to indicate the system exception ! * corresponding to the given ilu_ProtocolException, if appropriate. ! * It's not appropriate exactly when the given ilu_ProtocolException ! * is either ilu_ProtocolException_Success or ! * ilu_ProtocolException_Not; in the latter case it's the caller's ! * responsiblity to get the information from the corresponding ! * ilu_Error into the CORBA_Environment. ! */ /* Main invariant holds */ ILU_RUNTIME_PUBLIC ilu_boolean _ILU_C_CheckSibling (ILU_C_Object *disc, *** 1.206 1997/11/26 20:00:50 --- runtime/c/ilu.c 1997/12/03 07:07:28 *************** *** 3066,3071 **** --- 3066,3077 ---- return (p-str); } + /* + * (*status) and (*err) are OUT parameters. Returns with (*status) + * ready for a call on CORBA_exception_free. When (*err) indicates + * an error, it's local and (*status) isn't all the thrower wanted + * it to be. + */ /*Main Invariant, Call-IHi(call)*/ static ilu_boolean _ILU_C_CatchException(ilu_Call call, ilu_Method method, *************** *** 3092,3097 **** --- 3098,3104 ---- status->_major = ILU_C_USER_EXCEPTION; status->returnCode = ((ILU_C_ExceptionCode) method->me_exceptionVector[exceptionIndex - 1]); + status->freeRoutine = 0; valsize = evec[exceptionIndex - 1].size; if (valsize > 0) { status->ptr = (void *) ilu_MallocE(valsize, err); *************** *** 3108,3113 **** --- 3115,3123 ---- if (ILU_ERRNOK(*err)) return ilu_FALSE; status->freeRoutine = evec[exceptionIndex - 1].freeFn; + } else { + status->ptr = ILU_NIL; + ILU_CLER(*err); } } return ilu_TRUE; *************** *** 3314,3322 **** ILU_C_ImplicitArgs ia; ILU_C_InterruptHandle intH = ILU_NIL; ILU_C_COMPLETIONSTATUS completed = CORBA_COMPLETED_NO; ! ilu_ProtocolException protocolErr; ! ILU_CLER(err); if ((ia = _ILU_C_CurrentContext()) != ILU_NIL) { si = ia->ilu_serializer; --- 3324,3332 ---- ILU_C_ImplicitArgs ia; ILU_C_InterruptHandle intH = ILU_NIL; ILU_C_COMPLETIONSTATUS completed = CORBA_COMPLETED_NO; ! ilu_ProtocolException protocolErr = ilu_ProtocolException_Success; ! ILU_C_SET_SUCCESSFUL(status); if ((ia = _ILU_C_CurrentContext()) != ILU_NIL) { si = ia->ilu_serializer; *************** *** 3325,3331 **** }; (void) ilu_FullStartCall(call, discriminant->server->ilucs_ks, class, ! method, MyLangIdx(), pp, si, pl, &newconn, &err); if (newconn != ILU_NIL) (*Fork) (MonitorOutgoingConnection, newconn); if (ILU_ERRNOK(err)) --- 3335,3342 ---- }; (void) ilu_FullStartCall(call, discriminant->server->ilucs_ks, class, ! method, MyLangIdx(), pp, si, pl, &newconn, ! &err); if (newconn != ILU_NIL) (*Fork) (MonitorOutgoingConnection, newconn); if (ILU_ERRNOK(err)) *************** *** 3334,3343 **** if (intH != ILU_NIL) if (!AddCallToIH(call, intH)) { ILU_C_RAISE_SYSTEM(status, NO_MEMORY, 0, NO); ! goto cerr; } do { /* call until we don't get a transient/retry error */ needs_sizing = ilu_CallNeedsSizing(call); --- 3345,3355 ---- if (intH != ILU_NIL) if (!AddCallToIH(call, intH)) { ILU_C_RAISE_SYSTEM(status, NO_MEMORY, 0, NO); ! goto SErr; } do { /* call until we don't get a transient/retry error */ + /* (*status) is success, (err) is success, (p..Err) is Success */ needs_sizing = ilu_CallNeedsSizing(call); *************** *** 3347,3359 **** else { if ((kobj = _ILU_C_KernelObjOfObj(discriminant)) == ILU_NIL) { ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO); ! goto cerr; } size = ilu_SizeOfObjectID(call, kobj, ilu_TRUE, class, &err); ilu_ExitServer(discriminant->server->ilucs_ks, ilu_ClassOfObject(kobj)); if (ILU_ERRNOK(err)) ! goto kerr; } if (needs_sizing) { --- 3359,3371 ---- else { if ((kobj = _ILU_C_KernelObjOfObj(discriminant)) == ILU_NIL) { ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO); ! goto SErr; } size = ilu_SizeOfObjectID(call, kobj, ilu_TRUE, class, &err); ilu_ExitServer(discriminant->server->ilucs_ks, ilu_ClassOfObject(kobj)); if (ILU_ERRNOK(err)) ! goto KErr; } if (needs_sizing) { *************** *** 3361,3377 **** if (parms[i].parm_in) { if (parms[i].parm_needs_dereference) size += _ILU_C_SizeOfValue (parms[i].parm_type, call, ! *((void **) parms[i].parm_val), &err); else size += _ILU_C_SizeOfValue (parms[i].parm_type, call, parms[i].parm_val, &err); ! if (ILU_ERRNOK(err)) goto kerr; } } } if (!ilu_StartRequest(call, size, &err)) ! goto kerr; /* marshall discriminant */ --- 3373,3390 ---- if (parms[i].parm_in) { if (parms[i].parm_needs_dereference) size += _ILU_C_SizeOfValue (parms[i].parm_type, call, ! *((void **) parms[i].parm_val), ! &err); else size += _ILU_C_SizeOfValue (parms[i].parm_type, call, parms[i].parm_val, &err); ! if (ILU_ERRNOK(err)) goto KErr; } } } if (!ilu_StartRequest(call, size, &err)) ! goto KErr; /* marshall discriminant */ *************** *** 3380,3390 **** if ((kobj = _ILU_C_KernelObjOfObj (discriminant)) == ILU_NIL) { ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO); ! goto cerr; } ilu_OutputObjectID(call, kobj, ilu_TRUE, class, &err); if (ILU_ERRNOK(err)) ! goto kerr; } /* marshall other arguments */ --- 3393,3403 ---- if ((kobj = _ILU_C_KernelObjOfObj (discriminant)) == ILU_NIL) { ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO); ! goto SErr; } ilu_OutputObjectID(call, kobj, ilu_TRUE, class, &err); if (ILU_ERRNOK(err)) ! goto KErr; } /* marshall other arguments */ *************** *** 3397,3410 **** else _ILU_C_OutputValue (parms[i].parm_type, call, parms[i].parm_val, &err); ! if (ILU_ERRNOK(err)) goto kerr; } } /* finish the request */ completed = CORBA_COMPLETED_MAYBE; ! if (!ilu_FinishRequest (call, &err)) goto kerr; /* is there a reply? */ --- 3410,3423 ---- else _ILU_C_OutputValue (parms[i].parm_type, call, parms[i].parm_val, &err); ! if (ILU_ERRNOK(err)) goto KErr; } } /* finish the request */ completed = CORBA_COMPLETED_MAYBE; ! if (!ilu_FinishRequest (call, &err)) goto KErr; /* is there a reply? */ *************** *** 3418,3482 **** (err.ilu_type == ILU_ERRTYP(transient)) && (ILU_ERRSEL(transient,err).minor == ilu_tm_retry)); ! if (! method->me_asynchronous) { ! if (protocolErr == ilu_ProtocolException_Success) ! { ! completed = CORBA_COMPLETED_YES; ! /* check to see if the user signalled Success (exceptionIndex == 0) */ ! if (i == 0) /* i is the exception index. A value of 0 means "no exception". */ ! { ! status->returnCode = ILU_NIL; ! status->_major = ILU_C_NO_EXCEPTION; ! ! /* read in any return results */ ! ! for (i = 0; i < nparms; i++) { ! if (parms[i].parm_out) { ! if (parms[i].parm_in && (parms[i].parm_type->freeFn != 0)) { ! (*parms[i].parm_type->freeFn)(parms[i].parm_val); ! } ! if (parms[i].parm_needs_assignment) ! *((void **)(parms[i].parm_val)) = ! _ILU_C_InputValue (parms[i].parm_type, call, ! ILU_NIL, &err); ! else ! _ILU_C_InputValue (parms[i].parm_type, call, ! parms[i].parm_val, &err); ! if (ILU_ERRNOK(err)) goto kerr; ! } } ! } ! ! else ! /* indicates user signalled an expected exception */ ! { ! if (!_ILU_C_CatchException(call, method, evec, status, i, &err)) ! goto kerr; } ! if (!ilu_ReplyRead (call, &err)) ! goto kerr; ! } ! else { ! _ILU_C_SetProtocolError (status, protocolErr, &err); ! goto cerr; } ! }; ! cerr: /* used for errors signalled via "status" */ ilu_FinishCall(call, &err); goto the_end; ! kerr: /* used for errors signalled via "err" */ ! ! { ! ilu_Error lerr = err; ! ilu_FinishCall (call, &lerr); ! ILU_HANDLED(lerr); ! if (ILU_ERROK(err)) ! goto the_end; ! } kerrWithoutCall: --- 3431,3509 ---- (err.ilu_type == ILU_ERRTYP(transient)) && (ILU_ERRSEL(transient,err).minor == ilu_tm_retry)); ! /** (*status) is success; ! (err) is failure iff (p..Err) is .._Not; ! asynch => ((err) is success && (p..Err) is Success) */ ! if (!method->me_asynchronous) { ! if (protocolErr == ilu_ProtocolException_Success) { ! completed = CORBA_COMPLETED_YES; ! /* ! * check to see if the user signalled Success (exceptionIndex ! * == 0) ! */ ! if (i == 0) { /* i is the exception index. A ! * value of 0 means "no exception". */ ! status->returnCode = ILU_NIL; ! status->_major = ILU_C_NO_EXCEPTION; ! ! /* read in any return results */ ! ! for (i = 0; i < nparms; i++) { ! if (parms[i].parm_out) { ! if (parms[i].parm_in && (parms[i].parm_type->freeFn != 0)) { ! (*parms[i].parm_type->freeFn) (parms[i].parm_val); } ! if (parms[i].parm_needs_assignment) ! *((void **) (parms[i].parm_val)) = ! _ILU_C_InputValue(parms[i].parm_type, call, ! ILU_NIL, &err); ! else ! _ILU_C_InputValue(parms[i].parm_type, call, ! parms[i].parm_val, &err); ! if (ILU_ERRNOK(err)) ! goto KErr; } ! } ! } else ! /* indicates user signalled an expected exception */ { ! if (!_ILU_C_CatchException(call, method, evec, status, i, &err)) ! goto KSErr; } ! /* (*status) is from callee; err is success; p..Err is Success */ ! if (!ilu_ReplyRead(call, &err)) ! goto KSErr; ! } else { ! /** (*status) is success; ! protocolErr is not .._Success; ! (err) is local failure iff protocolErr is .._Not */ ! _ILU_C_SetProtocolError(status, protocolErr); ! /* (*status) is callee's; (err) is local; p..Err is irrelevant */ ! goto KSErr; ! } ! } else { ! /* (*status) is success; (err) is success; (p..Err) is Success */ ! } ! goto KSErr; ! KErr: /* (*status) is success; err is local exn; p..Err is irrelevant */ ! KSErr: /* (*status) is from callee; err is local; p..Err is irrelevant */ ilu_FinishCall(call, &err); + if (ILU_ERRNOK(err)) { + CORBA_exception_free(status); + _ILU_C_ConvertError(status, &err, completed); + } goto the_end; ! SErr: /* (*status) is local exn; err is success; p..Err is irrelevant */ ! ! ilu_FinishCall(call, &err); ! if (ILU_C_SUCCESSFUL(status)) ! _ILU_C_ConvertError(status, &err, completed); ! else ! ILU_HANDLED(err); ! goto the_end; kerrWithoutCall: *************** *** 3528,3538 **** ilu_Error *err) { ilu_string type_id; ! CORBA_TypeCode tc; ! type_id = ilu_PickleType (p, err); ! if (ILU_ERRNOK(*err)) return ILU_NIL; ! tc = _ILU_C_LookupIoFns(type_id); if (tc == ILU_NIL) { /* this type unknown in this LSR */ ILU_CLER(*err); any->_type = ILU_NIL; --- 3555,3588 ---- ilu_Error *err) { ilu_string type_id; ! CORBA_TypeCode tc = ILU_NIL; ! ilu_TypeKind tk; ! ilu_string *types = ILU_NIL; ! ilu_cardinal ntypes, i; ! tk = ilu_PickleTypeKind(p, err); ! if (ILU_ERRNOK(*err)) { ! ILU_HANDLED(*err); ! tk = ilu_byte_tk; ! }; ! if ((tk == ilu_record_tk) || (tk == ilu_object_tk)) { ! if (!ilu_PickleTypes (p, &types, &ntypes, err)) ! return ILU_NIL; ! } else { ! type_id = ilu_PickleType (p, err); ! if (ILU_ERRNOK(*err)) return ILU_NIL; ! types = &type_id; ! ntypes = 1; ! } ! for (i = 0; i < ntypes; i++) { ! if ((tc = _ILU_C_LookupIoFns(types[i])) != ILU_NIL) ! break; ! }; ! if ((tk == ilu_record_tk) || (tk == ilu_object_tk)) { ! for (i = 0; i < ntypes; i++) ! ilu_free(types[i]); ! ilu_free(types); ! } if (tc == ILU_NIL) { /* this type unknown in this LSR */ ILU_CLER(*err); any->_type = ILU_NIL; *************** *** 3810,3815 **** --- 3860,3924 ---- CORBA_any* CORBA_any_alloc () { return ((CORBA_any*) CORBA_sequence_CORBA_any_allocbuf(1)); + } + + ilu_cardinal + _ILU_C_SizeExtensibleRecord (ilu_Call call, void *val, ilu_Error *err) + { + #ifndef ADD_TYPE_REGISTRATION_SUPPORT + ilu_DebugPrintf("** Use of extensible records requires configuration of support for type registration,\n" + "** which this ILU C LSR library doesn't have!\n"); + #else + struct dummy { ILU_C_IoFnsRegistration __type; }; + CORBA_any temp; + temp._type = (CORBA_TypeCode) ((struct dummy *) val)->__type; + temp._value = val; + return (_CORBA_any__SizeOf(call, &temp, err)); + #endif /* ndef ADD_TYPE_REGISTRATION_SUPPORT */ + } + + void + _ILU_C_OutputExtensibleRecord (ilu_Call call, void *val, ilu_Error *err) + { + #ifndef ADD_TYPE_REGISTRATION_SUPPORT + ilu_DebugPrintf("** Use of extensible records requires configuration of support for type registration,\n" + "** which this ILU C LSR library doesn't have!\n"); + #else + struct dummy { ILU_C_IoFnsRegistration __type; }; + CORBA_any temp; + temp._type = (CORBA_TypeCode) ((struct dummy *) val)->__type; + temp._value = val; + _CORBA_any__Output(call, &temp, err); + #endif /* ndef ADD_TYPE_REGISTRATION_SUPPORT */ + } + + void + _ILU_C_InputExtensibleRecord (ilu_Call call, void **val, ilu_Error *err) + { + #ifndef ADD_TYPE_REGISTRATION_SUPPORT + ilu_DebugPrintf("** Use of extensible records requires configuration of support for type registration,\n" + "** which this ILU C LSR library doesn't have!\n"); + #else + CORBA_any temp; + ilu_string *type_ids = ILU_NIL; + ilu_cardinal n_type_ids, i; + void *tempval; + + ilu_boolean autounpickling; + autounpickling = ILU_C_AutomaticUnpickling; + ILU_C_AutomaticUnpickling = ilu_FALSE; + _CORBA_any__Input(call, &temp, err); + ILU_C_AutomaticUnpickling = autounpickling; + if (ILU_ERRNOK(*err)) return; + /* Check subtype relationship... */ + _ILU_C_PickleToAny (temp._pickle, &temp, err); + if (ILU_ERRNOK(*err)) { + CORBA_any__Free(&temp); + return; + }; + *val = temp._value; + ILU_CLER(*err); + #endif /* ndef ADD_TYPE_REGISTRATION_SUPPORT */ } #endif /* ADD_VARIANT_SUPPORT */ *** 1.40 1997/11/21 03:14:28 --- runtime/c/orb.c 1997/12/03 07:03:55 *************** *** 19,27 **** #include #include "ilucpvt.h" ! void _ILU_C_SetProtocolError (CORBA_Environment *status, ilu_ProtocolException perror, ilu_Error * err) { CORBA_ex_body *eb = ilu_must_malloc(sizeof(CORBA_ex_body)); status->_major = CORBA_SYSTEM_EXCEPTION; --- 19,27 ---- #include #include "ilucpvt.h" ! void _ILU_C_SetProtocolError (CORBA_Environment *status, ilu_ProtocolException perror) { CORBA_ex_body *eb = ilu_must_malloc(sizeof(CORBA_ex_body)); status->_major = CORBA_SYSTEM_EXCEPTION; *************** *** 64,92 **** ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE; break; ! case ilu_ProtocolException_Not: ! /* xxx should really cover more cases here */ ! ILU_ERR_SWITCH(*err) { ! ILU_SUCCESS_CASE { ! /* hmmm very strange */ ! status->returnCode = ex_CORBA_UNKNOWN; ! ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE; ! } ! ILU_ERR_CASE(inv_objref, v) { ! status->returnCode = ex_CORBA_INV_OBJREF; ! eb->minor = (ILU_ERRSEL(inv_objref, *err).minor); ! } ! ILU_ERR_ELSE { ! status->returnCode = ex_CORBA_UNKNOWN; ! ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE; ! } ! } ! ILU_ERR_ENDSWITCH; ! ILU_HANDLED(*err); ! ILU_CLER(*err); ! break; default: break; } --- 64,75 ---- ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE; break; ! case ilu_ProtocolException_Not: ! break; default: + status->returnCode = ex_CORBA_UNKNOWN; + ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE; break; } *** 1.230 1997/11/25 04:50:05 --- runtime/kernel/call.c 1997/12/03 06:55:03 *************** *** 32,43 **** --- 32,57 ---- #include "server.h" #include "type.h" + #if 1 + + #define ILU_WaitRem(call) \ + (call->ca_disownWait \ + ? (call->ca_connection && call->ca_connection->co_waiting \ + && call->ca_connection->co_waiting != call) \ + : ((call->ca_ms==ilu_cmsHi && call->ca_msInput && !call->ca_dontWait)\ + == (call->ca_connection \ + && call->ca_connection->co_waiting == call))) + + #else + #define ILU_WaitRem(call) \ ((call->ca_connection && call->ca_connection->co_waiting==call) \ == \ (call->ca_disownWait || \ (call->ca_ms==ilu_cmsHi && call->ca_msInput && !call->ca_dontWait))) + #endif + /*L1, L2 unconstrained*/ const char *const ilu_PENames[ilu_ProtocolException_Not + 1] = { *************** *** 654,660 **** ILU_ERR_ELSE 0 /* statement with no effect */ ; } ILU_ERR_ENDSWITCH; ! _ilu_Assert(ILU_WaitRem(call), "ilu_FinishCall locking wrt wait"); s = call_server(call); conn = call_connection(call); proto = conn ? connection_protocol(conn) : NIL; --- 668,676 ---- ILU_ERR_ELSE 0 /* statement with no effect */ ; } ILU_ERR_ENDSWITCH; ! /* (*err) may indicate incoming error; lerr = success */ ! _ilu_Assert(closeconn || ILU_WaitRem(call), ! "ilu_FinishCall locking wrt wait"); s = call_server(call); conn = call_connection(call); proto = conn ? connection_protocol(conn) : NIL; *************** *** 695,702 **** } /** L2 >= {call's conn's callmu, iomu}; L2 >= {waitmu} iff ca_disownWait || ca_msInput && !ca_dontWait */ if (closeconn) ! _ilu_CloseIoingConnection(conn, TRUE, ilu_ConnShutdownReason_LostProtocolSync); else { if (call->ca_ios == ilu_ciosNone && (!call_incoming(call) || --- 711,720 ---- } /** L2 >= {call's conn's callmu, iomu}; L2 >= {waitmu} iff ca_disownWait || ca_msInput && !ca_dontWait */ + /* (*err) may indicate incoming error; lerr = success */ if (closeconn) ! _ilu_CloseIoingConnection(conn, TRUE, ! ilu_ConnShutdownReason_LostProtocolSync); else { if (call->ca_ios == ilu_ciosNone && (!call_incoming(call) || *************** *** 722,727 **** --- 740,746 ---- if (!ilu_Check(FALSE, &lerr)) goto dunX; } + /* (*err) may indicate incoming error; lerr = success */ if (call_incoming(call) && (call->ca_pe != ilu_ProtocolException_Success || ILU_ERRNOK(*err))) { *************** *** 749,754 **** --- 768,774 ---- goto dunX; } dunX: + /* (*err) and lerr may each have error; (*err) has priority. */ if (!ilu_ReEnterMutex(ilu_cmu, err)) return; if (!_ilu_EnterServerMutex(s, TRUE, err)) *************** *** 758,787 **** *err = lerr; else ILU_HANDLED(lerr); ILU_ERR_SWITCH(*err) { ILU_SUCCESS_CASE 0 /* no effect */ ; ILU_ERR_CASE(comm_failure, v) ! _ilu_CloseIoingConnection(conn, TRUE, ilu_ConnShutdownReason_LostProtocolSync); ILU_ERR_ELSE 0 /* no effect */ ; } ILU_ERR_ENDSWITCH; } if (proto != NIL && proto->pr_prefinish_call != NULLFN) (void) (*proto->pr_prefinish_call) (call, &lerr); if (!_ilu_ReleaseConnIO(conn, FALSE, &lerr)) goto dun2; dun4: (void) _ilu_ReleaseConnCall(conn, call, FALSE, &lerr); dun3: if (call->ca_msInput && !call->ca_dontWait && !call->ca_disownWait) (void) _ilu_ReleaseConnWait(conn, call, FALSE, &lerr); dun2: si = call->ca_si; if (si) { ! if (ilu_Check(si->si_nCalls > 0, err)) si->si_nCalls -= 1; } _ilu_MaybeFreeSerializer(si); if (call->ca_pl) { call->ca_pl->pl_nCalls -= 1; --- 778,821 ---- *err = lerr; else ILU_HANDLED(lerr); + /* (*err) may have error; lerr holds trash */ ILU_ERR_SWITCH(*err) { ILU_SUCCESS_CASE 0 /* no effect */ ; ILU_ERR_CASE(comm_failure, v) ! _ilu_CloseIoingConnection(conn, TRUE, ! ilu_ConnShutdownReason_LostProtocolSync); ILU_ERR_ELSE 0 /* no effect */ ; } ILU_ERR_ENDSWITCH; } + /* (*err) may have error; lerr holds trash */ if (proto != NIL && proto->pr_prefinish_call != NULLFN) (void) (*proto->pr_prefinish_call) (call, &lerr); + /* (*err) and lerr may each have error; (*err) has priority. */ if (!_ilu_ReleaseConnIO(conn, FALSE, &lerr)) goto dun2; dun4: + /* (*err) and lerr may each have error; (*err) has priority. */ (void) _ilu_ReleaseConnCall(conn, call, FALSE, &lerr); dun3: + /* (*err) and lerr may each have error; (*err) has priority. */ if (call->ca_msInput && !call->ca_dontWait && !call->ca_disownWait) (void) _ilu_ReleaseConnWait(conn, call, FALSE, &lerr); dun2: + /* (*err) and lerr may each have error; (*err) has priority. */ + if (ILU_ERROK(*err)) + *err = lerr; + else + ILU_HANDLED(lerr); + ILU_CLER(lerr); + /* (*err) may have error; lerr = success */ si = call->ca_si; if (si) { ! if (ilu_Check(si->si_nCalls > 0, &lerr)) si->si_nCalls -= 1; } + /* (*err) and lerr may each have error; (*err) has priority. */ _ilu_MaybeFreeSerializer(si); if (call->ca_pl) { call->ca_pl->pl_nCalls -= 1; *************** *** 792,799 **** conn->co_nCalls -= 1; if (conn->co_nCalls == 0) conn->co_pipeline = NIL; ! if (conn->co_doomed && conn->co_nCalls == 0 && ILU_ERROK(lerr)) { ! lerr = _ilu_CloseConnection(conn, ilu_ConnShutdownReason_Relocating); } rewatch = (!connection_closed(conn) && !connection_incoming(conn) && !_ilu_CanCondition() && conn->co_nOuts == 0); --- 826,834 ---- conn->co_nCalls -= 1; if (conn->co_nCalls == 0) conn->co_pipeline = NIL; ! if (conn->co_doomed && conn->co_nCalls == 0 && ILU_ERROK(*err)) { ! lerr = _ilu_CloseConnection(conn, ! ilu_ConnShutdownReason_Relocating); } rewatch = (!connection_closed(conn) && !connection_incoming(conn) && !_ilu_CanCondition() && conn->co_nOuts == 0); *************** *** 801,818 **** --- 836,857 ---- } (void) _ilu_ExitServerMutex(s, TRUE, &lerr); dun1: + /* (*err) and lerr may each have error; (*err) has priority. */ (void) ilu_ExitMutex(ilu_cmu, TRUE, &lerr); dun0: + /* (*err) and lerr may each have error; (*err) has priority. */ if (ILU_ERROK(*err)) *err = lerr; else ILU_HANDLED(lerr); + /* (*err) may have error; lerr holds trash */ if (proto != NIL && proto->pr_finish_call != NULLFN) (void) (*proto->pr_finish_call) (call, &lerr); if (ILU_ERROK(*err)) *err = lerr; else ILU_HANDLED(lerr); + /* (*err) may have error; lerr holds trash */ if (rewatch) { (void) ilu_SetConnectionInputHandler(conn, ReadExtraMsg, conn, &lerr); if (ILU_ERROK(*err)) *************** *** 820,825 **** --- 859,865 ---- else ILU_HANDLED(lerr); } + /* (*err) may have error; lerr holds trash */ if (call->ca_incoming && (call->ca_caller != NIL)) { ilu_DestroyPassport(call->ca_caller, &lerr); call->ca_caller = NIL; *************** *** 828,833 **** --- 868,874 ---- else ILU_HANDLED(lerr); } + /* (*err) may have error; lerr holds trash */ return; } *************** *** 1336,1341 **** --- 1377,1383 ---- server->sr_id, v->minor)); closeit = TRUE; closeit_reason = ilu_ConnShutdownReason_LostProtocolSync; + ILU_HANDLED(*err); } ILU_ERR_ELSE 0 /* statement with no effect */ ; *** 1.98 1997/11/25 23:11:54 --- runtime/kernel/connect.c 1997/12/03 06:56:56 *************** *** 599,605 **** { ILU_ERRS((WrongLocks)) err; ilu_cardinal ans; ! #ifdef HAVE_GETRLIMITo struct rlimit resourcelimit; /* restrict to no more than the processes current resource limit */ if (! getrlimit(RLIMIT_NOFILE, &resourcelimit)) --- 599,605 ---- { ILU_ERRS((WrongLocks)) err; ilu_cardinal ans; ! #ifdef HAVE_GETRLIMIT struct rlimit resourcelimit; /* restrict to no more than the processes current resource limit */ if (! getrlimit(RLIMIT_NOFILE, &resourcelimit)) *************** *** 809,829 **** { _ilu_HoldMutex(server_lock(conn->co_server)); _ilu_HoldMutex(ilu_cmu); ! while (conn->co_ioing) { /* * We shouldn't actually get here unless the I/O mutex is held * by another thread, in which case the runtime should have * provided a wait-on-condition operation. We could also get * here if the caller mistakenly holds the I/O mutex. */ ! ILU_NOTE(LOCK_DEBUG, ! ("EnterConnIO(%p) waiting.\n", conn)); ! (void) ilu_CMWait2(conn->co_cc, server_lock(conn->co_server), ! ilu_cmu, err); ! ILU_NOTE(LOCK_DEBUG, ! ("EnterConnIO(%p) resuming.\n", conn)); ! if (ILU_ERRNOK(*err)) ! return FALSE; } ILU_NOTE(LOCK_DEBUG, ("EnterConnIO(%p) succeeds.\n", conn)); --- 809,837 ---- { _ilu_HoldMutex(server_lock(conn->co_server)); _ilu_HoldMutex(ilu_cmu); ! if (conn->co_ioing) { /* * We shouldn't actually get here unless the I/O mutex is held * by another thread, in which case the runtime should have * provided a wait-on-condition operation. We could also get * here if the caller mistakenly holds the I/O mutex. */ ! if (!_ilu_CanCondition()) { ! if (hard) ! return ILU_ERR_CONS0(broken_locks, err, FALSE); ! else ! return ILU_ERR_CONS0(bad_locks, err, FALSE); ! } ! while (conn->co_ioing) { ! ILU_NOTE(LOCK_DEBUG, ! ("EnterConnIO(%p) waiting.\n", conn)); ! (void) ilu_CMWait2(conn->co_cc, server_lock(conn->co_server), ! ilu_cmu, err); ! ILU_NOTE(LOCK_DEBUG, ! ("EnterConnIO(%p) resuming.\n", conn)); ! if (ILU_ERRNOK(*err)) ! return FALSE; ! } } ILU_NOTE(LOCK_DEBUG, ("EnterConnIO(%p) succeeds.\n", conn)); *************** *** 870,889 **** ILU_ERRS((bad_locks, broken_locks)) * err) { _ilu_HoldMutex(server_lock(conn->co_server)); ! if (conn->co_mucall == call) { if (hard) return ILU_ERR_CONS0(broken_locks, err, FALSE); else return ILU_ERR_CONS0(bad_locks, err, FALSE); } while (conn->co_mucall) { - /* - * We shouldn't actually get here unless the call mutex is held - * by another thread, in which case the runtime should have - * provided a wait-on-condition operation. We could also get - * here if the caller mistakenly holds the call mutex on behalf - * of a different call. - */ ILU_NOTE(LOCK_DEBUG, ("EnterConnCall(%p, %p) waits for %p\n", conn, call, conn->co_mucall)); --- 878,891 ---- ILU_ERRS((bad_locks, broken_locks)) * err) { _ilu_HoldMutex(server_lock(conn->co_server)); ! if (conn->co_mucall == call || ! (conn->co_mucall && !_ilu_CanCondition())) { if (hard) return ILU_ERR_CONS0(broken_locks, err, FALSE); else return ILU_ERR_CONS0(bad_locks, err, FALSE); } while (conn->co_mucall) { ILU_NOTE(LOCK_DEBUG, ("EnterConnCall(%p, %p) waits for %p\n", conn, call, conn->co_mucall)); *** 1.6 1997/11/13 23:13:41 --- runtime/kernel/batching.c 1997/12/02 00:37:29 *************** *** 438,444 **** if (!si || !(server = si->si_server)) return ILU_ERR_CONS1(bad_param, err, minor, ilu_bpm_duh, FALSE); ! if (!ilu_EnterServerMutex(server, TRUE, err)) return FALSE; self = connection_transport(si->si_conn); if (transport_class(self) == &myclass) { --- 438,444 ---- if (!si || !(server = si->si_server)) return ILU_ERR_CONS1(bad_param, err, minor, ilu_bpm_duh, FALSE); ! if (!ilu_EnterServerMutex(server, FALSE, err)) return FALSE; self = connection_transport(si->si_conn); if (transport_class(self) == &myclass) { *** 1.44 1997/08/29 16:15:01 --- runtime/kernel/error.c 1997/12/02 21:42:29 *************** *** 166,172 **** * Modifications to TransportClass to allow this. * Note that tr_flush_buffer now serves as end-of-message marker. * */ ! /* Last edited by Mike Spreitzer August 29, 1997 9:05 am PDT */ /* Standard error machinery, and defs of standard errors */ --- 169,175 ---- * Modifications to TransportClass to allow this. * Note that tr_flush_buffer now serves as end-of-message marker. * */ ! /* Last edited by Mike Spreitzer December 2, 1997 1:41 pm PST */ /* Standard error machinery, and defs of standard errors */ *************** *** 241,247 **** } ILU_ERR_CASE(broken_locks, v) { *major = ILU_ERRTYP(internal) - ILU_ERRTYP(unknown); ! minor = ilu_im_broken + v->ignoreme * 0; } ILU_ERR_CASE(interrupted, v) { *major = ILU_ERRTYP(no_response) - ILU_ERRTYP(unknown); --- 244,250 ---- } ILU_ERR_CASE(broken_locks, v) { *major = ILU_ERRTYP(internal) - ILU_ERRTYP(unknown); ! minor = ilu_im_brokenLocks + v->ignoreme * 0; } ILU_ERR_CASE(interrupted, v) { *major = ILU_ERRTYP(no_response) - ILU_ERRTYP(unknown); *** 1.213 1997/11/25 22:23:11 --- runtime/kernel/iluntrnl.h 1997/12/02 22:39:47 *************** *** 967,976 **** /*Main Invariant, L2 >= {conn's iomu}*/ extern ilu_boolean _ilu_CloseConnWithIo(ilu_Connection conn, ilu_boolean set_cfails, ! ilu_ConnShutdownReason, ILU_ERRS((IoErrs)) *); /* * ... where kernel code guarantees that cmu, conn's server mutexes ! * not held. */ /* L1 >= {conn's server}; L2 disjoint {conn's callmu, iomu} */ --- 967,977 ---- /*Main Invariant, L2 >= {conn's iomu}*/ extern ilu_boolean _ilu_CloseConnWithIo(ilu_Connection conn, ilu_boolean set_cfails, ! ilu_ConnShutdownReason, ILU_ERRS((IoErrs)) *err); /* * ... where kernel code guarantees that cmu, conn's server mutexes ! * not held. (*err) is left untouched on success, set on failure if ! * the failure is more pressing than (*err) indicated upon entry. */ /* L1 >= {conn's server}; L2 disjoint {conn's callmu, iomu} */ *** 1.302 1997/11/25 22:18:31 --- runtime/kernel/iluxport.h 1997/12/02 01:11:24 *************** *** 620,627 **** ilu_EnterMutexWork(m,ilu_TRUE,err,__FILE__,__LINE__) /* * Blocks until acquisition succeeds or an error is raised. On ! * success, returns TRUE without setting *err. On failure returns ! * FALSE and raises broken_locks. */ /* L1.sup < m before, L1.sup = m after */ --- 620,628 ---- ilu_EnterMutexWork(m,ilu_TRUE,err,__FILE__,__LINE__) /* * Blocks until acquisition succeeds or an error is raised. On ! * success, returns TRUE without touching (*err). On failure returns ! * FALSE after calling ILU_HANDLED on the incoming (*err) and then ! * setting (*err) to broken_locks. */ /* L1.sup < m before, L1.sup = m after */ *************** *** 647,658 **** --- 648,672 ---- #define ilu_EnterServerMutex(s,h,e) \ ilu_EnterServerMutexFull(s,h,e,__FILE__,__LINE__) + /* See comment below on err setting behavior. */ ILU_PUBLIC ilu_boolean ilu_EnterServerMutexFull(ilu_Server server, ilu_boolean hard, ILU_ERRS((bad_locks, broken_locks, internal)) * err, char *filename, int lineno); + /* + * Blocks until acquisition succeeds or an error is raised. Returns + * TRUE upon success, FALSE upon failure. (*err) is an INOUT + * parameter if (hard), an OUT parameter if (!hard). If (!hard), + * (*err) is always set apropriately for a kernel call. If (hard), + * (*err) is left untouched in the success case, and in the failure + * case either: (a) (*err) indicated success upon entry and this + * proc sets it to indicate failure upon return, (b) this proc calls + * ILU_HANDLED(*err) and then sets (*err) to broken_locks, or (c) + * (*err) indicated a problem upon entry and this proc leaves it + * unchanged. + */ #define ilu_ExitServerMutex(s,h,e) \ ilu_ExitServerMutexFull(s,h,e,__FILE__,__LINE__) *** 1.47 1997/11/25 01:00:30 --- runtime/kernel/locks.c 1997/12/02 01:11:16 *************** *** 270,278 **** ILU_CLER(*err); return TRUE; } ! if (hard) ILU_ERR_FULLCONS0(broken_locks, err, 0, file, line); ! else ILU_ERR_SWITCH(lerr) { ILU_ERR_CASE(bad_param, v) ILU_ERR_FULLCONS1(internal, err, minor, ilu_im_inv_mutex, 0, --- 270,279 ---- ILU_CLER(*err); return TRUE; } ! if (hard) { ! ILU_HANDLED(*err); ILU_ERR_FULLCONS0(broken_locks, err, 0, file, line); ! } else ILU_ERR_SWITCH(lerr) { ILU_ERR_CASE(bad_param, v) ILU_ERR_FULLCONS1(internal, err, minor, ilu_im_inv_mutex, 0, *** 1.88 1997/11/26 02:22:43 --- runtime/kernel/server.c 1997/12/02 01:11:18 *************** *** 766,783 **** char *filename, int lineno) { ilu_boolean ans; ! if (!ilu_Check(server && ! ((server->sr_true ! && (server_ports(server) || server->sr_local_port ! || server->sr_closedPorts.pl_next)) ! || server->sr_connHead.next ! || server->sr_closedConns.next ! || server->sr_holds ! || (server->sr_objs && ! ilu_hash_PairsInTable(server->sr_objs)) ! || HasLSS(server)), ! err)) return FALSE; ans = ilu_EnterMutexWork(server_lock(server), hard, err, filename, lineno); if (ans && ilu_check_PortsStayClosed && server->sr_true) { --- 766,785 ---- char *filename, int lineno) { ilu_boolean ans; ! if (!(server && ! ((server->sr_true ! && (server_ports(server) || server->sr_local_port ! || server->sr_closedPorts.pl_next)) ! || server->sr_connHead.next ! || server->sr_closedConns.next ! || server->sr_holds ! || (server->sr_objs && ! ilu_hash_PairsInTable(server->sr_objs)) ! || HasLSS(server)))) { ! if (ILU_ERROK(*err)) ! (void) ilu_Check(FALSE, err); return FALSE; + } ans = ilu_EnterMutexWork(server_lock(server), hard, err, filename, lineno); if (ans && ilu_check_PortsStayClosed && server->sr_true) {
*** 1.17 1997/11/10 21:35:33 --- stubbers/java/genopt.c 1997/12/04 01:22:22 *************** *** 200,205 **** --- 200,206 ---- case record_Type: case sequence_Type: case union_Type: + case pickle_Type: return cat5( "((", typeDeclarator(t), ")", name, ")"); case invalid_Type: *************** *** 207,213 **** case void_Type: fatal("bad type in fromObject"); break; - case pickle_Type: case pipe_Type: default: break; --- 208,213 ---- *************** *** 253,258 **** --- 253,259 ---- case record_Type: case sequence_Type: case union_Type: + case pickle_Type: return name; case invalid_Type: *************** *** 261,267 **** fatal("bad type in toObject"); break; - case pickle_Type: case pipe_Type: default: break; --- 262,267 ----
*** 1.4 1997/11/25 21:43:14 --- runtime/guile/ilu-scm.c 1997/12/04 20:35:44 *************** *** 786,806 **** ILU_ERRS((bad_locks, broken_locks, inv_objref, no_memory, internal)) lerr; ilu_string sbh = iluguile_scheme_to_value(string, _sbh); /* tmp_string */ ilu_Class c = iluguile_scheme_to_ptr(ilu_Class, _c); ! ilu_Object obj; SCM o; ! obj = ilu_ObjectOfSBH(sbh, c, &lerr); iluguile_prefer_success(&lerr); ! if (obj == NULL) return scheme_False; /* now Inside(obj->server, c) */ ! o = (SCM)ilu_GetLanguageSpecificObject(obj, iluguile_scheme_lang_idx()); ! if (o == scheme_False) ! o = iluguile_object_create_from_registry(ilu_ClassOfObject(obj), obj); ! ! ilu_ExitServer(ilu_ServerOfObject(obj), c); return o; } --- 786,804 ---- ILU_ERRS((bad_locks, broken_locks, inv_objref, no_memory, internal)) lerr; ilu_string sbh = iluguile_scheme_to_value(string, _sbh); /* tmp_string */ ilu_Class c = iluguile_scheme_to_ptr(ilu_Class, _c); ! ilu_Object kobj; SCM o; ! kobj = ilu_ObjectOfSBH(sbh, c, &lerr); iluguile_prefer_success(&lerr); ! if (kobj == NULL) return scheme_False; /* now Inside(obj->server, c) */ ! if ((o = iluguile_get_language_specific_object(kobj)) == scheme_False) ! o = iluguile_object_create_from_registry(ilu_ClassOfObject(kobj), kobj); ! ilu_ExitServer(ilu_ServerOfObject(kobj), c); return o; }
*** 1.81 1997/11/01 03:56:17 --- stubbers/python/genstub.c 1997/12/06 01:43:27 *************** *** 340,348 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', (", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t)); for (i = 0; i < list_size(fields); i++) { field = list_ref(fields, i); --- 340,348 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', (", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t)); for (i = 0; i < list_size(fields); i++) { field = list_ref(fields, i); *************** *** 507,515 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', (", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t)); for (i = 0; i < list_size(fields); i++) { field = list_ref(fields, i); --- 507,515 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', (", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t)); for (i = 0; i < list_size(fields); i++) { field = list_ref(fields, i); *************** *** 732,740 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf(", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t)); printf ("'%s', %s.TypeKind_%s, %lu, %d, (", type_uid(type_description(t)->structuredDes.uniond.discriminator_type), --- 732,740 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf(", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t)); printf ("'%s', %s.TypeKind_%s, %lu, %d, (", type_uid(type_description(t)->structuredDes.uniond.discriminator_type), *************** *** 932,940 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t)); printf ("'%s', (", type_uid(type_description(t)->structuredDes.array.type)); --- 932,940 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t)); printf ("'%s', (", type_uid(type_description(t)->structuredDes.array.type)); *************** *** 1042,1050 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t)); printf ("'%s', %lu)\n", type_uid(type_description(t)->structuredDes.sequence.type), --- 1042,1050 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t)); printf ("'%s', %lu)\n", type_uid(type_description(t)->structuredDes.sequence.type), *************** *** 1083,1091 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t)); printf ("'%s')\n", type_uid(ur_type(t))); #endif /* IIOP_PROTOCOL */ --- 1083,1091 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', ", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t)); printf ("'%s')\n", type_uid(ur_type(t))); #endif /* IIOP_PROTOCOL */ *************** *** 1159,1167 **** getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', '%s')\n", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", type_uid(t), type_uid(type_description(t)->structuredDes.optional)); #endif /* IIOP_PROTOCOL */ stRegisterIoFuncs(t); --- 1159,1167 ---- getTypeName(t), nameModuleIlu); printNameScopes(t->scoping); printf (", %s%s%s, '%s', '%s')\n", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", type_uid(t), type_uid(type_description(t)->structuredDes.optional)); #endif /* IIOP_PROTOCOL */ stRegisterIoFuncs(t); *************** *** 1565,1576 **** printf(", "); printNameScopes(t->scoping); printf(", %s%s%s, %s%s%s)\n", ! (type_interface(t)->brand == NULL) ? "" : "'", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "'", ! (co->doc_string == NULL) ? "" : "'", (co->doc_string == NULL) ? "None" : co->doc_string, ! (co->doc_string == NULL) ? "" : "'"); } static void --- 1565,1576 ---- printf(", "); printNameScopes(t->scoping); printf(", %s%s%s, %s%s%s)\n", ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand, ! (type_interface(t)->brand == NULL) ? "" : "\"\"\"", ! (co->doc_string == NULL) ? "" : "\"\"\"", (co->doc_string == NULL) ? "None" : co->doc_string, ! (co->doc_string == NULL) ? "" : "\"\"\""); } static void
*** 1.107 1997/11/08 03:21:35 --- runtime/lisp/ilu.lisp 1997/12/06 01:52:31 *************** *** 167,173 **** --- 167,177 ---- (defvar *ilu-to-lisp-class-table* (make-hash-table) "KEY is kernel class record, VALUE is CLOS class") (defvar *lisp-to-ilu-class-table* (make-hash-table) "KEY is CLOS class, VALUE is ILU kernel class record") (defvar *exception-repository-ids* (make-hash-table :test 'equal) "KEY is CORBA repository ID string, VALUE is lisp condition name") + (defvar *custom-surrogate-table* (make-hash-table) "KEY is standard CLOS class, VALUE is custom CLOS class") + (defun register-custom-surrogate (standard-class custom-class) + (setf (gethash (find-class standard-class) *custom-surrogate-table*) custom-class)) + (defvar *ilu-initialized* nil "t if the ILU kernel has been initialized") (defvar *version* nil "set to string determining the current version of ILU") *************** *** 318,326 **** ;; before: Inside(server,class) ;; after: Main invariant holds (defun ilu-object->instance (class kernel-obj class-record) ! (let ((lisp-obj (language-specific-object kernel-obj))) (unless lisp-obj ! (setq lisp-obj (make-instance class)) (setf (language-specific-object kernel-obj) lisp-obj) (setf (ilu-server lisp-obj) (ilu_ilu-server kernel-obj)) (setf (ilu-class lisp-obj) (ilu_ilu-class kernel-obj)) --- 322,331 ---- ;; before: Inside(server,class) ;; after: Main invariant holds (defun ilu-object->instance (class kernel-obj class-record) ! (let ((lisp-obj (language-specific-object kernel-obj)) ! (class-to-use (or (gethash class *custom-surrogate-table*) class))) (unless lisp-obj ! (setq lisp-obj (make-instance class-to-use)) (setf (language-specific-object kernel-obj) lisp-obj) (setf (ilu-server lisp-obj) (ilu_ilu-server kernel-obj)) (setf (ilu-class lisp-obj) (ilu_ilu-class kernel-obj)) *************** *** 700,720 **** value))))) #+ilu-pickle ! (defun |PICKLE-size| (call value) (byte-sequence-size call (pickle-bytes value) 0)) #+ilu-pickle ! (defun |PICKLE-write| (call value) (byte-sequence-write call (pickle-bytes value) 0)) #+ilu-pickle ! (defun |PICKLE-read| (call) (let ((bytes (byte-sequence-read call 0))) (make-instance 'pickle :bytes bytes))) #+ilu-pickle (add-type (ilulisp_get-primitive-type-uid "pickle") ! 'pickle #'|PICKLE-size| #'|PICKLE-write| #'|PICKLE-read|) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; --- 705,725 ---- value))))) #+ilu-pickle ! (defun pickle-size (call value) (byte-sequence-size call (pickle-bytes value) 0)) #+ilu-pickle ! (defun pickle-write (call value) (byte-sequence-write call (pickle-bytes value) 0)) #+ilu-pickle ! (defun pickle-read (call) (let ((bytes (byte-sequence-read call 0))) (make-instance 'pickle :bytes bytes))) #+ilu-pickle (add-type (ilulisp_get-primitive-type-uid "pickle") ! 'pickle #'pickle-size #'pickle-write #'pickle-read) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; *** 1.24 1997/07/11 02:03:02 --- runtime/lisp/ilu-def-package.lisp 1997/12/04 04:35:10 *************** *** 68,73 **** --- 68,74 ---- :find-ilu-class-name :find-ilu-class-id :*caller-identity* + :register-custom-surrogate :language-specific-object ;; (ilu-object) => lisp-object (setf-able) :object-of-sbh ;; (string-binding-handle) => ilu-object
*** 1.63 1997/11/12 00:54:34 --- stubbers/java/genobj.c 1997/12/06 01:03:26 *************** *** 44,49 **** --- 44,115 ---- } + PRIVATE boolean list_insert_onceonly( + list l, + refany new_element + ) + /* inserts new_element into list, only if it is not yet included. + * returns TRUE if newly inserted. + */ + { + refany old = list_find(l, matchPointer, new_element); + if (old) { + return FALSE; + } else { + list_insert(l, new_element); + return TRUE; + } + } + + typedef struct { + refany clientrock; + iluparser_EnumProc clientproc; + list classesSeen; + } RockType_enumerateSuperClasses; + + + PRIVATE void + enumProc_enumerateSuperClasses(Type t, RockType_enumerateSuperClasses* myRock) + { + Class c = class_object(t); + if (list_insert_onceonly(myRock->classesSeen, c)) { + list_enumerate(c->superclasses, + (EnumProc) enumProc_enumerateSuperClasses, myRock); + myRock->clientproc(t, myRock->clientrock); + } + } + + PRIVATE void + enumerateSuperClasses( + Type t, + iluparser_EnumProc proc, /*where element=superclass, is a Type*/ + refany rock, + boolean recurse, + boolean self + ) + { + Class c = class_object(t); + if (self) { + proc(t, rock); + } + if (c->superclasses==0) { + return; + } else if (recurse) { + RockType_enumerateSuperClasses* myRock; + myRock = iluparser_Malloc(sizeof(RockType_enumerateSuperClasses)); + myRock->clientrock = rock; + myRock->clientproc = proc; + myRock->classesSeen = new_list(); + list_enumerate(c->superclasses, + (iluparser_EnumProc) enumProc_enumerateSuperClasses, + myRock + ); + } else { + list_enumerate(c->superclasses, proc, rock); + } + } + + PUBLIC boolean obj_is_a(Type t) { TypeKind kind; t = myUrType(t); *************** *** 727,744 **** PRIVATE void ! printSuperClassMethodStubs(Type t, void * x) ! /* Defines the class methods for all the superclasses ! * t is the type of the object whose superclasses are being ! * considered. * Reuses static stub from superclass. */ { Class c = class_object(t); ! list_enumerate(c->superclasses, ! (EnumProc) printSuperClassMethodStubs, 0); ! list_enumerate(c->methods, ! (EnumProc) printSuperClassMethodStub1, 0); } --- 793,805 ---- PRIVATE void ! printSuperClassMethodStubs1(Type t, ObjRockType* rock) ! /* Defines the class methods for this particular superclasses * Reuses static stub from superclass. */ { Class c = class_object(t); ! list_enumerate(c->methods, (EnumProc) printSuperClassMethodStub1, 0); } *************** *** 818,832 **** PRIVATE void ! printSuperClassRefs(Type t, void *refany) /* for the reference class definition */ { - Class c = class_object(t); - /* There is no real need to recurse, except that - * it makes the generated java code easier to read - */ - list_enumerate(c->superclasses, - (EnumProc) printSuperClassRefs, refany); printf(", %s", obj_typeDeclarator(t)); } --- 879,890 ---- PRIVATE void ! printSuperClassRef(Type t, void* x) /* for the reference class definition */ + /* There is no real need to include all classes recursively, except that + * it makes the generated java code easier to read + */ { printf(", %s", obj_typeDeclarator(t)); } *************** *** 842,849 **** if (c->doc_string) printDocString("", c->doc_string); printf("public interface %s ", refTypeName); printf("extends xerox.ilu.IluObject"); ! list_enumerate(c->superclasses, ! (EnumProc) printSuperClassRefs, 0); printf(" {\n"); generateNestedConstants(ih, easyShortTypeNameCleaned(t)); list_enumerate(c->methods, (EnumProc) printSignatureForOperations, 0); --- 900,906 ---- if (c->doc_string) printDocString("", c->doc_string); printf("public interface %s ", refTypeName); printf("extends xerox.ilu.IluObject"); ! enumerateSuperClasses(t, (EnumProc) printSuperClassRef, 0, TRUE, FALSE); printf(" {\n"); generateNestedConstants(ih, easyShortTypeNameCleaned(t)); list_enumerate(c->methods, (EnumProc) printSignatureForOperations, 0); *************** *** 860,877 **** PRIVATE void ! printSuperDelegationStubs(Type t, void * x) ! /* Defines the class methods for all the superclasses ! * t is the type of the object whose superclasses are being ! * considered. * Reuses static stub from superclass. */ { Class c = class_object(t); ! list_enumerate(c->superclasses, ! (EnumProc) printSuperDelegationStubs, 0); ! list_enumerate(c->methods, ! (EnumProc) printDelegationStub, 0); } --- 917,929 ---- PRIVATE void ! printSuperDelegationStub1(Type t, ObjRockType* rock) ! /* Defines the class methods for this class (superclass) * Reuses static stub from superclass. */ { Class c = class_object(t); ! list_enumerate(c->methods, (EnumProc) printDelegationStub, 0); } *************** *** 909,916 **** printf(" this._internal = _internal;\n"); printf(" }\n\n"); } ! list_enumerate(c->methods, (EnumProc) printDelegationStub, rock); ! list_enumerate(c->superclasses, (EnumProc) printSuperDelegationStubs, t); printf("} //%s\n\n", classShortName); } --- 961,969 ---- printf(" this._internal = _internal;\n"); printf(" }\n\n"); } ! enumerateSuperClasses(t, ! (EnumProc) printSuperDelegationStub1, rock, TRUE, TRUE ! ); printf("} //%s\n\n", classShortName); } *************** *** 1048,1054 **** printf(" }//static\n\n"); list_enumerate(c->methods, (EnumProc) printMethodStub, rock); ! list_enumerate(c->superclasses, (EnumProc) printSuperClassMethodStubs, t); printf(" public static void registerTrueObject(\n"); printf(" java.lang.String _ih,\n"); printf(" %s%s _tob,\n", --- 1101,1109 ---- printf(" }//static\n\n"); list_enumerate(c->methods, (EnumProc) printMethodStub, rock); ! enumerateSuperClasses(t, ! (EnumProc) printSuperClassMethodStubs1, rock, TRUE, FALSE ! ); printf(" public static void registerTrueObject(\n"); printf(" java.lang.String _ih,\n"); printf(" %s%s _tob,\n",
*** 1.1 1995/01/31 06:31:23 --- examples/tutorial/Factory-impl.c 1997/12/09 00:16:02 *************** *** 4,9 **** --- 4,12 ---- * types and function prototypes. */ + #include + #include + #include /* Code for the Factory object type */ *************** *** 15,19 **** Tutorial_Factory self, ILU_C_ENVIRONMENT *env) { ! return (Create_Tutorial_Calculator()); } --- 18,55 ---- Tutorial_Factory self, ILU_C_ENVIRONMENT *env) { ! Tutorial_Calculator newcalc; ! ! /* We want this to `work' either with non-GC'ed OMG IDL, or with GC'ed ! ILU ISL. To do that, we look at the class to see whether we used ! OMG IDL, in which case we inherited from ilu.CORBA-Object, and can't ! use GC, or used ILU ISL, in which case we didn't inherit from ! ilu.CORBA-Object, and can use GC to clean up after ourselves. ! We only need to make this check once, so we use a Static boolean ! flag to tell us whether we need to make the check. */ ! ! static ilu_boolean initialized = ilu_FALSE; ! static ilu_boolean using_omg_idl = ilu_FALSE; ! ! if (! initialized) { ! using_omg_idl = ilu_IsSubObjectType(Tutorial_Calculator__MSType, ilu_CORBA_Object__MSType); ! initialized = ilu_TRUE; ! } ! ! newcalc = Create_Tutorial_Calculator(); ! ! if (using_omg_idl) { ! /* Not using normal ILU GC. So increment the reference count ! so that the object will still be around later... */ ! CORBA_Environment status; ! CORBA_Object_duplicate(newcalc, &status); ! if (!ILU_C_SUCCESSFUL(&status)) { ! fprintf (stderr, "Couldn't duplicate Tutorial.Calculator instance! Error %s.\n", ! CORBA_exception_id(&status)); ! CORBA_exception_free(&status); ! exit(1); ! } ! } ! ! return (newcalc); } *** 1.1 1995/02/07 02:18:23 --- examples/tutorial/Factory2-impl.c 1997/12/09 00:39:44 *************** *** 4,22 **** * types and function prototypes. */ #include /* Code for the Factory object type */ extern Tutorial2_TapeCalculator Create_Tutorial2_TapeCalculator(void); Tutorial_Calculator server_Tutorial2_Factory_CreateCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env) { ! return ((Tutorial_Calculator) Create_Tutorial2_TapeCalculator()); } Tutorial2_TapeCalculator server_Tutorial2_Factory_CreateTapeCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env) { ! return (Create_Tutorial2_TapeCalculator()); } --- 4,64 ---- * types and function prototypes. */ + #include + #include + #include /* Code for the Factory object type */ extern Tutorial2_TapeCalculator Create_Tutorial2_TapeCalculator(void); + static Tutorial2_TapeCalculator + NewTapeCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env) + { + Tutorial2_TapeCalculator newcalc; + + /* We want this to `work' either with non-GC'ed OMG IDL, or with GC'ed + ILU ISL. To do that, we look at the class to see whether we used + OMG IDL, in which case we inherited from ilu.CORBA-Object, and can't + use GC, or used ILU ISL, in which case we didn't inherit from + ilu.CORBA-Object, and can use GC to clean up after ourselves. + We only need to make this check once, so we use a Static boolean + flag to tell us whether we need to make the check. */ + + static ilu_boolean initialized = ilu_FALSE; + static ilu_boolean using_omg_idl = ilu_FALSE; + + if (! initialized) { + using_omg_idl = ilu_IsSubObjectType(Tutorial2_TapeCalculator__MSType, ilu_CORBA_Object__MSType); + initialized = ilu_TRUE; + } + + newcalc = Create_Tutorial2_TapeCalculator(); + + if (using_omg_idl) { + /* Not using normal ILU GC. So increment the reference count + so that the object will still be around later... */ + CORBA_Environment status; + CORBA_Object_duplicate(newcalc, &status); + if (!ILU_C_SUCCESSFUL(&status)) { + fprintf (stderr, "Couldn't duplicate Tutorial2.TapeCalculator instance! Error %s.\n", + CORBA_exception_id(&status)); + CORBA_exception_free(&status); + exit(1); + } + } + + return (newcalc); + } + Tutorial_Calculator server_Tutorial2_Factory_CreateCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env) { ! return ((Tutorial_Calculator) NewTapeCalculator(f, env)); } Tutorial2_TapeCalculator server_Tutorial2_Factory_CreateTapeCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env) { ! return (NewTapeCalculator(f, env)); }
*** 1.167 1997/11/25 22:19:10 --- runtime/kernel/iiop.c 1997/12/10 03:23:31 *************** *** 1959,1968 **** foundclass = ilu_FindClassFromID(mstid); if (h == NIL) h = _ilu_FindOrCreateObject (ih, s, foundclass, ! static_type, mstid, NIL, &lerr); ilu_free(ih); ilu_free(mstid); ! if (ILU_ERRNOK(lerr)) return NIL; } if (h == NIL) --- 1959,1968 ---- foundclass = ilu_FindClassFromID(mstid); if (h == NIL) h = _ilu_FindOrCreateObject (ih, s, foundclass, ! static_type, mstid, NIL, err); ilu_free(ih); ilu_free(mstid); ! if (ILU_ERRNOK(*err)) return NIL; } if (h == NIL)
*** 1.68 1997/11/12 23:09:17 --- stubbers/java/name.c 1997/12/18 02:35:28 *************** *** 390,399 **** { string s; if (scoping) { ! s = javaizeString((char *) list_last(scoping)); ! } else { ! s = unscopedNameFromName(n); ! } return s; } --- 390,399 ---- { string s; if (scoping) { ! s = (char *) list_last(scoping); ! if (s) {return javaizeString(s);} ! } ! s = unscopedNameFromName(n); return s; } *** 1.18 1997/11/12 23:09:17 --- stubbers/java/context.c 1997/12/18 02:35:27 *************** *** 132,138 **** { IHandle ih = getContextRoot(); listElement *ptr; ! if (scoping==0) { if (ifc==0) { return getContextC(0); } --- 132,138 ---- { IHandle ih = getContextRoot(); listElement *ptr; ! if ((scoping==0) || (scoping->head==0)) { if (ifc==0) { return getContextC(0); } *************** *** 179,185 **** IHandle ih = getContextRoot(); if (name==0) { if (emptyNameContext==0) { ! ih = newChild(ih); } return emptyNameContext; } --- 179,185 ---- IHandle ih = getContextRoot(); if (name==0) { if (emptyNameContext==0) { ! emptyNameContext = newChild(ih); } return emptyNameContext; } *** 1.55 1997/11/12 00:54:34 --- stubbers/java/isl2java.c 1997/12/18 02:35:28 *************** *** 180,185 **** --- 180,186 ---- LOOP_BEGIN(ifc->types, Type, t, temp) if (t->description) { switch (t->description->type) { + case record_Type: case object_Type: { char* baseName = easyShortTypeNameCleaned(t);
*** 1.20 1997/09/11 18:02:58 --- runtime/java/IluJava_IluInit.c 1997/12/20 18:26:25 *************** *** 87,93 **** * because we trust that in ilu all read and write are * non blocking */ ! #if (defined(__sgi) || defined(__SGI) || defined(__FreeBSD__)) #include --- 87,93 ---- * because we trust that in ilu all read and write are * non blocking */ ! #if (defined(__sgi) || defined(__SGI) || defined(__FreeBSD__) || defined(linux)) #include *************** *** 117,124 **** --- 117,130 ---- #else void *handle = dlopen("libc.so", RTLD_LAZY); #endif + #if (defined(linux)) + /* as reported for RedHat 4.2 based on libc version 5 */ + _ilujava_read = (My_ReadProc) dlsym(handle, "__libc_read"); + _ilujava_write = (My_WriteProc) dlsym(handle, "__libc_write"); + #else _ilujava_read = (My_ReadProc) dlsym(handle, "_read"); _ilujava_write = (My_WriteProc) dlsym(handle, "_write"); + #endif ilu_SetRecvSendProcs(&_ilujava_recv, &_ilujava_send); } *** 1.13 1997/11/07 17:07:17 --- runtime/java/IluJava_JTypes.h 1997/12/20 18:27:40 *************** *** 59,69 **** #else ! #define Jint long ! /* surprize... but javah says long */ #define Jshort short ! #define Jboolean long /* surprize... but javah says long */ #define Jbyte char #define Jlong int64_t #define Jfloat float --- 59,80 ---- #else ! #if (defined(linux)) ! #define Jint int32_t ! #else ! #define Jint long ! /* surprize... but javah says long */ ! #endif ! #define Jshort short ! ! #if (defined(linux)) ! #define Jboolean int32_t ! #else ! #define Jboolean long /* surprize... but javah says long */ + #endif + #define Jbyte char #define Jlong int64_t #define Jfloat float
*** 1.2 1997/07/09 05:50:00 --- examples/black-widow-bank/bankClient.py 1997/12/31 22:37:08 *************** *** 11,17 **** print 'Usage: %s ACCOUNT-MANAGER-SBH ACCOUNT-NAME' sys.exit(1) orb = CORBA.ORB_init(argv, '') ! do_test(argv[1], argv[2]) if __name__ == '__main__': main(sys.argv) --- 11,17 ---- print 'Usage: %s ACCOUNT-MANAGER-SBH ACCOUNT-NAME' sys.exit(1) orb = CORBA.ORB_init(argv, '') ! do_test(orb, argv[1], argv[2]) if __name__ == '__main__': main(sys.argv)
*** 1.147 1997/11/08 02:59:26 --- stubbers/c/code.c 1998/01/02 20:40:54 *************** *** 165,174 **** } else { if (t == enumeration_Type) ! fprintf(f, " stat->ptr = (void *) ilu_must_malloc (sizeof (%s));\n", c_type_name(ut)); else ! fprintf(f, " stat->ptr = (void *) ilu_must_malloc (sizeof (ilu_cardinal));\n", c_type_name(ut)); if (t == array_Type) { char *rtn = c_return_type(ut); --- 165,174 ---- } else { if (t == enumeration_Type) ! fprintf(f, " stat->ptr = (void *) ilu_must_malloc (sizeof (ilu_cardinal));\n", c_type_name(ut)); else ! fprintf(f, " stat->ptr = (void *) ilu_must_malloc (sizeof (%s));\n", c_type_name(ut)); if (t == array_Type) { char *rtn = c_return_type(ut);
*** 1.19 1997/11/26 00:42:09 --- etc/CosNaming/NamingImpl.c 1998/01/10 21:58:01 *************** *** 389,397 **** --- 389,402 ---- RaiseInvalidName(_status); } else if (strlen(n->_buffer[0].id) == 0) { RaiseInvalidName(_status); + } else if (obj == ILU_NIL) { + /* we don't allow binding of the NIL object */ + ilu_DebugPrintf("CosNaming: attempt to bind the NIL object -- raising IMP_LIMIT\n"); + ILU_C_RAISE_SYSTEM(_status, IMP_LIMIT, 0, NO); } else if (LocalObject((CosNaming_NamingContext) obj) && (ILU_C_ClassRecordOfInstance(obj) != CosNaming_NamingContext__MSType)) { /* we don't allow binding of the bindingiterators exported from this server */ + ilu_DebugPrintf("CosNaming: attempt to bind local binding iterator -- raising IMP_LIMIT\n"); ILU_C_RAISE_SYSTEM(_status, IMP_LIMIT, 0, NO); } else if (size == 1) { if ((nv = ilu_hash_FindInTable(ht, n->_buffer[0].id)) != ILU_NIL) { *************** *** 672,678 **** return; iteratorlist->_buffer[i].binding_type = bv->kind; } ! iteratorlist->_length = limit - count; bidata->index = 0; bidata->list = iteratorlist; if ((iterator = CosNaming_BindingIterator__CreateTrue(ILU_NIL, ILU_NIL, (ilu_refany) bidata)) == ILU_NIL) { --- 677,683 ---- return; iteratorlist->_buffer[i].binding_type = bv->kind; } ! iteratorlist->_length = count - limit; bidata->index = 0; bidata->list = iteratorlist; if ((iterator = CosNaming_BindingIterator__CreateTrue(ILU_NIL, ILU_NIL, (ilu_refany) bidata)) == ILU_NIL) {
*** 1.55 1997/11/12 00:54:34 --- stubbers/java/isl2java.c 1998/01/12 23:32:25 *************** *** 676,682 **** initName(); defineDefaultContext(); defineIluContext(); ! programName = iluparser_GetProgramName(argv[0]); while (optind < argc && argv[optind][0] == '-') { char *opt = (argv[optind++])+1; int tabIndex = getOptionTabIndex(opt); --- 677,685 ---- initName(); defineDefaultContext(); defineIluContext(); ! if ((programName = iluparser_GetProgramName(argv[0])) == NULL) { ! programName = argv[0]; ! }; while (optind < argc && argv[optind][0] == '-') { char *opt = (argv[optind++])+1; int tabIndex = getOptionTabIndex(opt);
*** 1.167 1997/11/25 22:19:10 --- runtime/kernel/iiop.c 1998/01/05 20:50:47 *************** *** 1045,1051 **** sid = server_id(server); ! if ((strcmp(pinfo, "iiop_1_0_1") != 0) && (strcmp(pinfo, "iiop_") != 0) && (strcmp(pinfo, "iiop") != 0)) return ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_ps, ilu_FALSE); --- 1045,1051 ---- sid = server_id(server); ! if ((strncmp(pinfo, "iiop_1_0_1", 10) != 0) && (strcmp(pinfo, "iiop_") != 0) && (strcmp(pinfo, "iiop") != 0)) return ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_ps, ilu_FALSE);
*** 1.18 1997/08/16 01:31:53 --- runtime/java/IluJava_selectwt.c 1998/01/30 02:11:39 *************** *** 76,89 **** ilu_boolean input, ILU_ERRS((interrupt)) * err) { ! struct fd_set read_fds; ! struct fd_set write_fds; ! struct fd_set excn_fds; struct timeval* timeoutPtr = 0; struct timeval timeout = {0, 0}; int res; ! struct fd_set* read_fdsPtr = 0; ! struct fd_set* write_fdsPtr = 0; { #ifndef WIN32 if (fd >= FD_SETSIZE) { --- 76,89 ---- ilu_boolean input, ILU_ERRS((interrupt)) * err) { ! fd_set read_fds; ! fd_set write_fds; ! fd_set excn_fds; struct timeval* timeoutPtr = 0; struct timeval timeout = {0, 0}; int res; ! fd_set* read_fdsPtr = 0; ! fd_set* write_fdsPtr = 0; { #ifndef WIN32 if (fd >= FD_SETSIZE) {
*** 1.230 1998/02/03 01:21:36 --- runtime/python/iluPrmodule.c 1998/02/03 21:06:34 *************** *** 2673,2685 **** result = PyEval_CallObject(cbdata->function, cbdata->argsTuple); Py_DECREF(cbdata->argsTuple); ! if (result == 0) ! { ! char culprit[1000]; ! sprintf(culprit, "%s DoSoon callback", cbdata->what); ! _ilupython_handleCalloutException(culprit, ILU_NIL); ! } ! Py_DECREF(result); } static PyObject * --- 2673,2685 ---- result = PyEval_CallObject(cbdata->function, cbdata->argsTuple); Py_DECREF(cbdata->argsTuple); ! if (result == 0) { ! char culprit[1000]; ! sprintf(culprit, "%s DoSoon callback", cbdata->what); ! _ilupython_handleCalloutException(culprit, ILU_NIL); ! } else { ! Py_DECREF(result); ! } } static PyObject *
*** 1.11 1996/06/19 22:47:06 --- runtime/python/ilualobject.c 1998/02/04 03:53:17 *************** *** 98,106 **** { IlualObject * p = (IlualObject *) rock; PyObject * result; NEW_THREAD_ENTER; ! result = PyEval_CallObject(p->proc, p->argTuple); FINISHED_THREAD_EXIT; Py_XDECREF(result); } --- 98,118 ---- { IlualObject * p = (IlualObject *) rock; PyObject * result; + PyObject * proc = ((IlualObject *) rock)->proc; + PyObject * args = ((IlualObject *) rock)->argTuple; + /* + if ((proc == 0) || (args == 0)) + return; + */ + _ilu_Assert((proc != 0) && (args != 0), + "bad alarm data structure in Python runtime"); + p->proc = 0; + p->argTuple = 0; NEW_THREAD_ENTER; ! result = PyEval_CallObject(proc, args); ! Py_DECREF(proc); ! Py_DECREF(args); FINISHED_THREAD_EXIT; Py_XDECREF(result); }
*** 1.27 1997/11/25 22:18:21 --- runtime/kernel/w3ng.c 1998/02/04 04:05:49 *************** *** 1465,1477 **** ilu_cardinal serial_no = (packet & 0x00FFFFFF); switch (cause) { case ResourceManagement: ! ILU_ERR_CONS1(comm_failure, err, minor, ilu_cfm_resource_mgmt, 0); break; case InvalidServerID: ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_sid, 0); break; case ProcessTermination: ! ILU_ERR_CONS1(comm_failure, err, minor, ilu_cfm_eof, 0); break; case InvalidProtocolID: ILU_ERR_CONS1(marshal, err, minor, ilu_mm_versionMismatch, 0); --- 1465,1477 ---- ilu_cardinal serial_no = (packet & 0x00FFFFFF); switch (cause) { case ResourceManagement: ! ILU_CLER(*err); break; case InvalidServerID: ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_sid, 0); break; case ProcessTermination: ! ILU_CLER(*err); break; case InvalidProtocolID: ILU_ERR_CONS1(marshal, err, minor, ilu_mm_versionMismatch, 0); *************** *** 1482,1488 **** } transport_end_message(bs, ilu_FALSE, NIL, &lerr); ILU_HANDLED(lerr); ! return ilu_rhrc_error; } default: /* bad message type */ --- 1482,1489 ---- } transport_end_message(bs, ilu_FALSE, NIL, &lerr); ILU_HANDLED(lerr); ! id->connection_closed = ilu_TRUE; ! return (ILU_ERROK(*err) ? ilu_rhrc_eof : ilu_rhrc_error); } default: /* bad message type */
*** runtime/kernel/debug.c.orig Fri Feb 6 11:36:09 1998 --- runtime/kernel/debug.c Fri Feb 6 11:51:38 1998 *************** *** 719,731 **** void _ilu_ConsumeByLoop(const char *f, int l) { ! ILU_ERRPRINTF( ! "Entering endless sleep loop (at line %d of %s)", ! __LINE__ + 4, __FILE__); #ifdef ILU_OS_THREADED ! ILU_ERRPRINTF(", Thread ID = 0x%x,", GET_CURRENT_THREAD()); #endif ! ILU_ERRPRINTF(" for debugging purposes...\n"); while (1) #ifdef WIN16 Yield(); --- 719,729 ---- void _ilu_ConsumeByLoop(const char *f, int l) { ! ILU_ERRPRINTF("Entering endless sleep loop (at line %d of %s)" #ifdef ILU_OS_THREADED ! ", Thread ID = 0x%x\n", GET_CURRENT_THREAD() #endif ! ,__LINE__ + 4, __FILE__); while (1) #ifdef WIN16 Yield();
*** runtime/kernel/call.c.orig Fri Feb 6 11:35:56 1998 --- runtime/kernel/call.c Fri Feb 6 11:49:32 1998 *************** *** 2933,2943 **** --- 2933,2945 ---- if (ubuf == NIL) return; if (!UTF2Decode(ubuf, buf, len, len2, err)) { + ilu_free(buf); ilu_free(ubuf); *s = NIL; *l = 0; return; } + ilu_free(buf); ubuf[len] = 0; *s = ubuf; *l = len; *************** *** 3046,3054 **** --- 3048,3058 ---- return; } if (!UTF2Decode(*s, buf, len, len2, err) && isnew) { + ilu_free(buf); ilu_free(*s); *s = NIL; } + ilu_free(buf); return; }
*** 1.232 1998/02/06 02:19:33 --- runtime/python/iluPrmodule.c 1998/02/18 22:10:16 *************** *** 734,740 **** ilu_Class kclass; CrNode * n; ! if (!PyArg_Parse(args, "(O)", &pycl)) return 0; if (!PyClass_Check(pycl)) { --- 734,740 ---- ilu_Class kclass; CrNode * n; ! if (!PyArg_Parse(args, "O", &pycl)) return 0; if (!PyClass_Check(pycl)) {
*** 1.37 1997/11/21 02:22:37 --- runtime/lisp/ilu-kernel.lisp 1998/02/18 22:54:10 *************** *** 570,576 **** (define-c-function ilu_pickle-type-uid "Find the type UID of a pickle from its bytes" "ilulisp_PickleTypeUID" ! (:bytes :ilu-kerr) :string) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; --- 570,576 ---- (define-c-function ilu_pickle-type-uid "Find the type UID of a pickle from its bytes" "ilulisp_PickleTypeUID" ! (:bytes :ilu-kerr) :constant-string) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; *************** *** 671,676 **** --- 671,682 ---- (define-c-function ilu_no-reply "Used by server to end asynchronous call arg unmarshalling" "ilu_NoReply" (:ilu-call :ilu-kerr) :boolean :inline t) + + ;; Main Invariant holds, L2 otherwise unconstrained + (define-c-function begin-sizing-exception + "Start an exception" + "ilu_BeginSizingException" (:ilu-call :integer :ilu-kerr) + :cardinal :inline t) ;; before: L2 not >= {call's conn's iomu}, ;; L2 >= {call's conn's callmu} iff protocol not concurrent; *** 1.107 1997/11/08 03:21:35 --- runtime/lisp/ilu.lisp 1998/02/18 22:55:31 *************** *** 752,758 **** (exception-value-read call exception)))) (defun signal-exception (call position e) ! (begin-exception call position (exception-value-size call e)) (exception-value-write call e) (finish-exception call)) --- 757,765 ---- (exception-value-read call exception)))) (defun signal-exception (call position e) ! (begin-exception call position ! (+ (begin-sizing-exception call position) ! (exception-value-size call e))) (exception-value-write call e) (finish-exception call)) *** 1.13 1997/11/25 05:33:08 --- runtime/lisp/ilu-lisp-skin.c 1998/02/17 05:37:05 *************** *** 881,888 **** ilulisp_ReadPickle (ilu_Call call, ByteVector *bytes, ilu_Error *err) { ilu_Pickle p; - p.pi_bytes = bytes->data; p.pi_len = bytes->len; (void) ilu_ReadPickle(call, p, err); } --- 881,890 ---- ilulisp_ReadPickle (ilu_Call call, ByteVector *bytes, ilu_Error *err) { ilu_Pickle p; p.pi_len = bytes->len; + p.pi_bytes = ilu_MallocE(bytes->len, err); + if (ILU_ERRNOK(*err)) return; + memcpy (p.pi_bytes, bytes->data, bytes->len); (void) ilu_ReadPickle(call, p, err); }
*** 1.233 1998/02/18 22:10:15 --- runtime/python/iluPrmodule.c 1998/02/19 00:36:39 *************** *** 2922,2935 **** /* return stat; */ } ! static PyObject *cbDoEvent; ! static PyObject *cbRegInp; ! static PyObject *cbCanInp; ! static PyObject *cbRegOut; ! static PyObject *cbCanOut; ! static PyObject *cbCreateAlarm; ! static PyObject *cbSetAlarm; ! static PyObject *cbCanAlarm; static void Run(int *stop) --- 2922,2935 ---- /* return stat; */ } ! static PyObject *cbDoEvent = ILU_NIL; ! static PyObject *cbRegInp = ILU_NIL; ! static PyObject *cbCanInp = ILU_NIL; ! static PyObject *cbRegOut = ILU_NIL; ! static PyObject *cbCanOut = ILU_NIL; ! static PyObject *cbCreateAlarm = ILU_NIL; ! static PyObject *cbSetAlarm = ILU_NIL; ! static PyObject *cbCanAlarm = ILU_NIL; static void Run(int *stop) *************** *** 3186,3192 **** return 0; } ! /* DM: Why don't we need to INCREF these objects? */ cbDoEvent = DoEvent; cbRegInp = regInp; --- 3186,3199 ---- return 0; } ! Py_XDECREF(cbDoEvent); ! Py_XDECREF(cbRegInp); ! Py_XDECREF(cbCanInp); ! Py_XDECREF(cbRegOut); ! Py_XDECREF(cbCanOut); ! Py_XDECREF(cbCreateAlarm); ! Py_XDECREF(cbSetAlarm); ! Py_XDECREF(cbCanAlarm); cbDoEvent = DoEvent; cbRegInp = regInp; *************** *** 3196,3201 **** --- 3203,3218 ---- cbCreateAlarm = createAlarm; cbSetAlarm = setAlarm; cbCanAlarm = cancelAlarm; + + Py_INCREF(cbDoEvent); + Py_INCREF(cbRegInp); + Py_INCREF(cbCanInp); + Py_INCREF(cbRegOut); + Py_INCREF(cbCanOut); + Py_INCREF(cbCreateAlarm); + Py_INCREF(cbSetAlarm); + Py_INCREF(cbCanAlarm); + if (!initialized) { ilu_SetMainLoop (&synth);
*** 1.26 1997/09/19 01:57:55 --- stubbers/cpp2/cppgencommon.cpp 1998/03/05 20:17:57 *************** *** 4218,4228 **** ofs << "_varBuffer[_index] = _oldVarBuffer[_index];" << endl; ofs.indent--; ofs << "};" << endl; ! ofs << "if (_buffer != NULL && _oldRelease) {" << endl; ofs.indent++; ofs << "freebuf(_oldBuffer);" << endl; if (needVarBuffer()) ! ofs << "delete [] _varBuffer;" << endl; ofs.indent--; ofs << "};" << endl; ofs.indent--; --- 4218,4228 ---- ofs << "_varBuffer[_index] = _oldVarBuffer[_index];" << endl; ofs.indent--; ofs << "};" << endl; ! ofs << "if (_oldBuffer != NULL && _oldRelease) {" << endl; ofs.indent++; ofs << "freebuf(_oldBuffer);" << endl; if (needVarBuffer()) ! ofs << "delete [] _oldVarBuffer;" << endl; ofs.indent--; ofs << "};" << endl; ofs.indent--;
*** 1.239 1998/03/24 02:28:22 --- runtime/python/iluPrmodule.c 1998/03/24 03:37:27 *************** *** 793,837 **** } static ilu_boolean ! enableRequestsOnConn(ilu_Connection conn, ilu_Error *err) { ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn)); CALL_KERNEL(ilupython_threaded_operation, ilu_SetConnectionInputHandler (conn, singleThreadedReadServiceRequest, (ilu_refany) conn, ! err)); ! if (ILU_ERRNOK(*err)) { char buf[1000]; ! _ilupython_formErrDescription (buf, err); ! ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n", ! buf); ! ILU_HANDLED(*err); return ilu_FALSE; } return ilu_TRUE; } static ilu_boolean ! disableRequestsOnConn(ilu_Connection conn, ilu_Error *err) { ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn)); CALL_KERNEL(ilupython_threaded_operation, ilu_SetConnectionInputHandler (conn, (ilu_TransportInputHandler) 0, ILU_NIL, ! err)); ! if (ILU_ERRNOK(*err)) { char buf[1000]; ! _ilupython_formErrDescription (buf, err); ! ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n", ! buf); ! ILU_HANDLED(*err); return ilu_FALSE; } return ilu_TRUE; --- 793,837 ---- } static ilu_boolean ! enableRequestsOnConn(ilu_Connection conn) { + ilu_Error lerr; ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn)); CALL_KERNEL(ilupython_threaded_operation, ilu_SetConnectionInputHandler (conn, singleThreadedReadServiceRequest, (ilu_refany) conn, ! &lerr)); ! if (ILU_ERRNOK(lerr)) { char buf[1000]; ! _ilupython_formErrDescription (buf, &lerr); ! ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n", buf); ! ILU_HANDLED(lerr); return ilu_FALSE; } return ilu_TRUE; } static ilu_boolean ! disableRequestsOnConn(ilu_Connection conn) { + ilu_Error lerr; ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn)); CALL_KERNEL(ilupython_threaded_operation, ilu_SetConnectionInputHandler (conn, (ilu_TransportInputHandler) 0, ILU_NIL, ! &lerr)); ! if (ILU_ERRNOK(lerr)) { char buf[1000]; ! _ilupython_formErrDescription (buf, &lerr); ! ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n", buf); ! ILU_HANDLED(lerr); return ilu_FALSE; } return ilu_TRUE; *************** *** 842,849 **** { ilu_boolean status; ! if (status = enableRequestsOnConn(ilu_ConnectionOfCall(ca->call), ! &ca->err)) ca->conn_disabled = ilu_FALSE; return status; } --- 842,848 ---- { ilu_boolean status; ! if (status = enableRequestsOnConn(ilu_ConnectionOfCall(ca->call))) ca->conn_disabled = ilu_FALSE; return status; } *************** *** 854,861 **** ilu_Connection conn = ilu_ConnectionOfCall(ca->call); ilu_boolean status; ! if (status = disableRequestsOnConn(ilu_ConnectionOfCall(ca->call), ! &ca->err)) ca->conn_disabled = ilu_TRUE; return status; } --- 853,859 ---- ilu_Connection conn = ilu_ConnectionOfCall(ca->call); ilu_boolean status; ! if (status = disableRequestsOnConn(ilu_ConnectionOfCall(ca->call))) ca->conn_disabled = ilu_TRUE; return status; } *************** *** 1002,1008 **** CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (ca->call, &ca->err)); ILU_HANDLED(ca->err); if (!ilupython_threaded_operation && ca->conn_disabled) ! enableRequestsOnConn(conn, &lerr); Py_DECREF(ca); return; } --- 1000,1006 ---- CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (ca->call, &ca->err)); ILU_HANDLED(ca->err); if (!ilupython_threaded_operation && ca->conn_disabled) ! enableRequestsOnConn(conn); Py_DECREF(ca); return; } *************** *** 1010,1016 **** } if (!ilupython_threaded_operation) ! enableRequestsOnConn(conn, &lerr); CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (call, &lerr)); ilu_free(call); ILU_HANDLED(lerr); --- 1008,1014 ---- } if (!ilupython_threaded_operation) ! enableRequestsOnConn(conn); CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (call, &lerr)); ilu_free(call); ILU_HANDLED(lerr); *************** *** 1033,1039 **** ilu_boolean initted; if (single_threaded) ! disableRequestsOnConn(conn, &err); CALL_KERNEL(ilupython_threaded_operation, stat = ilu_ReceiveRequest(&call, &initted, conn, &kclass, &meth, &serialNo, &err)); --- 1031,1037 ---- ilu_boolean initted; if (single_threaded) ! disableRequestsOnConn(conn); CALL_KERNEL(ilupython_threaded_operation, stat = ilu_ReceiveRequest(&call, &initted, conn, &kclass, &meth, &serialNo, &err)); *************** *** 1077,1083 **** /* stat must be ilu_RcvReqStat_noop */ if (single_threaded) /* call skeleton does this for ilu_RcvReqStat_request case */ ! enableRequestsOnConn(conn, &err); return ilu_FALSE; } --- 1075,1081 ---- /* stat must be ilu_RcvReqStat_noop */ if (single_threaded) /* call skeleton does this for ilu_RcvReqStat_request case */ ! enableRequestsOnConn(conn); return ilu_FALSE; } *************** *** 1104,1110 **** } if (!ilupython_threaded_operation && conn) ! enableRequestsOnConn(conn, &err); } OWNED(PyObject *) --- 1102,1108 ---- } if (!ilupython_threaded_operation && conn) ! enableRequestsOnConn(conn); } OWNED(PyObject *)
*** 1.167 1997/11/25 22:19:10 --- runtime/kernel/iiop.c 1998/03/24 03:52:59 *************** *** 6461,6472 **** } ILU_ERR_ENDSWITCH; } else { ilu_bytes b = NIL; ! ilu_cardinal len = iiop_size(call) - ((ilu_cardinal) iiop_vop(call)); ! if (len > 0) { ! _IIOP_InputOpaque(call, &b, len, err); ! if (ILU_ERROK(*err)) ilu_free(b); ! } else { ! ILU_CLER(*err); } return ILU_ERROK(*err); } --- 6490,6506 ---- } ILU_ERR_ENDSWITCH; } else { ilu_bytes b = NIL; ! ilu_cardinal len; ! if ((iiop_size(call) + 12) < ((ilu_cardinal) iiop_vop(call))) ! ILU_ERR_CONS1(marshal, err, minor, ilu_mm_eom, 0); ! else { ! len = (iiop_size(call) + 12) - ((ilu_cardinal) iiop_vop(call)); ! if (len > 0) { ! _IIOP_InputOpaque(call, &b, len, err); ! if (ILU_ERROK(*err)) ilu_free(b); ! } else { ! ILU_CLER(*err); ! } } return ILU_ERROK(*err); }
*** 1.62 1997/11/10 21:35:33 --- stubbers/java/util.c 1998/04/02 18:56:15 *************** *** 56,61 **** --- 56,84 ---- return value ? "true" : "false"; } + static char* replaceBackslashes(char* x) + { + /* We need to replace backslashes with forward slashes + * because in java backslashes cause character substitutions + * even if found in comments. + * + * The only place where this is used is in file names in comments. + */ + char backslash = '\\'; + char* p; + p = strchr(x, backslash); + if (p) { + x = ilu_strdup(x); + p = strchr(x, backslash); + while (p) { + *p = '/'; + p++; + p = strchr(p, backslash); + } + } + return x; + } /*replaceBackslashes*/ + static list allfiles = 0; static void reportFile(char* fn) *************** *** 86,92 **** { static char *prefixes[2] = {"//", "//"}; ! printf("// %s for \"%s\"\n//\n", part, packagePrefix(ih)); if (ifc) { iluparser_GenerateBoilerplate(stdout, ifc, programName, prefixes); } --- 109,117 ---- { static char *prefixes[2] = {"//", "//"}; ! printf("// %s for \"%s\"\n//\n", ! replaceBackslashes((char*)part), replaceBackslashes(packagePrefix(ih)) ! ); if (ifc) { iluparser_GenerateBoilerplate(stdout, ifc, programName, prefixes); } *************** *** 215,221 **** PrintFileHeader(const char * path, Interface interface, IHandle ih) { char * pp = packagePrefix(ih); ! printf("// "); printf(path); printf("\n"); printBanner("Stubs", interface, ih); printf("\n\n"); if (pp) { --- 240,246 ---- PrintFileHeader(const char * path, Interface interface, IHandle ih) { char * pp = packagePrefix(ih); ! printf("// "); printf(replaceBackslashes((char*)path)); printf("\n"); printBanner("Stubs", interface, ih); printf("\n\n"); if (pp) {
*** 1.17 1997/11/12 02:17:15 --- stubbers/parser/util.c 1998/04/02 18:56:54 *************** *** 33,38 **** --- 33,64 ---- #include /* for stat() */ + + static char* replaceBackslashes(char* x) + { + /* We need to replace backslashes with forward slashes + * because in java backslashes cause character substitutions + * even if found in comments. + * + * The only place where this is used is in file names in comments. + */ + char backslash = '\\'; + char* p; + p = strchr(x, backslash); + if (p) { + x = ilu_strdup(x); + p = strchr(x, backslash); + while (p) { + *p = '/'; + p++; + p = strchr(p, backslash); + } + } + return x; + } /*replaceBackslashes*/ + + + /* MED: Windows doesn't have pwd.h (or getpwuid()) */ #ifdef _IS_POSIX #include /* for getpwuid() */ *************** *** 83,89 **** } filename = (s->filename && *s->filename) ? s->filename : i->filename; if (filename) ! fprintf (info->file, ",\n%s and \"%s\" of %s", info->prefix, filename, ModTime(filename)); } void iluparser_GenerateBoilerplate (FILE *file, Interface parse, char *programName, char *prefixes[2]) --- 109,115 ---- } filename = (s->filename && *s->filename) ? s->filename : i->filename; if (filename) ! fprintf (info->file, ",\n%s and \"%s\" of %s", info->prefix, replaceBackslashes(filename), ModTime(filename)); } void iluparser_GenerateBoilerplate (FILE *file, Interface parse, char *programName, char *prefixes[2]) *************** *** 101,111 **** fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n", prefixes[0], ILU_VERSION_STRING); fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n", ! prefixes[1], now, GoodGetLogin(), prefixes[1], programName, ModTime(programName)); ! fprintf (file, "%s on \"%s\" of %s", prefixes[1], parse->filename, ModTime(parse->filename)); if (list_size(parse->imports) > 0) list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, &info); ! fprintf (file, ".\n%s\n%s ILU is Copyright 1991-1997 Xerox Corporation, All Rights Reserved.\n", prefixes[1], prefixes[1]); fprintf (file, "%s ILU information: ftp://ftp.parc.xerox.com/pub/ilu/ilu.html.\n", prefixes[1]); --- 127,137 ---- fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n", prefixes[0], ILU_VERSION_STRING); fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n", ! prefixes[1], now, GoodGetLogin(), prefixes[1], replaceBackslashes(programName), ModTime(programName)); ! fprintf (file, "%s on \"%s\" of %s", prefixes[1], replaceBackslashes(parse->filename), ModTime(parse->filename)); if (list_size(parse->imports) > 0) list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, &info); ! fprintf (file, ".\n%s\n%s ILU is Copyright 1991-1998 Xerox Corporation, All Rights Reserved.\n", prefixes[1], prefixes[1]); fprintf (file, "%s ILU information: ftp://ftp.parc.xerox.com/pub/ilu/ilu.html.\n", prefixes[1]); *************** *** 113,119 **** static void PrintInterfaceInfo (Interface parse, PrintInfo *info) { ! fprintf (info->file, "%s on \"%s\" of %s", info->prefix, parse->filename, ModTime(parse->filename)); if (list_size(parse->imports) > 0) list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, info); fprintf (info->file, "\n"); --- 139,145 ---- static void PrintInterfaceInfo (Interface parse, PrintInfo *info) { ! fprintf (info->file, "%s on \"%s\" of %s", info->prefix, replaceBackslashes(parse->filename), ModTime(parse->filename)); if (list_size(parse->imports) > 0) list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, info); fprintf (info->file, "\n"); *************** *** 134,140 **** fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n", prefixes[0], ILU_VERSION_STRING); fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n", ! prefixes[1], now, GoodGetLogin(), prefixes[1], programName, ModTime(programName)); list_enumerate (interfaces, (iluparser_EnumProc) PrintInterfaceInfo, &info); fprintf (file, "%s\n%s ILU is Copyright 1991-1997 Xerox Corporation, All Rights Reserved.\n", prefixes[1], prefixes[1]); --- 160,166 ---- fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n", prefixes[0], ILU_VERSION_STRING); fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n", ! prefixes[1], now, GoodGetLogin(), prefixes[1], replaceBackslashes(programName), ModTime(programName)); list_enumerate (interfaces, (iluparser_EnumProc) PrintInterfaceInfo, &info); fprintf (file, "%s\n%s ILU is Copyright 1991-1997 Xerox Corporation, All Rights Reserved.\n", prefixes[1], prefixes[1]);
*** stubbers/java/genobj.c 1997/12/06 01:03:26 --- stubbers/java/genobj.c 1998/05/01 12:49:01 *************** *** 969,974 **** --- 969,994 ---- PRIVATE void + printFinishTryIluSystemException(char* otName) + /* code which catches an IluSystemException and re-throws it + * as an IluRuntimeError to make sure it can be thrown in + * static initializers + */ + { + printf(" } catch (xerox.ilu.IluSystemException e) {\n"); + /* Java reports this error very poorly; + * so we will print it ourself first. + */ + printf(" System.err.println(\"**error registering %s: \" + e);\n", + otName + ); + printf(" e.printStackTrace(System.err);\n"); + printf(" throw new xerox.ilu.IluRuntimeError(\"error registering %s\", e);\n", otName); + printf(" }\n"); + } /*printFinishTryIluSystemException*/ + + + PRIVATE void printStubClass(ObjRockType* rock) { Type t = rock->t; *************** *** 1082,1094 **** qoString(currentIfc->brand) ); } - printf(" %s.id(); //makes sure helper class is loaded\n", - helperClassShortName(t)); } ! printf(" } catch (xerox.ilu.IluSystemException e) {\n"); ! printf(" throw new xerox.ilu.IluRuntimeError(\"error 1 registering %s\", e);\n", otName); ! printf(" }\n"); rock->methodidx = 0; list_enumerate(c->methods, (EnumProc) printMethodRegistration, rock); --- 1102,1110 ---- qoString(currentIfc->brand) ); } } ! printFinishTryIluSystemException(otName); rock->methodidx = 0; list_enumerate(c->methods, (EnumProc) printMethodRegistration, rock); *************** *** 1095,1103 **** printf(" try {\n"); printf(" %s.finishClass();\n", iluClassRepField); ! printf(" } catch (xerox.ilu.IluSystemException e) {\n"); ! printf(" throw new xerox.ilu.IluRuntimeError(\"error 2 registering %s\", e);\n", otName); ! printf(" }\n"); printf(" }//static\n\n"); list_enumerate(c->methods, (EnumProc) printMethodStub, rock); --- 1111,1122 ---- printf(" try {\n"); printf(" %s.finishClass();\n", iluClassRepField); ! if (ih->p.genHlp) { ! printf(" %s.id(); //makes sure helper class is loaded\n", ! helperClassShortName(t) ! ); ! } ! printFinishTryIluSystemException(otName); printf(" }//static\n\n"); list_enumerate(c->methods, (EnumProc) printMethodStub, rock);
*** 1.43 1997/10/21 23:46:44 --- runtime/java/IluRT0.java 1998/06/01 06:17:40 *************** *** 425,430 **** --- 425,452 ---- if (oi1.yServer == 0) return false; return (oi1.yServer == oi2.yServer); } //objectsAreSiblings + + + /** + * Returns current budget for file descriptors. + * See the ilu kernel documentation. + */ + public static native int getFDBudget(); + + /** + * Sets the FD budget to n, if possible. + * Stay within bounds of what the operating system allows + * and return new number. + */ + /*friendly*/ static native int nSetFDBudget(int n); + + /** + * Sets the FD budget to n, if possible. + */ + public static int setFDBudget(int n) { + //disable use from applets + return nSetFDBudget(n); + } //setFDBudget /** *** 1.45 1997/11/06 23:28:17 --- runtime/java/IluJava_IluRT0.c 1998/06/01 06:27:23 *************** *** 451,456 **** --- 451,476 ---- ilu_free(cstring); return jjstring; } + + JAVAEXPORT(IluRT0_getFDBudget, Jint) + JIluRT0 unused + ENDJAVAEXPORT + { + Jint n = -1; + n = (Jint) ilu_GetFDBudget(); + return n; + } + + + JAVAEXPORT(IluRT0_nSetFDBudget, Jint) + JIluRT0 unused, + Jint n + ENDJAVAEXPORT + { + n = (Jint) ilu_SetFDBudget((ilu_cardinal) n); + return n; + } + JAVAEXPORT(IluRT0_registerTrue, void) JIluRT0 unused,
*** etc/misc/parseior.c Tue Nov 25 19:42:54 1997 --- 23 Tue Jun 2 12:31:01 1998 *************** *** 31,37 **** static ilu_string encode (ilu_bytes key, ilu_cardinal keylen) { - ilu_Error err; int i; ilu_string copy; char *p; --- 31,36 ---- *************** *** 38,44 **** ilu_byte *q; copy = ilu_must_malloc(3 * keylen); - ILU_HANDLED(err); for (p = copy, q = key; (q - key) < keylen; q++) { if ((*q < 0x20) || (*q > 0x7E)) { *p++ = '#'; --- 37,42 ----
*** 1.1 1998/06/04 21:08:08 --- stubbers/parser/Imakefile 1998/06/04 21:08:28 *************** *** 35,43 **** DISTCLEAN = cd ../idl ; rm -f idlparser.o idlscan.o IDLOBJS = ../idl/idlparser.o ../idl/idlscan.o #else ! DISTMAKE = : ! DISTCLEAN = : ! IDLOBJS = : #endif $(IDLOBJS) : --- 35,43 ---- DISTCLEAN = cd ../idl ; rm -f idlparser.o idlscan.o IDLOBJS = ../idl/idlparser.o ../idl/idlscan.o #else ! DISTMAKE = ! DISTCLEAN = ! IDLOBJS = #endif $(IDLOBJS) :
*** runtime/kernel/iiop.c Thu Jun 4 14:03:43 1998 --- 1.188 1998/06/04 22:08:31 *************** *** 53,58 **** --- 53,60 ---- #define CORBA_NATIVE_OBJECT_IH_PREFIX "ilu--corba-native-object:" #define SIZEOF_CORBA_NATIVE_OBJECT_IH_PREFIX (sizeof(CORBA_NATIVE_OBJECT_IH_PREFIX)-1) + #define CORBA_OBJECT_TYPE_ID "IDL:omg.org/CORBA/Object:1.0" + static ilu_boolean _IIOP_SendPacket(ilu_Call, ilu_boolean); static ilu_boolean Initialized = ilu_FALSE; *************** *** 1821,1826 **** --- 1823,1832 ---- ilu_Class pclass = object_class(o); ILU_ERRS((bad_locks, inv_objref, no_resources, IoErrs)) lerr; CheckTypeData d; + + if ((pclass == ilu_rootClass) && + ((c = ilu_FindClassFromID (CORBA_OBJECT_TYPE_ID)) != NIL)) + pclass = c; if (class_singleton(pclass)) { ILU_NOTE(IIOP_DEBUG | OBJECT_DEBUG,
*** 1.1 1998/06/09 21:59:24 --- runtime/kernel/debug.c 1998/06/09 22:08:57 *************** *** 719,729 **** void _ilu_ConsumeByLoop(const char *f, int l) { - ILU_ERRPRINTF("Entering endless sleep loop (at line %d of %s)" #ifdef ILU_OS_THREADED ! ", Thread ID = 0x%x\n", GET_CURRENT_THREAD() #endif ! ,__LINE__ + 4, __FILE__); while (1) #ifdef WIN16 Yield(); --- 719,732 ---- void _ilu_ConsumeByLoop(const char *f, int l) { #ifdef ILU_OS_THREADED ! ILU_ERRPRINTF("ILU (thread 0x%x): Entering endless sleep loop (at line %d of %s)", ! GET_CURRENT_THREAD(), __LINE__ + 4, __FILE__); ! #else ! ILU_ERRPRINTF("ILU: Entering endless sleep loop (at line %d of %s)", ! __LINE__ + 4, __FILE__); #endif ! while (1) #ifdef WIN16 Yield();
*** 1.17 1997/11/10 21:35:33 --- stubbers/java/genopt.c 1998/06/11 21:33:43 *************** *** 287,293 **** case card64_Type: case real32_Type: case real64_Type: ! case enumeration_Type: return "java.lang.Number"; default: break; --- 287,293 ---- case card64_Type: case real32_Type: case real64_Type: ! /* removed a case */ return "java.lang.Number"; default: break;
*** 1.2 1997/10/29 21:28:49 --- runtime/java/CORBA_ObjectStub.java 1998/06/09 01:48:23 *************** *** 40,46 **** CORBA_Object_classRep = xerox.ilu.IluClassRep.setupClass( "org.omg.CORBA.Object", //java reference interface ! "ilu.org.omg.CORBA.Object", //ilu object type ! "IDL:org.omg.CORBA.Object:1.0", //uuid 0); //method count CORBA_Object_classRep.setOptional(); CORBA_Object_classRep.setSurrClass( --- 40,46 ---- CORBA_Object_classRep = xerox.ilu.IluClassRep.setupClass( "org.omg.CORBA.Object", //java reference interface ! "ilu.CORBA-Object", //ilu object type ! "IDL:omg.org/CORBA/Object:1.0", //uuid 0); //method count CORBA_Object_classRep.setOptional(); CORBA_Object_classRep.setSurrClass( *** 1.1 1997/08/20 20:47:22 --- runtime/java/CORBA_ObjectHelper.java 1998/06/15 22:29:18 *************** *** 22,29 **** package xerox.ilu; public class CORBA_ObjectHelper implements xerox.ilu.IluIOFunctions { private final static java.lang.String _id = ! "IDL:omg.com/CORBA/Object:1.0"; private static xerox.ilu.IluTypeCode _tc = xerox.ilu.IluTypeCode.corba_objref(); --- 22,29 ---- package xerox.ilu; public class CORBA_ObjectHelper implements xerox.ilu.IluIOFunctions { private final static java.lang.String _id = ! "IDL:omg.org/CORBA/Object:1.0"; private static xerox.ilu.IluTypeCode _tc = xerox.ilu.IluTypeCode.corba_objref();
*** 1.25 1997/09/29 21:52:05 --- runtime/java/IluInit2.java 1998/06/25 20:55:04 *************** *** 152,157 **** --- 152,165 ---- e.printStackTrace(); IluDebug.panic("initializing ilu"); } + + //load client specified classes + //do not use xerox.basics.Environment.load + //because ilu.load provides better initialization order + java.lang.String loadAlso = + xerox.basics.Environment.getStringProp("ilu.load"); + xerox.basics.Environment.loadClasses(loadAlso); + } } } //init
*** stubbers/parser/iluparse.c.dist 1998/07/02 04:13:37 --- iluparse.c.dist 1998/07/02 04:22:07 *************** *** 1161,1166 **** --- 1161,1167 ---- } static list KnownInterfaces = NULL; + static list ProcessedFiles = NULL; /* list of struct parse_s * */ static void ClearExcnMark (Exception e, void *junk) { *************** *** 2149,2159 **** --- 2150,2167 ---- return (FALSE); } + static boolean + MatchProcessedFilename (struct parse_s *entry, char *filename) + { + return (strcmp(entry->filename, filename) == 0); + } + list ParseFile (string filename) { struct parse_s *new; int stat; list val = NULL; + char *full_filename; iluparsedebug = ((getenv("ISLDEBUG") != NULL) ? 1 : 0); *************** *** 2163,2177 **** if (ActiveInterfaces == NULL) ActiveInterfaces = new_list(); ! new = (struct parse_s *) iluparser_Malloc (sizeof(struct parse_s)); ! new->filename = FigureFilename (filename, ".isl"); ! new->interfaces = NULL; ! new->interface = NULL; ! new->input = NULL; ! new->line = 0; ! new->next = NULL; ! ! if (new->filename == NULL) { list searched_dirs = GetSearchList(); int i; --- 2171,2180 ---- if (ActiveInterfaces == NULL) ActiveInterfaces = new_list(); ! if (ProcessedFiles == NULL) ! ProcessedFiles = new_list(); ! ! if ((full_filename = FigureFilename (filename, ".isl")) == NULL) { list searched_dirs = GetSearchList(); int i; *************** *** 2183,2189 **** iluparser_Free(new); return (NULL); } ! new->next = CurrentParse; new->interface = NULL; new->line = 1; --- 2186,2203 ---- iluparser_Free(new); return (NULL); } ! ! if ((new = (struct parse_s *) list_find(ProcessedFiles, ! (iluparser_FindProc) MatchProcessedFilename, ! (void *) full_filename)) != NULL) ! return new->interfaces; ! ! new = (struct parse_s *) iluparser_Malloc (sizeof(struct parse_s)); ! new->filename = full_filename; ! new->interfaces = NULL; ! new->interface = NULL; ! new->input = NULL; ! new->line = 0; new->next = CurrentParse; new->interface = NULL; new->line = 1; *************** *** 2252,2265 **** while ((invalid_interface = (Interface) list_find (new->interfaces, (boolean (*)(refany, refany)) FixupInterface, new)) != NULL) list_remove (new->interfaces, invalid_interface); if (list_size(new->interfaces) == 0) ! { ! iluparser_Free (new->interfaces); ! val = NULL; ! } else val = new->interfaces; ! iluparser_Free (new->filename); ! iluparser_Free (new); } else { --- 2266,2275 ---- while ((invalid_interface = (Interface) list_find (new->interfaces, (boolean (*)(refany, refany)) FixupInterface, new)) != NULL) list_remove (new->interfaces, invalid_interface); if (list_size(new->interfaces) == 0) ! val = NULL; else val = new->interfaces; ! list_insert(ProcessedFiles, new); } else { *************** *** 2538,2562 **** #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 2339, 2345, 2352, 2356, 2362, 2364, 2369, 2373, 2377, 2381, ! 2391, 2411, 2415, 2421, 2426, 2434, 2438, 2446, 2453, 2463, ! 2467, 2473, 2508, 2534, 2556, 2560, 2564, 2568, 2572, 2576, ! 2580, 2584, 2591, 2597, 2603, 2607, 2611, 2617, 2621, 2625, ! 2629, 2633, 2637, 2641, 2647, 2695, 2701, 2704, 2737, 2740, ! 2781, 2785, 2791, 2795, 2799, 2805, 2825, 2835, 2847, 2853, ! 2860, 2876, 2880, 2886, 2898, 2902, 2908, 2917, 2923, 2931, ! 2937, 2945, 2952, 2956, 2960, 2966, 2970, 2976, 2986, 2994, ! 3003, 3007, 3013, 3020, 3027, 3033, 3041, 3045, 3049, 3056, ! 3060, 3079, 3083, 3089, 3096, 3103, 3109, 3116, 3123, 3132, ! 3154, 3177, 3181, 3187, 3191, 3198, 3202, 3206, 3213, 3219, ! 3226, 3230, 3234, 3238, 3244, 3253, 3257, 3263, 3271, 3280, ! 3311, 3315, 3321, 3327, 3333, 3339, 3345, 3351, 3357, 3363, ! 3371, 3377, 3383, 3389, 3395, 3401, 3407, 3414, 3420, 3426, ! 3432, 3436, 3442, 3450, 3457, 3463, 3471, 3500, 3504, 3511, ! 3515, 3519, 3525, 3529, 3535, 3539, 3543, 3550, 3554, 3560, ! 3564, 3570, 3573, 3576, 3596, 3600, 3606, 3623, 3630, 3637, ! 3646, 3656, 3666, 3678, 3684, 3693, 3698, 3702, 3708, 3712, ! 3716, 3722, 3746 }; #endif --- 2548,2572 ---- #if YYDEBUG != 0 static const short yyrline[] = { 0, ! 2349, 2355, 2362, 2366, 2372, 2374, 2379, 2383, 2387, 2391, ! 2401, 2421, 2425, 2431, 2436, 2444, 2448, 2456, 2463, 2473, ! 2477, 2483, 2518, 2544, 2566, 2570, 2574, 2578, 2582, 2586, ! 2590, 2594, 2601, 2607, 2613, 2617, 2621, 2627, 2631, 2635, ! 2639, 2643, 2647, 2651, 2657, 2705, 2711, 2714, 2747, 2750, ! 2791, 2795, 2801, 2805, 2809, 2815, 2835, 2845, 2857, 2863, ! 2870, 2886, 2890, 2896, 2908, 2912, 2918, 2927, 2933, 2941, ! 2947, 2955, 2962, 2966, 2970, 2976, 2980, 2986, 2996, 3004, ! 3013, 3017, 3023, 3030, 3037, 3043, 3051, 3055, 3059, 3066, ! 3070, 3089, 3093, 3099, 3106, 3113, 3119, 3126, 3133, 3142, ! 3164, 3187, 3191, 3197, 3201, 3208, 3212, 3216, 3223, 3229, ! 3236, 3240, 3244, 3248, 3254, 3263, 3267, 3273, 3281, 3290, ! 3321, 3325, 3331, 3337, 3343, 3349, 3355, 3361, 3367, 3373, ! 3381, 3387, 3393, 3399, 3405, 3411, 3417, 3424, 3430, 3436, ! 3442, 3446, 3452, 3460, 3467, 3473, 3481, 3510, 3514, 3521, ! 3525, 3529, 3535, 3539, 3545, 3549, 3553, 3560, 3564, 3570, ! 3574, 3580, 3583, 3586, 3606, 3610, 3616, 3633, 3640, 3647, ! 3656, 3666, 3676, 3688, 3694, 3703, 3708, 3712, 3718, 3722, ! 3726, 3732, 3756 }; #endif *************** *** 3291,3297 **** switch (yyn) { case 1: ! #line 2340 "ilu.bison" { CurrentParse->interfaces = new_list(); list_insert(CurrentParse->interfaces, yyvsp[0]); --- 3301,3307 ---- switch (yyn) { case 1: ! #line 2350 "ilu.bison" { CurrentParse->interfaces = new_list(); list_insert(CurrentParse->interfaces, yyvsp[0]); *************** *** 3299,3343 **** ; break;} case 2: ! #line 2346 "ilu.bison" { list_insert ((list) yyvsp[-1], yyvsp[0]); yyval = yyvsp[-1]; ; break;} case 3: ! #line 2353 "ilu.bison" { yyval = yyvsp[-1]; ; break;} case 4: ! #line 2357 "ilu.bison" { iluerror ("Bad interface description."); YYABORT; ; break;} case 7: ! #line 2370 "ilu.bison" { yyval = yyvsp[0]; ; break;} case 8: ! #line 2374 "ilu.bison" { yyval = yyvsp[0]; ; break;} case 9: ! #line 2378 "ilu.bison" { yyval = yyvsp[0]; ; break;} case 10: ! #line 2382 "ilu.bison" { iluerror ("Bad statement."); yyerrok; --- 3309,3353 ---- ; break;} case 2: ! #line 2356 "ilu.bison" { list_insert ((list) yyvsp[-1], yyvsp[0]); yyval = yyvsp[-1]; ; break;} case 3: ! #line 2363 "ilu.bison" { yyval = yyvsp[-1]; ; break;} case 4: ! #line 2367 "ilu.bison" { iluerror ("Bad interface description."); YYABORT; ; break;} case 7: ! #line 2380 "ilu.bison" { yyval = yyvsp[0]; ; break;} case 8: ! #line 2384 "ilu.bison" { yyval = yyvsp[0]; ; break;} case 9: ! #line 2388 "ilu.bison" { yyval = yyvsp[0]; ; break;} case 10: ! #line 2392 "ilu.bison" { iluerror ("Bad statement."); yy