% cd /usr/local/ilu/src % patch -p < /usr/local/ilu/src/this-patch [...various output from the patch program...] %
*** runtime/kernel/httpprot.c Tue Sep 24 17:16:33 1996 --- runtime/kernel/httpprot.c Tue Sep 24 09:18:30 1996 *************** *** 15,21 **** XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ ! /* $Id: 2.0alpha8-patches.html,v 1.16 1997/02/15 03:22:40 janssen Exp $ */ /* provide http protocol --- 15,21 ---- XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ ! /* $Id: 2.0alpha8-patches.html,v 1.16 1997/02/15 03:22:40 janssen Exp $ */ /* provide http protocol *************** *** 1047,1064 **** /* ********************************************************* */ ! /* returns the method from the class that has the given name */ ! static ilu_Method _http_inherited_method_from_name (ilu_Class p_class, ilu_string pc_the_method_name) { ilu_cardinal card_method_index; ilu_Method p_the_method; ilu_cardinal card_index_super_classes; ! ilu_Class *pp_super_class; /* search this class */ ! p_the_method = class_methods(p_class); ! for(card_method_index = 0; card_method_index < class_method_count(p_class); card_method_index++) { if (strcmp(method_name(p_the_method), pc_the_method_name) == 0) --- 1047,1065 ---- /* ********************************************************* */ ! /* returns the method and sets class that has the given method name */ ! static ilu_Method _http_inherited_method_from_name (ilu_Class* pp_class, ilu_string pc_the_method_name) { ilu_cardinal card_method_index; ilu_Method p_the_method; ilu_cardinal card_index_super_classes; ! ilu_cardinal card_super_classes_count; ! ilu_Class* pp_super_class; /* search this class */ ! p_the_method = class_methods(*pp_class); ! for(card_method_index = 0; card_method_index < class_method_count(*pp_class); card_method_index++) { if (strcmp(method_name(p_the_method), pc_the_method_name) == 0) *************** *** 1068,1079 **** } /* now (recursively depth first) search the super classes */ ! pp_super_class = class_superclasses(p_class); for (card_index_super_classes = 0; ! card_index_super_classes < class_superclass_count(p_class); card_index_super_classes++) { ! p_the_method = _http_inherited_method_from_name(*pp_super_class, pc_the_method_name); if (p_the_method != NIL) return p_the_method; --- 1069,1083 ---- } /* now (recursively depth first) search the super classes */ ! pp_super_class = class_superclasses(*pp_class); ! card_super_classes_count = class_superclass_count(*pp_class); for (card_index_super_classes = 0; ! card_index_super_classes < card_super_classes_count; card_index_super_classes++) { ! /* set the class to where to search next */ ! *pp_class = *pp_super_class; ! p_the_method = _http_inherited_method_from_name(pp_class, pc_the_method_name); if (p_the_method != NIL) return p_the_method; *************** *** 1090,1106 **** /* ********************************************************* */ /* returns the method from the root or class that has the given name */ ! static ilu_Method _http_method_from_name (ilu_Class p_class, ilu_string pc_the_method_name) { ilu_Method p_the_method; /* search internal (ilu_rootClass) methods */ p_the_method = _http_root_method_from_name(pc_the_method_name); ! if (p_the_method != NIL) return p_the_method; ! /* search internal (ilu_rootClass) methods */ ! return _http_inherited_method_from_name(p_class, pc_the_method_name); } --- 1094,1112 ---- /* ********************************************************* */ /* returns the method from the root or class that has the given name */ ! static ilu_Method _http_method_from_name (ilu_Class* pp_class, ilu_string pc_the_method_name) { ilu_Method p_the_method; /* search internal (ilu_rootClass) methods */ p_the_method = _http_root_method_from_name(pc_the_method_name); ! if (p_the_method != NIL) { ! *pp_class = ilu_rootClass; return p_the_method; + } ! /* search inherited methods */ ! return _http_inherited_method_from_name(pp_class, pc_the_method_name); } *************** *** 1622,1633 **** } ilu_ExitServer(call_server(p_call), ilu_rootClass); ! /* get and set the object's class */ p_the_class = object_class(p_the_object); call_intro_type(p_call) = p_the_class; ! /* get and set the method in that class with the given name */ ! if ((p_the_method = _http_method_from_name(p_the_class, _http_method_name(p_call))) == NIL) return ILU_ERR_CONS1(bad_param, p_error, minor, ilu_bpm_OID, ilu_FALSE); call_method(p_call) = p_the_method; --- 1628,1639 ---- } ilu_ExitServer(call_server(p_call), ilu_rootClass); ! /* get and set the object's (most specific) class */ p_the_class = object_class(p_the_object); call_intro_type(p_call) = p_the_class; ! /* get and set the method and class (potentially a superclass) with the given name */ ! if ((p_the_method = _http_method_from_name(&(call_intro_type(p_call)), _http_method_name(p_call))) == NIL) return ILU_ERR_CONS1(bad_param, p_error, minor, ilu_bpm_OID, ilu_FALSE); call_method(p_call) = p_the_method; *************** *** 2050,2056 **** ilu_cardinal card_reply_size, ILU_ERRS((IoErrs)) * p_error) { ilu_cardinal card_code; - ilu_cardinal card_count; ilu_string pc_reason_phrase; char c_buffer[128]; --- 2056,2061 ---- *************** *** 2063,2072 **** /* send back an internal server error since any other http'ish response code would simply be in the status line of the Response's Status Line xxx note should make the 'phrase' be more indicative of the actual error */ ! card_count = sprintf(c_buffer, "HTTP/%d.%d %hd %s\r\n", HTTPMajorVersion, HTTPMinorVersion, 500, _http_phrase_of_status_code(500)); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, card_count, p_error); if (ILU_ERRNOK(*p_error)) return ilu_FALSE; --- 2068,2077 ---- /* send back an internal server error since any other http'ish response code would simply be in the status line of the Response's Status Line xxx note should make the 'phrase' be more indicative of the actual error */ ! sprintf(c_buffer, "HTTP/%d.%d %hd %s\r\n", HTTPMajorVersion, HTTPMinorVersion, 500, _http_phrase_of_status_code(500)); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, strlen(c_buffer), p_error); if (ILU_ERRNOK(*p_error)) return ilu_FALSE; *************** *** 2092,2101 **** } /* send back an error code and phrase indicating that an exception occurred */ ! card_count = sprintf(c_buffer, "HTTP/%d.%d %lu %s\r\n\r\n", HTTPMajorVersion, HTTPMinorVersion, card_code, pc_reason_phrase); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, card_count, p_error); if (ILU_ERRNOK(*p_error)) return ilu_FALSE; --- 2097,2106 ---- } /* send back an error code and phrase indicating that an exception occurred */ ! sprintf(c_buffer, "HTTP/%d.%d %lu %s\r\n\r\n", HTTPMajorVersion, HTTPMinorVersion, card_code, pc_reason_phrase); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, strlen(c_buffer), p_error); if (ILU_ERRNOK(*p_error)) return ilu_FALSE; *************** *** 2274,2280 **** ILU_ERRS((IoErrs)) * p_error) { char c_buffer[64]; - ilu_cardinal card_count; ILU_CLER(*p_error); --- 2279,2284 ---- *************** *** 2284,2293 **** /* we're sending a status line in a reply */ /* have the transport write out the version, code, phrase, and crlf */ ! card_count = sprintf(c_buffer, "HTTP/%d.%d %hd ", HTTPMajorVersion, HTTPMinorVersion, scard_enum); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, card_count, p_error); if (ILU_ERRNOK(*p_error)) return; --- 2288,2297 ---- /* we're sending a status line in a reply */ /* have the transport write out the version, code, phrase, and crlf */ ! sprintf(c_buffer, "HTTP/%d.%d %hd ", HTTPMajorVersion, HTTPMinorVersion, scard_enum); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, strlen(c_buffer), p_error); if (ILU_ERRNOK(*p_error)) return; *************** *** 3417,3423 **** ILU_ERRS((IoErrs)) * p_error) { - ilu_cardinal card_count; char c_buffer[64]; ILU_CLER(*p_error); --- 3421,3426 ---- *************** *** 3444,3452 **** } else { /* auto generate a content length header */ ! card_count = sprintf(c_buffer, "Content-Length: %lu\r\n\r\n", card_length); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, card_count, p_error); if (ILU_ERRNOK(*p_error)) return; } --- 3447,3455 ---- } else { /* auto generate a content length header */ ! sprintf(c_buffer, "Content-Length: %lu\r\n\r\n", card_length); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, strlen(c_buffer), p_error); if (ILU_ERRNOK(*p_error)) return; } *************** *** 3476,3484 **** } else { /* auto generate a content length header */ ! card_count = sprintf(c_buffer, "Content-Length: %lu\r\n\r\n", card_length); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, card_count, p_error); if (ILU_ERRNOK(*p_error)) return; } --- 3479,3487 ---- } else { /* auto generate a content length header */ ! sprintf(c_buffer, "Content-Length: %lu\r\n\r\n", card_length); ! _http_transport_write_bytes(p_call->ca_prTrans, c_buffer, strlen(c_buffer), p_error); if (ILU_ERRNOK(*p_error)) return; }
*** runtime/kernel/httpprot.h 1996/07/16 04:15:56 --- runtime/kernel/httpprot.h 1996/09/23 19:14:06 *************** *** 57,64 **** /* default port number to use for http if it's not specified */ #define DEFAULT_HTTP_PORT_NUMBER 80 ! /* the type id of a http_resource_object */ ! #define HTTP_RESOURCE_OBJECT_TYPE_ID "Ilu_Http_1_0_resource_object" /* name of the environment variable that may be used to set http proxy server information --- 57,66 ---- /* default port number to use for http if it's not specified */ #define DEFAULT_HTTP_PORT_NUMBER 80 ! /* the type id of a http_resource_object ! NOTE HTTP_RESOURCE_OBJECT_TYPE_ID MUST AGREE with the TYPEID for http.Resource objects ! in the file src/stubbers/parser/http.isl */ ! #define HTTP_RESOURCE_OBJECT_TYPE_ID "ilu:Ilu_Http_1_0_resource_object" /* name of the environment variable that may be used to set http proxy server information
*** stubbers/parser/http.isl 1996/06/04 19:46:28 --- 1.2 1996/07/18 02:52:22 *************** *** 118,124 **** (* -------------------- Resource Object ------------------------------ *) TYPE Resource = OBJECT (* the object that knows the standard http methods *) ! TYPEID Ilu_Http_1_0_resource_object METHODS (* the standard http 1.0 methods, each taking a request and returning a response *) --- 118,124 ---- (* -------------------- Resource Object ------------------------------ *) TYPE Resource = OBJECT (* the object that knows the standard http methods *) ! TYPEID "ilu:Ilu_Http_1_0_resource_object" METHODS (* the standard http 1.0 methods, each taking a request and returning a response *)
*** imake/configure Wed Jul 17 13:39:09 1996 --- imake/configure.new Thu Aug 1 19:18:13 1996 *************** *** 4311,4317 **** elif test "$enableval" = yes; then case "$host_os" in sunos4*) IDL_CFE_OSV="SUNOS4" ;; ! solaris2* | linux1.2.* | linux1.3.* | linux2.* | sysv4.* ) IDL_CFE_OSV="SOLARIS2" ;; hpux*) IDL_CFE_OSV="hpux" ;; apollo*) IDL_CFE_OSV="apollo" ;; *) IDL_CFE_OSV="" ;; --- 4311,4317 ---- elif test "$enableval" = yes; then case "$host_os" in sunos4*) IDL_CFE_OSV="SUNOS4" ;; ! irix* | solaris2* | linux1.2.* | linux1.3.* | linux2.* | sysv4.* ) IDL_CFE_OSV="SOLARIS2" ;; hpux*) IDL_CFE_OSV="hpux" ;; apollo*) IDL_CFE_OSV="apollo" ;; *) IDL_CFE_OSV="" ;; *************** *** 4341,4347 **** if test "$IDL_CFE_OSV" != ""; then ! IDL_CPP_COMMAND=`echo $CXX | sed -e 's/ .*$//'` fi --- 4341,4347 ---- if test "$IDL_CFE_OSV" != ""; then ! IDL_CPP_COMMAND=`echo $CC | sed -e 's/ .*$//'` fi
*** runtime/python/Imakefile 1996/08/03 02:12:27 --- runtime/python/Imakefile-1.44 1996/08/07 18:38:06 *************** *** 108,114 **** ADDOBJS = $(PYTHON_EXEC_PREFIX)/lib/python/lib/main.o getpath.o getpath.o : $(PYTHON_EXEC_PREFIX)/lib/python/lib/getpath.c ! $(ANSI_C_COMPILER) $(CFLAGS) -c -o ./getpath.o $(PYTHON_PREFIX)/lib/python/lib/getpath.c #else ADDOBJS = --- 108,114 ---- ADDOBJS = $(PYTHON_EXEC_PREFIX)/lib/python/lib/main.o getpath.o getpath.o : $(PYTHON_EXEC_PREFIX)/lib/python/lib/getpath.c ! $(ANSI_C_COMPILER) $(CFLAGS) -c -o ./getpath.o $(PYTHON_EXEC_PREFIX)/lib/python/lib/getpath.c #else ADDOBJS = *************** *** 181,187 **** build standalone programs with ILU and Python linked in. */ ! libconfig.c : $(PYTHON_PREFIX)/lib/python/lib/config.c $(SED) -f makelibconfig.sed <$(PYTHON_EXEC_PREFIX)/lib/python/lib/config.c >libconfig.c libconfig.o : libconfig.c --- 181,187 ---- build standalone programs with ILU and Python linked in. */ ! libconfig.c : $(PYTHON_EXEC_PREFIX)/lib/python/lib/config.c $(SED) -f makelibconfig.sed <$(PYTHON_EXEC_PREFIX)/lib/python/lib/config.c >libconfig.c libconfig.o : libconfig.c *** examples/multlang/Imakefile 1996/03/19 04:21:18 --- examples/multlang/Imakefile-1.7 1996/08/07 18:56:37 *************** *** 14,26 **** CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ! $Id: 2.0alpha8-patches.html,v 1.16 1997/02/15 03:22:40 janssen Exp $ */ /* Last edited by Mike Spreitzer March 13, 1996 11:01 am PST */ runImakefile : runImakefile.dist $(RM) python-libs ! $(PYTHON_EXEC_PREFIX)/bin/python figurePythonLibs $(PYTHON_PREFIX)/lib/python/lib/Makefile >python-libs $(SED) -e "s;PYTHON_SYSTEM_LIBS;`cat python-libs`;" runImakefile MkdirTarget($(DESTDIR)/examples) --- 14,26 ---- CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ! $Id: 2.0alpha8-patches.html,v 1.16 1997/02/15 03:22:40 janssen Exp $ */ /* Last edited by Mike Spreitzer March 13, 1996 11:01 am PST */ runImakefile : runImakefile.dist $(RM) python-libs ! $(PYTHON_EXEC_PREFIX)/bin/python figurePythonLibs $(PYTHON_EXEC_PREFIX)/lib/python/lib/Makefile >python-libs $(SED) -e "s;PYTHON_SYSTEM_LIBS;`cat python-libs`;" runImakefile MkdirTarget($(DESTDIR)/examples)
*** stubbers/c/common.c Fri Aug 9 17:44:55 1996 --- stubbers/c/common.c.new Fri Aug 9 17:45:17 1996 *************** *** 172,179 **** return (type->importInterfaceName == NULL AND (t == union_Type || t == record_Type || t == optional_Type || t == object_Type || ! (t == sequence_Type && !TypeIsEitherString(type)) || ! t == array_Type)); } boolean HasAllocRoutine (Type type) --- 172,178 ---- return (type->importInterfaceName == NULL AND (t == union_Type || t == record_Type || t == optional_Type || t == object_Type || ! t == sequence_Type || t == array_Type)); } boolean HasAllocRoutine (Type type)
*** runtime/kernel/call.c Wed Aug 14 16:10:49 1996 --- runtime/kernel/call.c.new Wed Aug 14 16:12:18 1996 *************** *** 592,597 **** --- 592,601 ---- else ILU_HANDLED(lerr); } + if (call->ca_incoming && (call->ca_caller != NIL)) { + ilu_DestroyPassport (call->ca_caller, err); + call->ca_caller = NIL; + }; return; }
*** stubbers/python/genskel.c 1996/06/19 01:32:14 --- stubbers/python/genskel.c 1996/08/21 01:09:06 *************** *** 195,224 **** printf(" %s.RequestRead(%s)\n", nameModuleIlu, nameVarCall); if (m->asynch != 0) ! { ! printf(" %s.NoReply(%s)\n", nameModuleIlu, nameVarCall); ! printf(" "); ! } else ! { ! printf(" try:\n"); ! printf("\t"); ! if (nResults > 0) ! printf("%s = ", nameVarResult); ! } printf("%s.%s(", nameVarSelf, name); printArgList(m->arguments, 0); printf(")\n"); if (m->asynch == 0) ! { ! int nExcepts = 0; - list_enumerate(m->exceptions, (EnumProc) skMethodException, - &nExcepts); - skMethodDefaultExceptionHandler(m); - skMethodSendReply(m, nResults); - } } static void --- 195,228 ---- printf(" %s.RequestRead(%s)\n", nameModuleIlu, nameVarCall); if (m->asynch != 0) ! { ! printf(" "); ! } else ! { ! printf(" try:\n"); ! printf("\t"); ! if (nResults > 0) ! printf("%s = ", nameVarResult); ! } printf("%s.%s(", nameVarSelf, name); printArgList(m->arguments, 0); printf(")\n"); if (m->asynch == 0) ! { ! int nExcepts = 0; ! ! list_enumerate(m->exceptions, (EnumProc) skMethodException, ! &nExcepts); ! skMethodDefaultExceptionHandler(m); ! skMethodSendReply(m, nResults); ! } ! else ! { ! printf(" %s.NoReply(%s)\n", nameModuleIlu, nameVarCall); ! } } static void
*** stubbers/python/genstub.c 1996/07/03 00:15:43 --- genstub.c 1996/07/03 01:35:06 *************** *** 1129,1142 **** { Type et = e->import ? e->import->type : e->type; if (et) ! { ! printf(" %sif %s == %s:\n", ++*pCount > 1 ? "el" : "", ! nameVarExceptName, getExceptionName(e)); ! printf("\t%s = ", nameVarExceptValue); ! ioTypeInput(et); ! newline(); ! } } static void --- 1129,1144 ---- { Type et = e->import ? e->import->type : e->type; + printf(" %sif %s == %s:\n", ++*pCount > 1 ? "el" : "", + nameVarExceptName, getExceptionName(e)); + printf("\t%s = %s", nameVarExceptName, getExceptionName(e)); + newline(); if (et) ! { ! printf("\t%s = ", nameVarExceptValue); ! ioTypeInput(et); ! newline(); ! } } static void
*** runtime/python/iluPrmodule.c 1996/08/27 03:34:03 --- 1.133 1996/08/27 23:39:35 *************** *** 2280,2289 **** result = PyEval_CallObject(ihs->callback, argsTuple); Py_DECREF(argsTuple); if (result == 0) ! { ! handleCalloutException("input handler callback", ILU_NIL); ! } ! Py_DECREF(result); } static PyObject * --- 2280,2288 ---- result = PyEval_CallObject(ihs->callback, argsTuple); Py_DECREF(argsTuple); if (result == 0) ! handleCalloutException("input handler callback", ILU_NIL); ! else ! Py_DECREF(result); } static PyObject *
*** 1.140 1996/10/16 22:39:18 --- runtime/python/iluPrmodule.c 1996/10/22 20:09:51 *************** *** 3012,3018 **** PyErr_SetString (_ilupython_GeneralError, "Can't create passport object"); return (0); } - /*Py_INCREF(pp);*/ /* for our list (or ca_private field of call object) */ *py_passport = pp; } PyDict_SetItemString (pp, nameConnectionIdentityInfo, PyString_FromString((ilu_string) (ident->ii_info))); --- 3012,3017 ---- *************** *** 3078,3084 **** Py_DECREF(auth); return (0); } - Py_INCREF(pp); /* for our list */ *py_passport = pp; } PyDict_SetItemString (pp, nameSunRPCAuth, auth); --- 3077,3082 ---- *************** *** 3111,3117 **** Py_DECREF(gssid); return (0); } - Py_INCREF(pp); /* for our list */ *py_passport = pp; } PyDict_SetItemString (pp, nameGSSIdentityInfo, gssid); --- 3109,3114 ---- *************** *** 3120,3128 **** } ! Py_INCREF(*py_passport); /* XXXX -- isn't this one reference too many? the passport now has three ! references and only two are needed: for the return and for the internal ! storage */ return (*py_passport); } --- 3117,3123 ---- } ! Py_INCREF(*py_passport); return (*py_passport); }
*** original Wed Jul 17 13:32:24 1996 --- runtime/kernel/iiop.c Wed Feb 12 20:11:23 1997 *************** *** 699,709 **** else b = ilu_must_malloc(strlen(idl_name) + 1); ! if (idl_name[0] == '_') ! { strcpy (b, IDLAttributePrefix); p2 = b + IDLAttributePrefixLen; } ! else ! { p2 = b; } ! for (p1 = idl_name; *p1 != 0; p1++, p2++) { if (*p1 == '_') *p2 = '-'; --- 710,716 ---- else b = ilu_must_malloc(strlen(idl_name) + 1); ! for (p1 = idl_name, p2 = b; *p1 != 0; p1++, p2++) { if (*p1 == '_') *p2 = '-'; *************** *** 711,717 **** *p2 = *p1; } *p2 = 0; ! m = FindMethodOnClass (ptype, b, &realclass); if (b != buf) ilu_free(b); call_intro_type(call) = realclass; --- 718,731 ---- *p2 = *p1; } *p2 = 0; ! m = FindMethodOnClass (ilu_rootClass, b, &realclass); ! if (m == NIL) { ! if (idl_name[0] == '_') { ! memmove (b + IDLAttributePrefixLen, b, strlen(b) + 1); ! strncpy (b, IDLAttributePrefix, IDLAttributePrefixLen); ! } ! m = FindMethodOnClass (ptype, b, &realclass); ! } if (b != buf) ilu_free(b); call_intro_type(call) = realclass;